File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 15
15
class TypeParser
16
16
{
17
17
18
- /** @var ConstExprParser|null */
18
+ /** @var ConstExprParser */
19
19
private $ constExprParser ;
20
20
21
21
/** @var bool */
@@ -28,7 +28,7 @@ class TypeParser
28
28
* @param array{lines?: bool, indexes?: bool} $usedAttributes
29
29
*/
30
30
public function __construct (
31
- ? ConstExprParser $ constExprParser = null ,
31
+ ConstExprParser $ constExprParser ,
32
32
array $ usedAttributes = []
33
33
)
34
34
{
@@ -202,17 +202,6 @@ private function parseAtomic(TokenIterator $tokens): Ast\Type\TypeNode
202
202
$ currentTokenOffset = $ tokens ->currentTokenOffset ();
203
203
$ currentTokenLine = $ tokens ->currentTokenLine ();
204
204
205
- if ($ this ->constExprParser === null ) {
206
- throw new ParserException (
207
- $ currentTokenValue ,
208
- $ currentTokenType ,
209
- $ currentTokenOffset ,
210
- Lexer::TOKEN_IDENTIFIER ,
211
- null ,
212
- $ currentTokenLine
213
- );
214
- }
215
-
216
205
try {
217
206
$ constExpr = $ this ->constExprParser ->parse ($ tokens );
218
207
if ($ constExpr instanceof Ast \ConstExpr \ConstExprArrayNode) {
You can’t perform that action at this time.
0 commit comments