Passed
Pull Request — master (#123)
by Arman
05:42 queued 02:39
created
src/Router/Router.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $this->findPatternMatches($uri);
100 100
 
101 101
         if (!count($this->matchedRoutes)) {
102
-            stop(function () {
102
+            stop(function() {
103 103
                 $this->response->html(partial('errors/404'), 404);
104 104
             });
105 105
         }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         if (filter_var(config()->get(Debugger::DEBUG_ENABLED), FILTER_VALIDATE_BOOLEAN)) {
120 120
             $routeInfo = [];
121 121
 
122
-            array_walk($matchedRoute, function ($value, $key) use (&$routeInfo) {
122
+            array_walk($matchedRoute, function($value, $key) use (&$routeInfo) {
123 123
                 $routeInfo[ucfirst($key)] = json_encode($value);
124 124
             });
125 125
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         $routePattern = '(\/)?';
194 194
         $routeParams = [];
195 195
 
196
-        $lastIndex = (int)array_key_last($routeSegments);
196
+        $lastIndex = (int) array_key_last($routeSegments);
197 197
 
198 198
         foreach ($routeSegments as $index => $segment) {
199 199
             $segmentParam = $this->checkSegment($segment, $index, $lastIndex);
Please login to merge, or discard this patch.
src/Bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
             $router->findRoute();
75 75
 
76 76
             if (config()->get('multilang')) {
77
-                Lang::getInstance((int)config()->get(Lang::LANG_SEGMENT))->load();
77
+                Lang::getInstance((int) config()->get(Lang::LANG_SEGMENT))->load();
78 78
             }
79 79
 
80 80
             Debugger::addToStore(Debugger::HOOKS, LogLevel::INFO, HookManager::getRegistered());
Please login to merge, or discard this patch.
src/Console/Commands/KeyGenerateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      */
87 87
     private function generateRandomKey(): string
88 88
     {
89
-        return base64_encode(random_bytes((int)$this->getOption('length')));
89
+        return base64_encode(random_bytes((int) $this->getOption('length')));
90 90
     }
91 91
 
92 92
 }
Please login to merge, or discard this patch.
src/Console/QtConsole.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,13 +90,13 @@
 block discarded – undo
90 90
             Config::getInstance()->load(new Setup('config', 'config'));
91 91
 
92 92
             if (config()->get('multilang')) {
93
-                Lang::getInstance((int)config()->get(Lang::LANG_SEGMENT))->load();
93
+                Lang::getInstance((int) config()->get(Lang::LANG_SEGMENT))->load();
94 94
             }
95 95
 
96 96
             return $this->application->run($input, $output);
97 97
         } catch (\Throwable $throwable) {
98 98
             $output->writeln("<error>" . $throwable->getMessage() . "</error>");
99
-            return (int)$throwable->getCode();
99
+            return (int) $throwable->getCode();
100 100
         }
101 101
     }
102 102
 
Please login to merge, or discard this patch.
src/Console/Commands/MigrationMigrateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
             }
75 75
         }
76 76
 
77
-        $step = (int)$this->getOption('step') ?: null;
77
+        $step = (int) $this->getOption('step') ?: null;
78 78
 
79 79
         $migrationManager = new MigrationManager();
80 80
 
Please login to merge, or discard this patch.
src/Console/Commands/ModuleGenerateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
         $modules = require_once $modulesConfigPath;
94 94
 
95 95
         foreach ($modules['modules'] as $module => $options) {
96
-            if ($module == $newModuleName  || $options['prefix'] == strtolower($newModuleName)) {
96
+            if ($module == $newModuleName || $options['prefix'] == strtolower($newModuleName)) {
97 97
                 $this->error('A module or prefix named ' . $newModuleName . ' already exists');
98 98
                 return;
99 99
             }
Please login to merge, or discard this patch.
src/Libraries/Curl/HttpClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $this->client = new MultiCurl();
97 97
 
98
-        $this->client->complete(function (Curl $instance) {
98
+        $this->client->complete(function(Curl $instance) {
99 99
             $this->handleResponse($instance);
100 100
         });
101 101
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $headers = [];
374 374
 
375 375
         while ($httpHeaders->valid()) {
376
-            $headers[strtolower((string)$httpHeaders->key())] = $httpHeaders->current();
376
+            $headers[strtolower((string) $httpHeaders->key())] = $httpHeaders->current();
377 377
             $httpHeaders->next();
378 378
         }
379 379
 
Please login to merge, or discard this patch.