Conditions | 2 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 1 | public static function findNextEmptyLinePosition(PHP_CodeSniffer_File $file, int $position) : int |
|
19 | { |
||
20 | 1 | $tokens = $file->getTokens(); |
|
21 | |||
22 | 1 | $currentLine = $tokens[$position]['line']; |
|
23 | 1 | $nextLinePosition = $position; |
|
24 | do { |
||
25 | 1 | ++$nextLinePosition; |
|
26 | 1 | $nextLine = $tokens[$nextLinePosition]['line']; |
|
27 | 1 | } while ($currentLine === $nextLine); |
|
28 | |||
29 | 1 | return $nextLinePosition; |
|
30 | } |
||
31 | |||
33 |