@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | $data = json_decode($response->getBody()); |
36 | 36 | if ($data === null) { |
37 | - throw new ValidationFailedException("The given JSON data can not be validated (last error: '" . $this->json_errors[json_last_error()] . "')."); |
|
37 | + throw new ValidationFailedException("The given JSON data can not be validated (last error: '".$this->json_errors[json_last_error()]."')."); |
|
38 | 38 | } else { |
39 | 39 | $errorStatus = false; |
40 | 40 | $messageParts = array(); |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | $errorStatus = true; |
51 | 51 | $errorMessage = ''; |
52 | 52 | foreach ($validator->getErrors() as $error) { |
53 | - $errorMessage = $errorMessage . sprintf("[%s] %s\n", $error['property'], $error['message']); |
|
53 | + $errorMessage = $errorMessage.sprintf("[%s] %s\n", $error['property'], $error['message']); |
|
54 | 54 | } |
55 | - $messageParts[] = $jsonSchemaFile['jsonfilename'] . ' - ' . $jsonSchemaFile['jsonfileurl'] . '(last error: ' . $errorMessage . ').'; |
|
55 | + $messageParts[] = $jsonSchemaFile['jsonfilename'].' - '.$jsonSchemaFile['jsonfileurl'].'(last error: '.$errorMessage.').'; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | 59 | if ($errorStatus === true) { |
60 | - $message = 'JSON file (' . (string) $response->getUri() . ') does not validate against the following JSON Schema files: ' . implode(', ', $messageParts); |
|
60 | + $message = 'JSON file ('.(string) $response->getUri().') does not validate against the following JSON Schema files: '.implode(', ', $messageParts); |
|
61 | 61 | throw new ValidationFailedException($message); |
62 | 62 | } |
63 | 63 | } |