@@ -38,9 +38,6 @@ class PhpDocParser
38
38
/** @var ConstExprParser */
39
39
private $ doctrineConstantExprParser ;
40
40
41
- /** @var bool */
42
- private $ requireWhitespaceBeforeDescription ;
43
-
44
41
/** @var bool */
45
42
private $ preserveTypeAliasesWithInvalidTypes ;
46
43
@@ -59,7 +56,6 @@ class PhpDocParser
59
56
public function __construct (
60
57
TypeParser $ typeParser ,
61
58
ConstExprParser $ constantExprParser ,
62
- bool $ requireWhitespaceBeforeDescription = false ,
63
59
bool $ preserveTypeAliasesWithInvalidTypes = false ,
64
60
array $ usedAttributes = [],
65
61
bool $ textBetweenTagsBelongsToDescription = false
@@ -68,7 +64,6 @@ public function __construct(
68
64
$ this ->typeParser = $ typeParser ;
69
65
$ this ->constantExprParser = $ constantExprParser ;
70
66
$ this ->doctrineConstantExprParser = $ constantExprParser ->toDoctrine ();
71
- $ this ->requireWhitespaceBeforeDescription = $ requireWhitespaceBeforeDescription ;
72
67
$ this ->preserveTypeAliasesWithInvalidTypes = $ preserveTypeAliasesWithInvalidTypes ;
73
68
$ this ->useLinesAttributes = $ usedAttributes ['lines ' ] ?? false ;
74
69
$ this ->useIndexAttributes = $ usedAttributes ['indexes ' ] ?? false ;
@@ -1255,8 +1250,7 @@ private function parseOptionalDescription(TokenIterator $tokens, bool $limitStar
1255
1250
}
1256
1251
1257
1252
if (
1258
- $ this ->requireWhitespaceBeforeDescription
1259
- && !$ tokens ->isCurrentTokenType (Lexer::TOKEN_PHPDOC_EOL , Lexer::TOKEN_CLOSE_PHPDOC , Lexer::TOKEN_END )
1253
+ !$ tokens ->isCurrentTokenType (Lexer::TOKEN_PHPDOC_EOL , Lexer::TOKEN_CLOSE_PHPDOC , Lexer::TOKEN_END )
1260
1254
&& !$ tokens ->isPrecededByHorizontalWhitespace ()
1261
1255
) {
1262
1256
$ tokens ->consumeTokenType (Lexer::TOKEN_HORIZONTAL_WS ); // will throw exception
0 commit comments