| Total Complexity | 8 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class TokenReader implements TokenReaderInterface |
||
| 11 | { |
||
| 12 | private $buffer; |
||
| 13 | |||
| 14 | private $matcher; |
||
| 15 | |||
| 16 | private $isEnd = false; |
||
| 17 | |||
| 18 | private $tokenFactory; |
||
| 19 | |||
| 20 | public function __construct( |
||
| 21 | CharBufferInterface $buffer, |
||
| 22 | TokenMatcherInterface $matcher, |
||
| 23 | TokenFactoryInterface $tokenFactory |
||
| 24 | ) { |
||
| 25 | $this->buffer = $buffer; |
||
| 26 | $this->matcher = $matcher; |
||
| 27 | $this->tokenFactory = $tokenFactory; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return Token |
||
| 32 | * @throws Exception |
||
| 33 | */ |
||
| 34 | public function read(): Token |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return Token |
||
| 45 | * @throws Exception |
||
| 46 | */ |
||
| 47 | private function matchEoiToken(): Token |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return Token |
||
| 58 | * @throws Exception |
||
| 59 | */ |
||
| 60 | private function matchSymbolToken(): Token |
||
| 73 |