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