File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 1515class  TypeParser
1616{
1717
18- 	/** @var ConstExprParser|null  */ 
18+ 	/** @var ConstExprParser */ 
1919	private  $ constExprParser ;
2020
2121	/** @var bool */ 
@@ -28,7 +28,7 @@ class TypeParser
2828	 * @param array{lines?: bool, indexes?: bool} $usedAttributes 
2929	 */ 
3030	public  function  __construct (
31- 		? ConstExprParser   $ constExprParser =  null ,
31+ 		ConstExprParser   $ constExprParser ,
3232		array  $ usedAttributes  = []
3333	)
3434	{
@@ -202,17 +202,6 @@ private function parseAtomic(TokenIterator $tokens): Ast\Type\TypeNode
202202		$ currentTokenOffset  = $ tokens ->currentTokenOffset ();
203203		$ currentTokenLine  = $ tokens ->currentTokenLine ();
204204
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- 
216205		try  {
217206			$ constExpr  = $ this  ->constExprParser ->parse ($ tokens );
218207			if  ($ constExpr  instanceof  Ast \ConstExpr \ConstExprArrayNode) {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments