| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | public function process(FileInfo $file, Report $report) { |
||
| 36 | $tokens = $this->findTokens($file); |
||
| 37 | |||
| 38 | if ($tokens->count() === 0) { |
||
| 39 | return; |
||
| 40 | } |
||
| 41 | |||
| 42 | $lines = []; |
||
| 43 | foreach ($tokens as $token) { |
||
| 44 | $line = $token->getLine(); |
||
| 45 | $line++; # Our token start in previous line |
||
| 46 | if (isset($lines[$line])) { |
||
| 47 | continue; |
||
| 48 | } |
||
| 49 | |||
| 50 | $lines[$line] = true; |
||
| 51 | |||
| 52 | $report->addError($file, $this, 'File contains empty lines with spaces.', $line); |
||
| 53 | } |
||
| 54 | |||
| 55 | } |
||
| 56 | |||
| 57 | } |