Completed
Push — master ( 9fadf4...ec31af )
by Welling
04:48
created
src/helpers.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,9 @@
 block discarded – undo
13 13
         $data = [];
14 14
         foreach ($array as $name => $value) {
15 15
             $row = ['name' => $name, 'value' => $value];
16
-            if (isset($keys)) $row = array_merge($row, $keys);
16
+            if (isset($keys)) {
17
+                $row = array_merge($row, $keys);
18
+            }
17 19
             array_push($data, $row);
18 20
         }
19 21
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     function sorting_by_key($key, $order = 'ASC')
48 48
     {
49
-        return function ($a, $b) use ($key, $order) {
49
+        return function($a, $b) use ($key, $order) {
50 50
             if ($a[$key] === $b[$key]) {
51 51
                 return 0;
52 52
             }
Please login to merge, or discard this patch.
src/BaseClientRemote.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -247,8 +247,8 @@
 block discarded – undo
247 247
     /**
248 248
      * Perform a HTTP Request
249 249
      *
250
-     * @param $method
251
-     * @param $path
250
+     * @param string $method
251
+     * @param string $path
252 252
      * @param array $params
253 253
      *
254 254
      * @return Entry|EntryCollection
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function isPsr7Version()
260 260
     {
261
-        return (bool) version_compare(HTTPClient::VERSION, '6.0.0', '>=');
261
+        return (bool)version_compare(HTTPClient::VERSION, '6.0.0', '>=');
262 262
     }
263 263
 
264 264
     /**
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
             $query = ArrayUtils::get($options, 'query');
372 372
             if ($query) {
373 373
                 $q = $request->getQuery();
374
-                foreach($query as $key => $value) {
374
+                foreach ($query as $key => $value) {
375 375
                     $q->set($key, $value);
376 376
                 }
377 377
             }
Please login to merge, or discard this patch.
phpunit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__.'/vendor/autoload.php';
3
+require __DIR__ . '/vendor/autoload.php';
Please login to merge, or discard this patch.
src/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $this->path = $path;
30 30
 
31
-        foreach($attributes as $attribute) {
31
+        foreach ($attributes as $attribute) {
32 32
             if (property_exists($this, $attribute)) {
33 33
                 $this->{$attribute} = $attribute;
34 34
             }
Please login to merge, or discard this patch.
src/Response/EntryCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         $rows = $this->pickRows($data);
48 48
         $items = [];
49
-        foreach($rows as $row) {
49
+        foreach ($rows as $row) {
50 50
             $items[] = new Entry($row);
51 51
         }
52 52
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     public function jsonSerialize()
170 170
     {
171
-        return (object) [
171
+        return (object)[
172 172
             'meta' => $this->metadata,
173 173
             'data' => $this->items
174 174
         ];
Please login to merge, or discard this patch.
src/Response/Entry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $data = $data['data'];
54 54
         }
55 55
 
56
-        foreach($data as $field => $value) {
56
+        foreach ($data as $field => $value) {
57 57
             if (isset($value['rows']) || (isset($value['data']) && ArrayUtils::isNumericKeys($value['data']))) {
58 58
                 $this->data[$field] = new EntryCollection($value);
59 59
             } else if (is_array($value)) {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function jsonSerialize()
135 135
     {
136
-        return (object) [
136
+        return (object)[
137 137
             'metadata' => $this->getMetaData(),
138 138
             'data' => $this->getData()
139 139
         ];
Please login to merge, or discard this patch.
src/ClientLocal.php 2 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * ClientLocal constructor.
49 49
      *
50
-     * @param $connection
50
+     * @param Connection $connection
51 51
      */
52 52
     public function __construct($connection)
53 53
     {
@@ -246,6 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
     /**
248 248
      * @inheritDoc
249
+     * @param string $tableName
249 250
      */
250 251
     public function createItem($tableName, array $data)
251 252
     {
@@ -265,6 +266,7 @@  discard block
 block discarded – undo
265 266
 
266 267
     /**
267 268
      * @inheritDoc
269
+     * @param string $tableName
268 270
      */
269 271
     public function updateItem($tableName, $id, array $data)
270 272
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         $tableGateway = $this->getTableGateway($tableName);
254 254
         $data = $this->processData($tableName, $data);
255 255
 
256
-        foreach($data as $key => $value) {
256
+        foreach ($data as $key => $value) {
257 257
             if ($value instanceof File) {
258 258
                 $data[$key] = $this->processFile($value);
259 259
             }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         $tableGateway = $this->getTableGateway($tableName);
273 273
         $data = $this->processData($tableName, $data);
274 274
 
275
-        foreach($data as $key => $value) {
275
+        foreach ($data as $key => $value) {
276 276
             if ($value instanceof File) {
277 277
                 $data[$key] = $this->processFile($value);
278 278
             }
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
         $success = $tableGateway->dropColumn($name);
638 638
 
639 639
         $response = [
640
-            'success' => (bool) $success
640
+            'success' => (bool)$success
641 641
         ];
642 642
 
643 643
         if (!$success) {
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
         $success = $tableGateway->drop();
667 667
 
668 668
         $response = [
669
-            'success' => (bool) $success
669
+            'success' => (bool)$success
670 670
         ];
671 671
 
672 672
         if (!$success) {
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
      */
695 695
     public function getRandom(array $options = [])
696 696
     {
697
-        $length = (int) ArrayUtils::get($options, 'length', 32);
697
+        $length = (int)ArrayUtils::get($options, 'length', 32);
698 698
 
699 699
         return $this->createResponseFromData([
700 700
             'success' => true,
Please login to merge, or discard this patch.
src/ClientRemote.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -195,6 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
     /**
197 197
      * @inheritdoc
198
+     * @param string $tableName
198 199
      */
199 200
     public function createItem($tableName, array $data)
200 201
     {
@@ -206,6 +207,7 @@  discard block
 block discarded – undo
206 207
 
207 208
     /**
208 209
      * @inheritdoc
210
+     * @param string $tableName
209 211
      */
210 212
     public function updateItem($tableName, $id, array $data)
211 213
     {
Please login to merge, or discard this patch.
src/ClientFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 'thumbnail_size', 'thumbnail_quality', 'thumbnail_crop_enabled'
215 215
             ]);
216 216
         });
217
-        $container->set('app.settings', function (Container $container) {
217
+        $container->set('app.settings', function(Container $container) {
218 218
             $DirectusSettingsTableGateway = new \Zend\Db\TableGateway\TableGateway('directus_settings', $container->get('zendDb'));
219 219
             $rowSet = $DirectusSettingsTableGateway->select();
220 220
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             return $settings;
227 227
         });
228 228
 
229
-        $container->singleton('hashManager', function () {
229
+        $container->singleton('hashManager', function() {
230 230
             return new HashManager();
231 231
         });
232 232
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $acl = $this->container->get('acl');
270 270
         $adapter = $this->container->get('connection');
271 271
 
272
-        $emitter->addAction('table.insert.directus_groups', function ($data) use ($acl, $adapter) {
272
+        $emitter->addAction('table.insert.directus_groups', function($data) use ($acl, $adapter) {
273 273
             $privilegesTable = new DirectDirectusPrivilegesTableGateway($adapter, $acl);
274 274
 
275 275
             $privilegesTable->insertPrivilege([
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             ]);
286 286
         });
287 287
 
288
-        $emitter->addFilter('table.insert.directus_files:before', function ($payload) {
288
+        $emitter->addFilter('table.insert.directus_files:before', function($payload) {
289 289
             unset($payload['data']);
290 290
             $payload['user'] = 1;
291 291
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         // Add file url and thumb url
296 296
         $config = $this->container->get('config');
297 297
         $files = $this->container->get('files');
298
-        $emitter->addFilter('table.select', function ($payload) use ($config, $files) {
298
+        $emitter->addFilter('table.select', function($payload) use ($config, $files) {
299 299
             $selectState = $payload->attribute('selectState');
300 300
 
301 301
             if ($selectState['table'] == 'directus_files') {
Please login to merge, or discard this patch.