| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2.0185 |
| Changes | 2 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 66 | 4 | public function process(\Funivan\PhpTokenizer\Collection $collection, $currentIndex) { |
|
| 67 | 4 | $result = new StrategyResult(); |
|
| 68 | |||
| 69 | 4 | $endIndex = $currentIndex + $this->steps; |
|
| 70 | |||
| 71 | 4 | $result->setNexTokenIndex($endIndex); |
|
| 72 | 4 | if (isset($collection[$endIndex])) { |
|
| 73 | 4 | $result->setValid(true); |
|
| 74 | 4 | $result->setToken($collection[$endIndex]); |
|
| 75 | 2 | } else { |
|
| 76 | 4 | $result->setValid(false); |
|
| 77 | } |
||
| 78 | |||
| 79 | 4 | return $result; |
|
| 80 | } |
||
| 81 | |||
| 82 | } |