@@ -83,7 +83,7 @@ |
||
83 | 83 | $currentMiddleware = new $middlewareClass(); |
84 | 84 | |
85 | 85 | if ($currentMiddleware instanceof QtMiddleware) { |
86 | - list($modifiedRequest, $modifiedResponse) = $currentMiddleware->apply($request, $response, function ($request, $response) { |
|
86 | + list($modifiedRequest, $modifiedResponse) = $currentMiddleware->apply($request, $response, function($request, $response) { |
|
87 | 87 | next($this->middlewares); |
88 | 88 | return [$request, $response]; |
89 | 89 | }); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | function _message($subject, $params) |
97 | 97 | { |
98 | 98 | if (is_array($params)) { |
99 | - return preg_replace_callback('/{%\d+}/', function () use (&$params) { |
|
99 | + return preg_replace_callback('/{%\d+}/', function() use (&$params) { |
|
100 | 100 | return array_shift($params); |
101 | 101 | }, $subject); |
102 | 102 | } else { |
@@ -384,7 +384,6 @@ |
||
384 | 384 | } |
385 | 385 | |
386 | 386 | /** |
387 | - |
|
388 | 387 | * Prepares the HTML content |
389 | 388 | * @param string $html |
390 | 389 | * @param int|null $code |
@@ -331,8 +331,7 @@ |
||
331 | 331 | $data = self::$__request[$key]; |
332 | 332 | } else { |
333 | 333 | $data = is_array(self::$__request[$key]) ? |
334 | - filter_var_array(self::$__request[$key], FILTER_SANITIZE_STRING) : |
|
335 | - filter_var(self::$__request[$key], FILTER_SANITIZE_STRING); |
|
334 | + filter_var_array(self::$__request[$key], FILTER_SANITIZE_STRING) : filter_var(self::$__request[$key], FILTER_SANITIZE_STRING); |
|
336 | 335 | } |
337 | 336 | } |
338 | 337 |
@@ -103,7 +103,7 @@ |
||
103 | 103 | * @return void |
104 | 104 | */ |
105 | 105 | public function set($key, $value = '', $time = 0, $path = '/', $domain = '', $secure = false, $httponly = false) |
106 | - { |
|
106 | + { |
|
107 | 107 | $this->storage[$key] = $this->encode($value); |
108 | 108 | setcookie($key, $this->encode($value), $time ? time() + $time : $time, $path, $domain, $secure, $httponly); |
109 | 109 | } |
@@ -478,7 +478,7 @@ |
||
478 | 478 | { |
479 | 479 | if (config()->get('debug')) { |
480 | 480 | $this->mailer->SMTPDebug = 1; |
481 | - $this->mailer->Debugoutput = function ($str, $level) { |
|
481 | + $this->mailer->Debugoutput = function($str, $level) { |
|
482 | 482 | $this->log .= $str . '&'; |
483 | 483 | session()->set('_qt_mailer_log', $this->log); |
484 | 484 | }; |
@@ -469,11 +469,11 @@ |
||
469 | 469 | */ |
470 | 470 | protected function float(string $field, string $value, $param = null) |
471 | 471 | { |
472 | - if(empty($value)) { |
|
472 | + if (empty($value)) { |
|
473 | 473 | return true; |
474 | 474 | } |
475 | 475 | |
476 | - if( filter_var($value, FILTER_VALIDATE_FLOAT) === false) { |
|
476 | + if (filter_var($value, FILTER_VALIDATE_FLOAT) === false) { |
|
477 | 477 | $this->addError($field, 'float', $param); |
478 | 478 | } |
479 | 479 | } |
@@ -92,8 +92,9 @@ |
||
92 | 92 | array_pop($blocks); |
93 | 93 | |
94 | 94 | foreach ($blocks as $id => $block) { |
95 | - if (empty($block)) |
|
96 | - continue; |
|
95 | + if (empty($block)) { |
|
96 | + continue; |
|
97 | + } |
|
97 | 98 | if (strpos($block, 'application/octet-stream') !== false) { |
98 | 99 | preg_match("/name=\"([^\"]*)\".*stream[\n|\r]+([^\n\r].*)?$/s", $block, $matches); |
99 | 100 | if (count($matches) > 0) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'module' => $this->module |
90 | 90 | ]; |
91 | 91 | |
92 | - if(is_callable($params[0])) { |
|
92 | + if (is_callable($params[0])) { |
|
93 | 93 | $this->currentRoute['callback'] = $params[0]; |
94 | 94 | } else { |
95 | 95 | $this->currentRoute['controller'] = $params[0]; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function get($route, ...$params) |
114 | 114 | { |
115 | - return $this->add($route,'GET', ...$params); |
|
115 | + return $this->add($route, 'GET', ...$params); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function post($route, ...$params) |
125 | 125 | { |
126 | - return $this->add($route,'POST', ...$params); |
|
126 | + return $this->add($route, 'POST', ...$params); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |