@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | public function doValidation(ResponseInterface $response) |
56 | 56 | { |
57 | - $body = (string)$response->getBody(); |
|
57 | + $body = (string) $response->getBody(); |
|
58 | 58 | |
59 | 59 | $json = json_decode($body); |
60 | 60 | |
@@ -73,17 +73,17 @@ discard block |
||
73 | 73 | |
74 | 74 | if ($jsonValue === false || (is_array($jsonValue) && empty($jsonValue))) { |
75 | 75 | $error = true; |
76 | - $noCorrectJsonPaths[] = $path['pattern'] . ' (JSON path not found)'; |
|
76 | + $noCorrectJsonPaths[] = $path['pattern'].' (JSON path not found)'; |
|
77 | 77 | } |
78 | - if ($this->checkRelation($path['relation'], (int)$path['value'], $count) === false) { |
|
78 | + if ($this->checkRelation($path['relation'], (int) $path['value'], $count) === false) { |
|
79 | 79 | $error = true; |
80 | - $noCorrectJsonPaths[] = $path['pattern'] . ' (' . $count . ' elements found, expected ' . $path['relation'] . ' ' . $path['value'] . ')'; |
|
80 | + $noCorrectJsonPaths[] = $path['pattern'].' ('.$count.' elements found, expected '.$path['relation'].' '.$path['value'].')'; |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | 84 | if ($error === true) { |
85 | 85 | $allNoCorrectJsonPaths = implode('", "', $noCorrectJsonPaths); |
86 | - throw new ValidationFailedException('Disonances with JSON Paths "' . $allNoCorrectJsonPaths . '!'); |
|
86 | + throw new ValidationFailedException('Disonances with JSON Paths "'.$allNoCorrectJsonPaths.'!'); |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | } |