| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 32 | public function parse(TokenStream $tokenStream) |
|
| 25 | { |
||
| 26 | 32 | if ($tokenStream->test(Token::T_GLOB)) { |
|
| 27 | 15 | return new Glob($tokenStream->next()->getValue()); |
|
| 28 | } |
||
| 29 | |||
| 30 | 17 | if ($tokenStream->nextIf(Token::T_TYPE, 'glob')) { |
|
| 31 | 1 | $tokenStream->expect(Token::T_COLON); |
|
| 32 | 1 | } |
|
| 33 | 17 | return new Glob(Glob::encode($tokenStream->expect(static::$allowedTypes)->getValue())); |
|
| 34 | } |
||
| 35 | } |
||
| 36 |