@@ -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 |
@@ -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 | }; |
@@ -318,10 +318,10 @@ |
||
318 | 318 | $query = explode('&', self::$__query); |
319 | 319 | |
320 | 320 | foreach($query as $items){ |
321 | - $item = explode('=', $items); |
|
322 | - if($item[0] == $key){ |
|
321 | + $item = explode('=', $items); |
|
322 | + if($item[0] == $key){ |
|
323 | 323 | return $item[1]; |
324 | - } |
|
324 | + } |
|
325 | 325 | } |
326 | 326 | |
327 | 327 | return null; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | { |
306 | 306 | $queryParams = self::$__query ? explode('&', self::$__query) : []; |
307 | 307 | array_push($queryParams, $key . '=' . $value); |
308 | - self::$__query = implode('&', $queryParams); |
|
308 | + self::$__query = implode('&', $queryParams); |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | /** |
@@ -317,9 +317,9 @@ discard block |
||
317 | 317 | { |
318 | 318 | $query = explode('&', self::$__query); |
319 | 319 | |
320 | - foreach($query as $items){ |
|
320 | + foreach ($query as $items) { |
|
321 | 321 | $item = explode('=', $items); |
322 | - if($item[0] == $key){ |
|
322 | + if ($item[0] == $key) { |
|
323 | 323 | return $item[1]; |
324 | 324 | } |
325 | 325 | } |
@@ -363,8 +363,7 @@ discard block |
||
363 | 363 | $data = self::$__request[$key]; |
364 | 364 | } else { |
365 | 365 | $data = is_array(self::$__request[$key]) ? |
366 | - filter_var_array(self::$__request[$key], FILTER_SANITIZE_STRING) : |
|
367 | - filter_var(self::$__request[$key], FILTER_SANITIZE_STRING); |
|
366 | + filter_var_array(self::$__request[$key], FILTER_SANITIZE_STRING) : filter_var(self::$__request[$key], FILTER_SANITIZE_STRING); |
|
368 | 367 | } |
369 | 368 | } |
370 | 369 |
@@ -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) { |
@@ -75,8 +75,9 @@ |
||
75 | 75 | if (is_dir($src . '/' . $file)) { |
76 | 76 | $this->recursive_copy($src . '/' . $file, $dst . '/' . $file); |
77 | 77 | } else { |
78 | - if ($file) |
|
79 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
78 | + if ($file) { |
|
79 | + copy($src . '/' . $file, $dst . '/' . $file); |
|
80 | + } |
|
80 | 81 | } |
81 | 82 | } |
82 | 83 | } |