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