Completed
Push — master ( ae75f4...5b5380 )
by Toby
67:07
created
src/ErrorHandler.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
             }
40 40
         }
41 41
 
42
-        throw new RuntimeException('Exception handler for '.get_class($e).' not found.');
42
+        throw new RuntimeException('Exception handler for ' . get_class($e) . ' not found.');
43 43
     }
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
src/Document.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $document = [];
161 161
 
162
-        if (! empty($this->links)) {
162
+        if (!empty($this->links)) {
163 163
             $document['links'] = $this->links;
164 164
         }
165 165
 
166
-        if (! empty($this->data)) {
166
+        if (!empty($this->data)) {
167 167
             $document['data'] = $this->data->toArray();
168 168
 
169 169
             $resources = $this->getIncluded($this->data);
@@ -175,15 +175,15 @@  discard block
 block discarded – undo
175 175
             }
176 176
         }
177 177
 
178
-        if (! empty($this->meta)) {
178
+        if (!empty($this->meta)) {
179 179
             $document['meta'] = $this->meta;
180 180
         }
181 181
 
182
-        if (! empty($this->errors)) {
182
+        if (!empty($this->errors)) {
183 183
             $document['errors'] = $this->errors;
184 184
         }
185 185
 
186
-        if (! empty($this->jsonapi)) {
186
+        if (!empty($this->jsonapi)) {
187 187
             $document['jsonapi'] = $this->jsonapi;
188 188
         }
189 189
 
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $resources = [];
42 42
 
43 43
         foreach ($data as $resource) {
44
-            if (! ($resource instanceof Resource)) {
44
+            if (!($resource instanceof Resource)) {
45 45
                 $resource = new Resource($resource, $serializer);
46 46
             }
47 47
 
Please login to merge, or discard this patch.
src/LinksTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     protected function addPaginationLink($name, $url, array $queryParams, $offset, $limit)
100 100
     {
101
-        if (! isset($queryParams['page']) || ! is_array($queryParams['page'])) {
101
+        if (!isset($queryParams['page']) || !is_array($queryParams['page'])) {
102 102
             $queryParams['page'] = [];
103 103
         }
104 104
 
@@ -124,6 +124,6 @@  discard block
 block discarded – undo
124 124
 
125 125
         $queryString = http_build_query($queryParams);
126 126
 
127
-        $this->addLink($name, $url.($queryString ? '?'.$queryString : ''));
127
+        $this->addLink($name, $url . ($queryString ? '?' . $queryString : ''));
128 128
     }
129 129
 }
Please login to merge, or discard this patch.
src/Util.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         foreach ($paths as $path) {
36 36
             list($primary, $nested) = array_pad(explode('.', $path, 2), 2, null);
37 37
 
38
-            if (! isset($tree[$primary])) {
38
+            if (!isset($tree[$primary])) {
39 39
                 $tree[$primary] = [];
40 40
             }
41 41
 
Please login to merge, or discard this patch.
src/Parameters.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             $invalid = array_diff($relationships, $available);
44 44
 
45 45
             if (count($invalid)) {
46
-                throw new InvalidParameterException('Invalid includes ['.implode(',', $invalid).']');
46
+                throw new InvalidParameterException('Invalid includes [' . implode(',', $invalid) . ']');
47 47
             }
48 48
 
49 49
             return $relationships;
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             $invalid = array_diff(array_keys($sort), $available);
138 138
 
139 139
             if (count($invalid)) {
140
-                throw new InvalidParameterException('Invalid sort fields ['.implode(',', $invalid).']');
140
+                throw new InvalidParameterException('Invalid sort fields [' . implode(',', $invalid) . ']');
141 141
             }
142 142
         }
143 143
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     {
154 154
         $fields = $this->getInput('fields');
155 155
 
156
-        if (! is_array($fields)) {
156
+        if (!is_array($fields)) {
157 157
             return [];
158 158
         }
159 159
 
Please login to merge, or discard this patch.
src/AbstractSerializer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         if (method_exists($this, $name)) {
61 61
             $relationship = $this->$name($model);
62 62
 
63
-            if ($relationship !== null && ! ($relationship instanceof Relationship)) {
63
+            if ($relationship !== null && !($relationship instanceof Relationship)) {
64 64
                 throw new LogicException('Relationship method must return null or an instance of '
65 65
                     .Relationship::class);
66 66
             }
Please login to merge, or discard this patch.
src/Relationship.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,15 +65,15 @@
 block discarded – undo
65 65
     {
66 66
         $array = [];
67 67
 
68
-        if (! empty($this->data)) {
68
+        if (!empty($this->data)) {
69 69
             $array['data'] = $this->data->toIdentifier();
70 70
         }
71 71
 
72
-        if (! empty($this->meta)) {
72
+        if (!empty($this->meta)) {
73 73
             $array['meta'] = $this->meta;
74 74
         }
75 75
 
76
-        if (! empty($this->links)) {
76
+        if (!empty($this->links)) {
77 77
             $array['links'] = $this->links;
78 78
         }
79 79
 
Please login to merge, or discard this patch.
src/Resource.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
         }
82 82
 
83 83
         $links = [];
84
-        if (! empty($this->links)) {
84
+        if (!empty($this->links)) {
85 85
             $links = $this->links;
86 86
         }
87 87
         $serializerLinks = $this->serializer->getLinks($this->data);
88
-        if (! empty($serializerLinks)) {
88
+        if (!empty($serializerLinks)) {
89 89
             $links = array_merge($serializerLinks, $links);
90 90
         }
91
-        if (! empty($links)) {
91
+        if (!empty($links)) {
92 92
             $array['links'] = $links;
93 93
         }
94 94
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function isIdentifier()
105 105
     {
106
-        return ! is_object($this->data) && ! is_array($this->data);
106
+        return !is_object($this->data) && !is_array($this->data);
107 107
     }
108 108
 
109 109
     /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             'id' => $this->getId()
117 117
         ];
118 118
 
119
-        if (! empty($this->meta)) {
119
+        if (!empty($this->meta)) {
120 120
             $array['meta'] = $this->meta;
121 121
         }
122 122
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function getId()
142 142
     {
143
-        if (! is_object($this->data) && ! is_array($this->data)) {
143
+        if (!is_object($this->data) && !is_array($this->data)) {
144 144
             return (string) $this->data;
145 145
         }
146 146
 
Please login to merge, or discard this patch.