Passed
Pull Request — master (#43)
by Arman
03:54
created
src/Middleware/MiddlewareManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
         $currentMiddleware = new $middlewareClass($request, $response);
76 76
 
77 77
         if ($currentMiddleware instanceof QtMiddleware) {
78
-            list($modifiedRequest, $modifiedResponse) = $currentMiddleware->apply($request, $response, function ($request, $response) {
78
+            list($modifiedRequest, $modifiedResponse) = $currentMiddleware->apply($request, $response, function($request, $response) {
79 79
                 next($this->middlewares);
80 80
                 return [$request, $response];
81 81
             });
Please login to merge, or discard this patch.
src/Hooks/HookDefaults.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@
 block discarded – undo
83 83
     {
84 84
         $currentRoute = RouteController::getCurrentRoute();
85 85
 
86
-        $routeInfo  = [];
86
+        $routeInfo = [];
87 87
 
88
-        array_walk($currentRoute, function ($value, $key) use (&$routeInfo) {
88
+        array_walk($currentRoute, function($value, $key) use (&$routeInfo) {
89 89
             $routeInfo[ucfirst($key)] = $value;
90 90
         });
91 91
 
Please login to merge, or discard this patch.
src/Helpers/functions/misc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 {
89 89
     $appKey = env('APP_KEY');
90 90
 
91
-    if(!$appKey) {
91
+    if (!$appKey) {
92 92
         throw AppException::missingAppKey();
93 93
     }
94 94
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 function _message(string $subject, $params): string
105 105
 {
106 106
     if (is_array($params)) {
107
-        return preg_replace_callback('/{%\d+}/', function () use (&$params) {
107
+        return preg_replace_callback('/{%\d+}/', function() use (&$params) {
108 108
             return array_shift($params);
109 109
         }, $subject);
110 110
     } else {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     for ($i = 0; $i < $length; $i++) {
208 208
         $randomString .= rand(0, 9);
209 209
     }
210
-    return (int)$randomString;
210
+    return (int) $randomString;
211 211
 }
212 212
 
213 213
 /**
Please login to merge, or discard this patch.
src/Helpers/functions/server.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
  */
42 42
 function parse_raw_http_request($input): array
43 43
 {
44
-    $contentType = (string)(new Server)->contentType();
44
+    $contentType = (string) (new Server)->contentType();
45 45
 
46 46
     $encoded_data = [];
47 47
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@
 block discarded – undo
55 55
             array_pop($blocks);
56 56
 
57 57
             foreach ($blocks as $id => $block) {
58
-                if (empty($block))
59
-                    continue;
58
+                if (empty($block)) {
59
+                                    continue;
60
+                }
60 61
                 if (strpos($block, 'application/octet-stream') !== false) {
61 62
                     preg_match("/name=\"([^\"]*)\".*stream[\n|\r]+([^\n\r].*)?$/s", $block, $matches);
62 63
                     if (count($matches) > 0) {
Please login to merge, or discard this patch.
src/Debugger/Debugger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public static function addToStore(string $cell, string $level, $data)
110 110
     {
111
-        if(!empty($data)) {
111
+        if (!empty($data)) {
112 112
             array_push(self::$store[$cell], [$level => $data]);
113 113
         }
114 114
     }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     protected function createTab(string $type)
138 138
     {
139
-        if(!$this->debugbar->hasCollector($type)) {
139
+        if (!$this->debugbar->hasCollector($type)) {
140 140
             $this->debugbar->addCollector(new MessagesCollector($type));
141 141
         }
142 142
 
Please login to merge, or discard this patch.
src/Libraries/Upload/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@
 block discarded – undo
225 225
             throw FileUploadException::fileAlreadyExists();
226 226
         }
227 227
 
228
-        if(!$this->moveUploadedFile($filePath)) {
228
+        if (!$this->moveUploadedFile($filePath)) {
229 229
             return false;
230 230
         }
231 231
 
Please login to merge, or discard this patch.
src/Libraries/Storage/FileSystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function baseName(string $path): string
113 113
     {
114
-        return (string)pathinfo($path, PATHINFO_BASENAME);
114
+        return (string) pathinfo($path, PATHINFO_BASENAME);
115 115
     }
116 116
 
117 117
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function fileName(string $path): string
123 123
     {
124
-        return (string)pathinfo($path, PATHINFO_FILENAME);
124
+        return (string) pathinfo($path, PATHINFO_FILENAME);
125 125
     }
126 126
 
127 127
     /**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function extension(string $path): string
133 133
     {
134
-        return (string)pathinfo($path, PATHINFO_EXTENSION);
134
+        return (string) pathinfo($path, PATHINFO_EXTENSION);
135 135
     }
136 136
 
137 137
     /**
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()->has('debug')) {
505 505
             $this->mailer->SMTPDebug = 1;
506 506
 
507
-            $this->mailer->Debugoutput = function ($data, $level) {
507
+            $this->mailer->Debugoutput = function($data, $level) {
508 508
                 Debugger::addToStore(Debugger::MAILS, $level, $data);
509 509
             };
510 510
 
Please login to merge, or discard this patch.
src/Routes/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
         $uri = $this->request->getUri();
81 81
 
82
-        if(!$uri) {
82
+        if (!$uri) {
83 83
             throw RouteException::notFound();
84 84
         }
85 85
 
Please login to merge, or discard this patch.