Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
65 | 16 | public function match($position, $buffer) |
|
66 | { |
||
67 | 16 | foreach ($this->types as $search => $tokenType) { |
|
68 | 16 | if (substr($buffer, 0, strlen($search)) == $search) { |
|
69 | 16 | return new Token($tokenType, $search, $position); |
|
70 | } |
||
71 | } |
||
72 | |||
73 | 16 | return new Token(Token::T_CONTENT, $buffer[0], $position); |
|
74 | } |
||
75 | } |
||
76 |