@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | $this->isCollection = array_reduce( |
138 | 138 | $data, |
139 | - function ($carry, $item) { |
|
139 | + function($carry, $item) { |
|
140 | 140 | return $carry && is_array($item); |
141 | 141 | }, |
142 | 142 | true |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | return collect( |
151 | 151 | array_keys($this->requiredResponseHeaders()) |
152 | 152 | )->reduce( |
153 | - function ($carry, $index) use ($response){ |
|
153 | + function($carry, $index) use ($response){ |
|
154 | 154 | return $carry && $response->assertHeader($index, $this->requiredResponseHeaders()[$index]); |
155 | 155 | }, |
156 | 156 | true |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $data = json_decode($response->getContent(), true); |
52 | 52 | |
53 | 53 | if (!isset($data['data'])) { |
54 | - $this->fail('The response data is empty. Content: '. $response->getContent()); |
|
54 | + $this->fail('The response data is empty. Content: ' . $response->getContent()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return $data['data']; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $response->getContent(), |
34 | 34 | |
35 | 35 | 'Error response structure doesn\'t follow the template set up in ' |
36 | - .config('digitonic.api-test-suite.templates.base_path').' errors/{errorStatusCode}.blade.php.' |
|
36 | + .config('digitonic.api-test-suite.templates.base_path') . ' errors/{errorStatusCode}.blade.php.' |
|
37 | 37 | ); |
38 | 38 | } |
39 | 39 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | )->render() . "/", |
40 | 40 | $response->getContent(), |
41 | 41 | 'Pagination response structure doesn\'t follow the template set up in ' |
42 | - .config('digitonic.api-test-suite.templates.base_path').' pagination/pagination.blade.php.' |
|
42 | + .config('digitonic.api-test-suite.templates.base_path') . ' pagination/pagination.blade.php.' |
|
43 | 43 | ); |
44 | 44 | } |
45 | 45 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | $payload[$field] = []; |
14 | 14 | $relatedFields = collect($rules)->filter( |
15 | - function ($item, $index) use ($field) { |
|
15 | + function($item, $index) use ($field) { |
|
16 | 16 | return strpos($index, $field . '.') !== false; |
17 | 17 | } |
18 | 18 | )->toArray(); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | public function generate(array &$payload, $field, array $rules, $newSeedValue, $class, $user) |
18 | 18 | { |
19 | 19 | $toBeApplied = $this->filter( |
20 | - function ($item) { |
|
20 | + function($item) { |
|
21 | 21 | if ($item instanceof RequiredRule) { |
22 | 22 | $this->required = true; |
23 | 23 | } else { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | if (/*$this->required &&*/ |
30 | 30 | strpos($field, '.') === false) { |
31 | 31 | $toBeApplied->each( |
32 | - function (Rule $rule) use (&$payload, $field, $rules, $newSeedValue, $class, $user) { |
|
32 | + function(Rule $rule) use (&$payload, $field, $rules, $newSeedValue, $class, $user) { |
|
33 | 33 | $rule->handle($payload, $field, $rules, $newSeedValue, $class, $user); |
34 | 34 | } |
35 | 35 | ); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | usort( |
38 | 38 | $rulesArray, |
39 | - function ($a, $b) { |
|
39 | + function($a, $b) { |
|
40 | 40 | $aName = $this->getRuleName($a); |
41 | 41 | $aWeight = isset(self::RULE_ORDER[$aName]) ? self::RULE_ORDER[$aName] : 50; |
42 | 42 | $bName = $this->getRuleName($b); |
@@ -27,4 +27,4 @@ |
||
27 | 27 | * @return array |
28 | 28 | */ |
29 | 29 | public function fieldsReplacement(); |
30 | - } |
|
30 | + } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | PHPUnit::assertTrue( |
19 | 19 | $actual === $status, |
20 | - "Expected status code {$status} but received {$actual}. Response content: \n". |
|
20 | + "Expected status code {$status} but received {$actual}. Response content: \n" . |
|
21 | 21 | print_r($this->responseContent(), true) |
22 | 22 | ); |
23 | 23 |