| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 54 | 1 | public function countLines(\SplFileObject $file) |
|
| 55 | { |
||
| 56 | // Refresh file size |
||
| 57 | 1 | clearstatcache($file->getFilename()); |
|
| 58 | |||
| 59 | 1 | $previous = $file->key(); |
|
| 60 | |||
| 61 | 1 | $file->seek($file->getSize()); |
|
| 62 | |||
| 63 | 1 | $count = $file->key(); |
|
| 64 | |||
| 65 | 1 | $file->seek($previous); |
|
| 66 | |||
| 67 | 1 | return $count; |
|
| 68 | } |
||
| 69 | } |
||
| 70 |