| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.9765 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 58 | 1 | protected function validateAndSend($schemaUri, $uri, \JsonSerializable $object) |
|
| 59 | { |
||
| 60 | 1 | $payload = json_encode($object); |
|
| 61 | 1 | $schema = Dereferencer::draft4()->dereference($schemaUri); |
|
|
|
|||
| 62 | $validator = new Validator(json_decode($payload), $schema); |
||
| 63 | |||
| 64 | if ($validator->fails()) { |
||
| 65 | throw new \Exception('Fails validation'); |
||
| 66 | } |
||
| 67 | |||
| 68 | return $this->getClient()->request('POST', $uri, [ |
||
| 69 | 'body' => $payload |
||
| 70 | ]); |
||
| 73 |
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