Passed
Pull Request — master (#124)
by Arman
03:02
created
src/Http/Response/HttpResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
      * @param array $arr
253 253
      * @param \SimpleXMLElement $simpleXML
254 254
      */
255
-    private static function composeXML(array $arr, SimpleXMLElement &$simpleXML)
255
+    private static function composeXML(array $arr, SimpleXMLElement & $simpleXML)
256 256
     {
257 257
         foreach ($arr as $key => $value) {
258 258
             if (is_numeric($key)) {
Please login to merge, or discard this patch.
src/App.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 use Quantum\Loader\Setup;
22 22
 use Quantum\Di\Di;
23 23
 
24
-if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
24
+if (!defined('DS')) {
25
+    define('DS', DIRECTORY_SEPARATOR);
26
+}
25 27
 
26 28
 /**
27 29
  * Class App
Please login to merge, or discard this patch.
src/Mvc/MvcManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
      */
140 140
     private static function routeParams(): array
141 141
     {
142
-        return array_map(function ($param) {
142
+        return array_map(function($param) {
143 143
             return $param['value'];
144 144
         }, route_params());
145 145
     }
Please login to merge, or discard this patch.
src/Libraries/Validation/Validator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
             foreach ($this->errors as $field => $errors) {
197 197
                 if (count($errors)) {
198 198
                     foreach ($errors as $rule => $param) {
199
-                        $translationParams = [t('common.'.$field)];
199
+                        $translationParams = [t('common.' . $field)];
200 200
 
201 201
                         if ($param) {
202 202
                             $translationParams[] = $param;
Please login to merge, or discard this patch.
src/Libraries/Mailer/Mailer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -504,7 +504,7 @@
 block discarded – undo
504 504
         if (config()->get('debug')) {
505 505
             $this->mailer->SMTPDebug = SMTP::DEBUG_SERVER;
506 506
 
507
-            $this->mailer->Debugoutput = function ($message) {
507
+            $this->mailer->Debugoutput = function($message) {
508 508
                 Debugger::addToStore(Debugger::MAILS, LogLevel::WARNING, $message);
509 509
 
510 510
                 $logFile = logs_dir() . DS . date('Y-m-d') . '.log';
Please login to merge, or discard this patch.
src/Helpers/misc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 function _message(string $subject, $params): string
49 49
 {
50 50
     if (is_array($params)) {
51
-        return preg_replace_callback('/{%\d+}/', function () use (&$params) {
51
+        return preg_replace_callback('/{%\d+}/', function() use (&$params) {
52 52
             return array_shift($params);
53 53
         }, $subject);
54 54
     } else {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     for ($i = 0; $i < $length; $i++) {
157 157
         $randomString .= rand(0, 9);
158 158
     }
159
-    return (int)$randomString;
159
+    return (int) $randomString;
160 160
 }
161 161
 
162 162
 /**
Please login to merge, or discard this patch.
src/Libraries/Lang/Lang.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
                 throw LangException::misconfiguredDefaultConfig();
74 74
             }
75 75
 
76
-            if (empty($lang) || !in_array($lang, (array)config()->get('langs'))) {
76
+            if (empty($lang) || !in_array($lang, (array) config()->get('langs'))) {
77 77
                 $lang = config()->get('lang_default');
78 78
             }
79 79
 
Please login to merge, or discard this patch.
src/Libraries/Database/Schema/Table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -327,7 +327,7 @@
 block discarded – undo
327 327
      */
328 328
     private function columnKey(): int
329 329
     {
330
-        return (int)array_key_last($this->columns);
330
+        return (int) array_key_last($this->columns);
331 331
     }
332 332
 
333 333
 }
Please login to merge, or discard this patch.
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.