We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 4 |
Paths | 6 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function validate($input) |
||
27 | { |
||
28 | if ($input instanceof SplFileInfo) { |
||
29 | $input = $input->getPathname(); |
||
30 | } |
||
31 | |||
32 | if (!is_string($input)) { |
||
33 | return false; |
||
34 | } |
||
35 | |||
36 | if (!is_file($input)) { |
||
37 | return false; |
||
38 | } |
||
39 | |||
40 | return 0 === mb_strpos($this->fileInfo->file($input), 'image/'); |
||
41 | } |
||
42 | } |
||
43 |