Passed
Pull Request — master (#9)
by Steven
04:35
created
src/Concerns/AssertsOutput.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Concerns/InteractsWithApi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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'];
Please login to merge, or discard this patch.
src/Concerns/AssertsErrorFormat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Concerns/AssertPagination.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/DataGeneration/Rules/ArrayRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/DataGeneration/RuleCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             );
Please login to merge, or discard this patch.
src/DataGeneration/RuleParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Contracts/DeterminesAssertions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,4 +27,4 @@
 block discarded – undo
27 27
      * @return array
28 28
      */
29 29
     public function fieldsReplacement();
30
- }
30
+    }
Please login to merge, or discard this patch.
src/TestResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.