| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | private function getFileContent($filename, $lineNumber) |
||
| 56 | { |
||
| 57 | if ( ! is_file($filename)) { |
||
| 58 | return null; |
||
| 59 | } |
||
| 60 | |||
| 61 | $content = ''; |
||
| 62 | $lineCnt = 0; |
||
| 63 | $file = new SplFileObject($filename); |
||
| 64 | while (!$file->eof()) { |
||
| 65 | if ($lineCnt++ == $lineNumber) { |
||
| 66 | break; |
||
| 67 | } |
||
| 68 | |||
| 69 | $content .= $file->fgets(); |
||
| 70 | } |
||
| 71 | |||
| 72 | return $content; |
||
| 73 | } |
||
| 75 |