| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 26 | public function validate($response)  | 
            ||
| 27 |     { | 
            ||
| 28 |         if (!$response instanceof JsonApiResponse) { | 
            ||
| 29 | return false;  | 
            ||
| 30 | }  | 
            ||
| 31 | |||
| 32 |         if ($this->code !== $response->getCode()) { | 
            ||
| 33 | return false;  | 
            ||
| 34 | }  | 
            ||
| 35 | $value = json_decode(json_encode($response->getPayload()));  | 
            ||
| 36 | $this->schemaValidator->validate($value, json_decode($this->schema));  | 
            ||
| 37 | return $this->schemaValidator->isValid();  | 
            ||
| 38 | }  | 
            ||
| 39 | }  | 
            ||
| 40 |