Test Failed
Branch master (0ea1c2)
by Mike
31:02 queued 10:14
created
plugins/files/php/plugin.files.php 2 patches
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -49,39 +49,39 @@
 block discarded – undo
49 49
 
50 50
             case 'server.index.load.custom':
51 51
                 switch ($data['name']) {
52
-                case 'files_get_recipients':
53
-                    RecipientHandler::doGetRecipients();
52
+                    case 'files_get_recipients':
53
+                        RecipientHandler::doGetRecipients();
54 54
 
55
-                    break;
55
+                        break;
56 56
 
57
-                case 'download_file':
58
-                    DownloadHandler::doDownload();
57
+                    case 'download_file':
58
+                        DownloadHandler::doDownload();
59 59
 
60
-                    break;
60
+                        break;
61 61
 
62
-                case 'upload_file':
63
-                    UploadHandler::doUpload();
62
+                    case 'upload_file':
63
+                        UploadHandler::doUpload();
64 64
 
65
-                    break;
65
+                        break;
66 66
 
67
-                case 'form':
68
-                    if (isset($_GET['backend'])) {
69
-                        $backend = urldecode($_GET['backend']);
70
-                    } else {
71
-                        $backend = '';
72
-                    }
73
-                    $backendstore = Files\Backend\BackendStore::getInstance();
67
+                    case 'form':
68
+                        if (isset($_GET['backend'])) {
69
+                            $backend = urldecode($_GET['backend']);
70
+                        } else {
71
+                            $backend = '';
72
+                        }
73
+                        $backendstore = Files\Backend\BackendStore::getInstance();
74 74
 
75
-                    if ($backendstore->backendExists($backend)) {
76
-                        $backendInstance = $backendstore->getInstanceOfBackend($backend);
77
-                        $formdata = $backendInstance->getFormConfig();
75
+                        if ($backendstore->backendExists($backend)) {
76
+                            $backendInstance = $backendstore->getInstanceOfBackend($backend);
77
+                            $formdata = $backendInstance->getFormConfig();
78 78
 
79
-                        exit($formdata);
80
-                    }
79
+                            exit($formdata);
80
+                        }
81 81
 
82
-                        exit('Specified backend does not exist!');
82
+                            exit('Specified backend does not exist!');
83 83
 
84
-                    break;
84
+                        break;
85 85
             }
86 86
 
87 87
             break;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
                         'notifier' => [
103 103
                             'info' => [
104 104
                                 'files' => [
105
-                                    'value' => 'dropdown',        // static notifier
105
+                                    'value' => 'dropdown', // static notifier
106 106
                                 ],
107 107
                             ],
108 108
                         ],
Please login to merge, or discard this patch.
plugins/files/php/lib/phpfastcache/lib/Phpfastcache/CacheManager.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $config = self::validateConfig($config);
160 160
         $driver = self::standardizeDriverName($driver);
161 161
 
162
-        $instanceId = $instanceId ?: md5($driver . \serialize(\array_filter($config->toArray(), static function ($val) {
162
+        $instanceId = $instanceId ?: md5($driver . \serialize(\array_filter($config->toArray(), static function($val) {
163 163
             return !\is_callable($val);
164 164
         })));
165 165
 
@@ -181,9 +181,7 @@  discard block
 block discarded – undo
181 181
            See https://github.com/PHPSocialNetwork/phpfastcache/wiki/[V5]-Why-calling-getInstance%28%29-each-time-is-a-bad-practice-%3F'
182 182
                 );
183 183
             }
184
-        }
185
-
186
-        ++self::$badPracticeOmeter[$driver];
184
+        }++self::$badPracticeOmeter[$driver];
187 185
 
188 186
         return self::$instances[$instanceId];
189 187
     }
@@ -237,7 +235,7 @@  discard block
 block discarded – undo
237 235
         $found = false;
238 236
         self::$instances = \array_filter(
239 237
             \array_map(
240
-                static function (ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
238
+                static function(ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
241 239
                     if (\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)) {
242 240
                         $found = true;
243 241
 
Please login to merge, or discard this patch.
Cluster/Drivers/MasterSlaveReplication/MasterSlaveReplicationCluster.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function getItem($key) {
51 51
         return $this->getStandardizedItem(
52 52
             $this->makeOperation(
53
-                static function (ExtendedCacheItemPoolInterface $pool) use ($key) {
53
+                static function(ExtendedCacheItemPoolInterface $pool) use ($key) {
54 54
                     return $pool->getItem($key);
55 55
                 }
56 56
             ) ?? new Item($this, $key),
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function hasItem($key) {
65 65
         return $this->makeOperation(
66
-            static function (ExtendedCacheItemPoolInterface $pool) use ($key) {
66
+            static function(ExtendedCacheItemPoolInterface $pool) use ($key) {
67 67
                 return $pool->hasItem($key);
68 68
             }
69 69
         );
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function clear() {
76 76
         return $this->makeOperation(
77
-            static function (ExtendedCacheItemPoolInterface $pool) {
77
+            static function(ExtendedCacheItemPoolInterface $pool) {
78 78
                 return $pool->clear();
79 79
             }
80 80
         );
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function deleteItem($key) {
87 87
         return $this->makeOperation(
88
-            static function (ExtendedCacheItemPoolInterface $pool) use ($key) {
88
+            static function(ExtendedCacheItemPoolInterface $pool) use ($key) {
89 89
                 return $pool->deleteItem($key);
90 90
             }
91 91
         );
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function save(CacheItemInterface $item) {
98 98
         return $this->makeOperation(
99
-            function (ExtendedCacheItemPoolInterface $pool) use ($item) {
99
+            function(ExtendedCacheItemPoolInterface $pool) use ($item) {
100 100
                 $item->setHit(true);
101 101
 
102 102
                 return $pool->save($this->getStandardizedItem($item, $pool));
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function commit() {
111 111
         return $this->makeOperation(
112
-            static function (ExtendedCacheItemPoolInterface $pool) {
112
+            static function(ExtendedCacheItemPoolInterface $pool) {
113 113
                 return $pool->commit();
114 114
             }
115 115
         );
Please login to merge, or discard this patch.
files/php/lib/phpfastcache/lib/Phpfastcache/Cluster/ClusterPoolAbstract.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                 \implode(
151 151
                     ', ',
152 152
                     \array_map(
153
-                        static function (ExtendedCacheItemPoolInterface $pool) {
153
+                        static function(ExtendedCacheItemPoolInterface $pool) {
154 154
                             return \get_class($pool);
155 155
                         },
156 156
                         $this->clusterPools
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $stats->setSize(
163 163
             (int) \array_sum(
164 164
                 \array_map(
165
-                    static function (ExtendedCacheItemPoolInterface $pool) {
165
+                    static function(ExtendedCacheItemPoolInterface $pool) {
166 166
                         return $pool->getStats()->getSize();
167 167
                     },
168 168
                     $this->clusterPools
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
         $stats->setData(
174 174
             (int) \array_map(
175
-                static function (ExtendedCacheItemPoolInterface $pool) {
175
+                static function(ExtendedCacheItemPoolInterface $pool) {
176 176
                     return $pool->getStats()->getData();
177 177
                 },
178 178
                 $this->clusterPools
Please login to merge, or discard this patch.
plugins/files/php/lib/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
 
149 149
         try {
150 150
             return \array_map(
151
-                static function (ExtendedCacheItemInterface $item) use ($default) {
151
+                static function(ExtendedCacheItemInterface $item) use ($default) {
152 152
                     return $item->isHit() ? $item->get() : $default;
153 153
                 },
154 154
                 $this->internalCacheInstance->getItems($keys)
Please login to merge, or discard this patch.
files/php/lib/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Driver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             )
93 93
         )->toArray()[0];
94 94
 
95
-        $array_filter_recursive = static function ($array, callable $callback = null) use (&$array_filter_recursive) {
95
+        $array_filter_recursive = static function($array, callable $callback = null) use (&$array_filter_recursive) {
96 96
             $array = $callback($array);
97 97
 
98 98
             if (\is_object($array) || \is_array($array)) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             return $array;
105 105
         };
106 106
 
107
-        $callback = static function ($item) {
107
+        $callback = static function($item) {
108 108
             /*
109 109
              * Remove unserializable properties
110 110
              */
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
             $this->database->selectCollection($collectionName)
266 266
                 ->createIndex(
267 267
                     [self::DRIVER_EDATE_WRAPPER_INDEX => 1],
268
-                    ['expireAfterSeconds' => 0,  'name' => 'auto_expire_index']
268
+                    ['expireAfterSeconds' => 0, 'name' => 'auto_expire_index']
269 269
                 )
270 270
             ;
271 271
         }
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
         if (count($servers) > 0) {
295 295
             $host = array_reduce(
296 296
                 $servers,
297
-                static function ($carry, $data) {
297
+                static function($carry, $data) {
298 298
                     $carry .= ('' === $carry ? '' : ',') . $data['host'] . ':' . $data['port'];
299 299
 
300 300
                     return $carry;
Please login to merge, or discard this patch.
plugins/files/php/lib/phpfastcache/lib/Phpfastcache/Autoload/Autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
  * Register Autoload
27 27
  */
28 28
 spl_autoload_register(
29
-    static function ($entity): void {
29
+    static function($entity): void {
30 30
         $module = explode('\\', $entity, 2);
31 31
         if (!\in_array($module[0], ['Phpfastcache', 'Psr'])) {
32 32
             /*
Please login to merge, or discard this patch.
lib/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolTrait.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
      * {@inheritdoc}
34 34
      */
35 35
     public function getItemsAsJsonString(array $keys = [], int $option = 0, int $depth = 512): string {
36
-        $callback = static function (CacheItemInterface $item) {
36
+        $callback = static function(CacheItemInterface $item) {
37 37
             return $item->get();
38 38
         };
39 39
 
Please login to merge, or discard this patch.
lib/phpfastcache/lib/Phpfastcache/Core/Pool/TaggableCacheItemPoolTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * {@inheritdoc}
31 31
      */
32 32
     public function getItemsByTagsAsJsonString(array $tagNames, int $option = 0, int $depth = 512, int $strategy = TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE): string {
33
-        $callback = static function (CacheItemInterface $item) {
33
+        $callback = static function(CacheItemInterface $item) {
34 34
             return $item->get();
35 35
         };
36 36
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                  */
272 272
                 return \array_filter(
273 273
                     $this->getItems(\array_unique(\array_keys($tagsItems))),
274
-                    static function (ExtendedCacheItemInterface $item) {
274
+                    static function(ExtendedCacheItemInterface $item) {
275 275
                         return $item->isHit();
276 276
                     }
277 277
                 );
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
     protected function getTagKeys(array $keys): array {
378 378
         return \array_map(
379
-            function (string $key) {
379
+            function(string $key) {
380 380
                 return $this->getTagKey($key);
381 381
             },
382 382
             $keys
Please login to merge, or discard this patch.