| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | protected function format(string $method, $results, string $transformer, string $resource, array $relationships = [], array $fields = []): array { |
||
| 33 | $url = envValue('APP_URL', 'http://localhost'); |
||
| 34 | $manager = new Manager(); |
||
| 35 | $manager->setSerializer(new JsonApiSerializer($url)); |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Process relationships |
||
| 39 | */ |
||
| 40 | if (count($relationships) > 0) { |
||
| 41 | $manager->parseIncludes($relationships); |
||
| 42 | } |
||
| 43 | |||
| 44 | $class = sprintf('League\Fractal\Resource\%s', ucfirst($method)); |
||
| 45 | $resource = new $class($results, new $transformer($fields, $resource), $resource); |
||
| 46 | $results = $manager->createData($resource)->toArray(); |
||
| 47 | |||
| 48 | return $results; |
||
| 49 | } |
||
| 51 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths