Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | function readJson(string $service, string $file): array |
||
21 | { |
||
22 | $file = __DIR__ . '/responses/' . $service . '/' . $file . '.json'; |
||
23 | |||
24 | if (!file_exists($file)) { |
||
25 | throw new InvalidArgumentException('Invalid argument provided for json file.'); |
||
26 | } |
||
27 | |||
28 | try { |
||
29 | return json_decode( |
||
30 | file_get_contents($file), true, 512, JSON_THROW_ON_ERROR |
||
31 | ); |
||
32 | } catch (JsonException $exception) { |
||
|
|||
33 | throw new \Exception('Invalid JSON provided.'); |
||
34 | } |
||
35 | } |
||
36 |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.