Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
73 | protected function openFile($filePath) |
||
74 | { |
||
75 | if (!is_file($filePath)) { |
||
76 | throw new \Exception('File does not exist: ' . $filePath); |
||
77 | } |
||
78 | |||
79 | $stream = @fopen($filePath, 'r'); |
||
80 | if (false === $stream) { |
||
81 | throw new \Exception('Unable to open file for read: ' . $filePath); |
||
82 | } |
||
83 | |||
84 | return $stream; |
||
85 | } |
||
86 | |||
110 |