We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.25 |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | 1 | public function validate($input): bool |
|
| 50 | { |
||
| 51 | 1 | if ($input instanceof SplFileInfo) { |
|
| 52 | return $this->validate($input->getPathname()); |
||
| 53 | } |
||
| 54 | |||
| 55 | 1 | if (!is_string($input)) { |
|
| 56 | 1 | return false; |
|
| 57 | } |
||
| 58 | |||
| 59 | 1 | if (!is_file($input)) { |
|
| 60 | return false; |
||
| 61 | } |
||
| 62 | |||
| 63 | 1 | return 0 === mb_strpos($this->fileInfo->file($input), 'image/'); |
|
| 64 | } |
||
| 66 |