@@ -53,13 +53,13 @@ |
||
| 53 | 53 | |
| 54 | 54 | public function doValidation(Response $response) |
| 55 | 55 | { |
| 56 | - $body = (string)$response->getBody(); |
|
| 56 | + $body = (string)$response->getBody(); |
|
| 57 | 57 | |
| 58 | 58 | $json = json_decode($body); |
| 59 | 59 | |
| 60 | - if(!$json) { |
|
| 61 | - throw new ValidationFailedException('The given json document is empty or not valid json.'); |
|
| 62 | - } |
|
| 60 | + if(!$json) { |
|
| 61 | + throw new ValidationFailedException('The given json document is empty or not valid json.'); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | 64 | $store = new JsonStore($json); |
| 65 | 65 | |
@@ -53,11 +53,11 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function doValidation(Response $response) |
| 55 | 55 | { |
| 56 | - $body = (string)$response->getBody(); |
|
| 56 | + $body = (string) $response->getBody(); |
|
| 57 | 57 | |
| 58 | 58 | $json = json_decode($body); |
| 59 | 59 | |
| 60 | - if(!$json) { |
|
| 60 | + if (!$json) { |
|
| 61 | 61 | throw new ValidationFailedException('The given json document is empty or not valid json.'); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -72,17 +72,17 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | if ($jsonValue === FALSE || (is_array($jsonValue) && empty($jsonValue))) { |
| 74 | 74 | $error = true; |
| 75 | - $noCorrectJsonPaths[] = $path['pattern'] . ' (JSON Path not found)'; |
|
| 75 | + $noCorrectJsonPaths[] = $path['pattern'].' (JSON Path not found)'; |
|
| 76 | 76 | } |
| 77 | 77 | if ($this->checkRelation($path['relation'], $path['value'], $count) === false) { |
| 78 | 78 | $error = true; |
| 79 | - $noCorrectJsonPaths[] = $path['pattern'] . ' (number of JSONPaths is not correct corresponding to the given relation/value)'; |
|
| 79 | + $noCorrectJsonPaths[] = $path['pattern'].' (number of JSONPaths is not correct corresponding to the given relation/value)'; |
|
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | if ($error === true) { |
| 84 | 84 | $allNoCorrectJsonPaths = implode('", "', $noCorrectJsonPaths); |
| 85 | - throw new ValidationFailedException('Disonances with JSON Paths "' . $allNoCorrectJsonPaths . '!'); |
|
| 85 | + throw new ValidationFailedException('Disonances with JSON Paths "'.$allNoCorrectJsonPaths.'!'); |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | } |