Passed
Push — devel-3.0 ( 31a38b...724b66 )
by Rubén
03:28
created
lib/Definitions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 return [
45 45
     Request::class => \DI\create(Request::class)
46 46
         ->constructor(\Klein\Request::createFromGlobals()),
47
-    ContextInterface::class => function (ContainerInterface $c) {
47
+    ContextInterface::class => function(ContainerInterface $c) {
48 48
         switch (APP_MODULE) {
49 49
             case 'web':
50 50
                 return $c->get(\SP\Core\Context\SessionContext::class);
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
                 return $c->get(\SP\Core\Context\StatelessContext::class);
53 53
         }
54 54
     },
55
-    Config::class => function (ContainerInterface $c) {
55
+    Config::class => function(ContainerInterface $c) {
56 56
         return new Config(new XmlHandler(new FileHandler(CONFIG_FILE)), $c->get(ContextInterface::class), $c);
57 57
     },
58
-    ConfigData::class => function (Config $config) {
58
+    ConfigData::class => function(Config $config) {
59 59
         return $config->getConfigData();
60 60
     },
61 61
     DBStorageInterface::class => \DI\create(MySQLHandler::class)
62 62
         ->constructor(\DI\factory([DatabaseConnectionData::class, 'getFromConfig'])),
63
-    Actions::class => function (ContainerInterface $c) {
63
+    Actions::class => function(ContainerInterface $c) {
64 64
         return new Actions($c->get(FileCache::class), new XmlHandler(new FileHandler(ACTIONS_FILE)));
65 65
     },
66 66
     Acl::class => \DI\autowire(Acl::class)
Please login to merge, or discard this patch.
lib/SP/Core/Context/ContextBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
             return;
113 113
         }
114 114
 
115
-        $this->context =& $context['context'];
115
+        $this->context = & $context['context'];
116 116
     }
117 117
 
118 118
     /**
Please login to merge, or discard this patch.
lib/SP/Core/Events/EventMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
             return '';
217 217
         }
218 218
 
219
-        return implode(PHP_EOL, array_map(function ($detail) use ($translate) {
219
+        return implode(PHP_EOL, array_map(function($detail) use ($translate) {
220 220
             return $this->formatDetail($detail, $translate);
221 221
         }, $this->details));
222 222
     }
Please login to merge, or discard this patch.
lib/SP/Core/Messages/LogMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
 
219 219
         if (count($this->details) > 1) {
220 220
             if ($translate === true) {
221
-                return implode(PHP_EOL, array_map(function ($detail) use ($translate) {
221
+                return implode(PHP_EOL, array_map(function($detail) use ($translate) {
222 222
                     return $this->formatDetail($detail, $translate);
223 223
                 }, $this->details));
224 224
             }
Please login to merge, or discard this patch.
lib/SP/Html/DataGrid/DataGridActionBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
     public function setRuntimeFilter($class, $method)
151 151
     {
152 152
         if (method_exists($class, $method)) {
153
-            $this->_runtimeFilter = function ($filter) use ($method) {
153
+            $this->_runtimeFilter = function($filter) use ($method) {
154 154
 //                new \ReflectionMethod($class, $method);
155 155
                 return $filter->{$method}();
156 156
             };
Please login to merge, or discard this patch.
lib/SP/Util/Filter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      */
63 63
     public static function getArray(array $array): array
64 64
     {
65
-        return array_map(function ($value) {
65
+        return array_map(function($value) {
66 66
             if ($value !== null) {
67 67
                 if (is_numeric($value)) {
68 68
                     return Filter::getInt($value);
Please login to merge, or discard this patch.
lib/SP/Util/Util.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         /**
70 70
          * @return array
71 71
          */
72
-        $passGen = function () use ($alphabet, $length) {
72
+        $passGen = function() use ($alphabet, $length) {
73 73
             $pass = [];
74 74
             $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
75 75
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
         $appTmp = APP_PATH . DIRECTORY_SEPARATOR . 'temp';
274 274
         $file = 'syspass.test';
275 275
 
276
-        $checkDir = function ($dir) use ($file) {
276
+        $checkDir = function($dir) use ($file) {
277 277
             if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) {
278 278
                 return $dir;
279 279
             }
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
      */
482 482
     public static function arrayJSEscape(&$array)
483 483
     {
484
-        array_walk($array, function (&$value) {
484
+        array_walk($array, function(&$value) {
485 485
             $value = str_replace(['\'', '"'], '\\\'', $value);
486 486
         });
487 487
         return $array;
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
             if ($srcClass !== null) {
514 514
                 $serializedOut = preg_replace_callback(
515 515
                     '/:\d+:"\x00' . preg_quote($srcClass, '/') . '\x00(\w+)"/',
516
-                    function ($matches) {
516
+                    function($matches) {
517 517
                         return ':' . strlen($matches[1]) . ':"' . $matches[1] . '"';
518 518
                     },
519 519
                     $serialized);
Please login to merge, or discard this patch.
lib/SP/Util/FileUtil.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,11 @@
 block discarded – undo
60 60
         $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST);
61 61
 
62 62
         foreach ($it as $file) {
63
-            if ($file->isDir()) rmdir($file->getPathname());
64
-            else unlink($file->getPathname());
63
+            if ($file->isDir()) {
64
+                rmdir($file->getPathname());
65
+            } else {
66
+                unlink($file->getPathname());
67
+            }
65 68
         }
66 69
 
67 70
         return rmdir($dir);
Please login to merge, or discard this patch.
lib/SP/Util/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     {
85 85
         if (is_array($data) || is_object($data)) {
86 86
             array_walk_recursive($data,
87
-                function (&$value) {
87
+                function(&$value) {
88 88
                     if (is_object($value)) {
89 89
                         foreach ($value as &$attribute) {
90 90
                             if (is_string($attribute) && $attribute !== '') {
Please login to merge, or discard this patch.