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