We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 7 |
| Paths | 6 |
| Total Lines | 27 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | protected function filterCrudControllerPaths(array $paths, ?callable $contentsValidator = null): array |
||
| 16 | { |
||
| 17 | if (empty($paths)) { |
||
| 18 | return []; |
||
| 19 | } |
||
| 20 | |||
| 21 | $filtered = []; |
||
| 22 | |||
| 23 | foreach ($paths as $path) { |
||
| 24 | if (! $this->isCrudControllerPath($path)) { |
||
| 25 | continue; |
||
| 26 | } |
||
| 27 | |||
| 28 | $contents = $this->context()->readFile($path); |
||
| 29 | |||
| 30 | if ($contents === null) { |
||
| 31 | continue; |
||
| 32 | } |
||
| 33 | |||
| 34 | if ($contentsValidator !== null && $contentsValidator($contents, $path) !== true) { |
||
| 35 | continue; |
||
| 36 | } |
||
| 37 | |||
| 38 | $filtered[] = $path; |
||
| 39 | } |
||
| 40 | |||
| 41 | return $filtered; |
||
| 42 | } |
||
| 74 |