| Total Complexity | 4 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | trait TokenTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Name of the token. |
||
| 14 | * |
||
| 15 | * @var null |
||
| 16 | */ |
||
| 17 | private $tokenName = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Group to which this token belongs (mostly for standard Library tokens). |
||
| 21 | * |
||
| 22 | * @var string|null |
||
| 23 | */ |
||
| 24 | private $tokenGroup = null; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Is this token the deepest node in this tree to report a token on? |
||
| 28 | * |
||
| 29 | * @var bool |
||
| 30 | */ |
||
| 31 | private $tokenIsTerminal = false; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $token |
||
| 35 | * @param string|null $group |
||
| 36 | * @param bool $isTerminal |
||
| 37 | * |
||
| 38 | * @return $this |
||
| 39 | */ |
||
| 40 | 43 | public function token($token, $group = null, $isTerminal = false) |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Has a token been set for this Parser? |
||
| 51 | * |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | 36 | public function hasToken() |
|
| 57 | } |
||
| 58 | |||
| 59 | 8 | private function resolveToken($input, $offset, $length, &$children, $class) |
|
| 68 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..