Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
48 | 4 | private function validate() |
|
49 | { |
||
50 | 4 | if ($this->path->isDirectory()) { |
|
51 | 1 | throw new InvalidPathException("Error, can't read content from a directory."); |
|
52 | } |
||
53 | |||
54 | 3 | if (!$this->isReadable()) { |
|
55 | 2 | throw new FileSystemException("Error, can't read the file. The file not exists or is not readable."); |
|
56 | } |
||
57 | 1 | } |
|
58 | } |
||
59 |