Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function __invoke($data) |
||
16 | { |
||
17 | if (!is_string($data)) { |
||
18 | throw new InvalidArgumentException('The data argument provided is not a string.'); |
||
19 | } |
||
20 | |||
21 | if (!file_exists($data)) { |
||
22 | throw new RuntimeException('The file provided does not exist.'); |
||
23 | } |
||
24 | |||
25 | if (!is_file($data)) { |
||
26 | throw new RuntimeException('The file provided is not a regular file.'); |
||
27 | } |
||
30 |