Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 11 |
Ratio | 100 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
31 | 1 | View Code Duplication | public static function findLastPositionInCurrentLine(PHP_CodeSniffer_File $file, int $position) : int |
32 | { |
||
33 | 1 | $currentPosition = $position; |
|
34 | |||
35 | 1 | $line = $file->getTokens()[$position]['line']; |
|
36 | 1 | while ($file->getTokens()[$currentPosition]['line'] === $line) { |
|
37 | 1 | $currentPosition++; |
|
38 | } |
||
39 | |||
40 | 1 | return $currentPosition; |
|
41 | } |
||
42 | |||
44 |