Skip to content

Commit 08df277

Browse files
committed
Fix Codacy complaints
1 parent 41aebb9 commit 08df277

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Assert.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public static function assertJsonMatchesSchema($schema, $content)
4646
$validator->check($content, $schema);
4747

4848
$message = '- Property: %s, Contraint: %s, Message: %s';
49-
$messages = array_map(function ($e) use ($message) {
50-
return sprintf($message, $e['property'], $e['constraint'], $e['message']);
49+
$messages = array_map(function ($exception) use ($message) {
50+
return sprintf($message, $exception['property'], $exception['constraint'], $exception['message']);
5151
}, $validator->getErrors());
5252
$messages[] = '- Response: '.json_encode($content);
5353

@@ -76,7 +76,8 @@ public static function assertJsonMatchesSchemaString($schema, $content)
7676
* static::assertJsonValueEquals(33, 'foo.bar[0]', $json);
7777
*
7878
* @param mixed $expected Expected value
79-
* @param string $expression Expression to retrieve the result (e.g. locations[?state == 'WA'].name | sort(@) | {WashingtonCities: join(', ', @)})
79+
* @param string $expression Expression to retrieve the result
80+
* (e.g. locations[?state == 'WA'].name | sort(@))
8081
* @param array|object $json JSON Content
8182
*/
8283
public static function assertJsonValueEquals($expected, $expression, $json)

0 commit comments

Comments
 (0)