Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
17 | 216 | public function process(\Funivan\PhpTokenizer\Collection $collection, $currentIndex) { |
|
18 | |||
19 | 216 | $result = new StrategyResult(); |
|
20 | 216 | $result->setValid(true); |
|
21 | |||
22 | 216 | $token = $collection->offsetGet($currentIndex); |
|
23 | |||
24 | 216 | if ($token and $this->isValid($token)) { |
|
25 | 156 | $result->setToken($token); |
|
26 | 156 | ++$currentIndex; |
|
27 | } |
||
28 | |||
29 | 216 | $result->setNexTokenIndex($currentIndex); |
|
30 | |||
31 | 216 | return $result; |
|
32 | } |
||
33 | |||
34 | } |