| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 85 | public function getTokenAt($code, $cursor) |
|
| 27 | { |
||
| 28 | 85 | if (!preg_match('/(=[a-z]\w*=|==|!=|<>|>=|<=|<|>|==|=)/Ai', $code, $matches, null, $cursor)) { |
|
| 29 | 85 | return null; |
|
| 30 | } |
||
| 31 | |||
| 32 | 11 | return new Token( |
|
| 33 | 11 | Token::T_OPERATOR, |
|
| 34 | 11 | $this->getValue($matches[0]), |
|
| 35 | 11 | $cursor, |
|
| 36 | 11 | $cursor + strlen($matches[0]) |
|
| 37 | 11 | ); |
|
| 38 | } |
||
| 39 | |||
| 49 |