@@ -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 { |
@@ -89,16 +89,19 @@ |
||
89 | 89 | $blocks = preg_split("/-+$boundary/", $input); |
90 | 90 | array_pop($blocks); |
91 | 91 | foreach ($blocks as $id => $block) { |
92 | - if (empty($block)) |
|
93 | - continue; |
|
92 | + if (empty($block)) { |
|
93 | + continue; |
|
94 | + } |
|
94 | 95 | if (strpos($block, 'application/octet-stream') !== false) { |
95 | 96 | preg_match("/name=\"([^\"]*)\".*stream[\n|\r]+([^\n\r].*)?$/s", $block, $matches); |
96 | - if (count($matches) > 0) |
|
97 | - $encoded_data['files'][$matches[1]] = isset($matches[2]) ? $matches[2] : ''; |
|
97 | + if (count($matches) > 0) { |
|
98 | + $encoded_data['files'][$matches[1]] = isset($matches[2]) ? $matches[2] : ''; |
|
99 | + } |
|
98 | 100 | } else { |
99 | 101 | preg_match('/name=\"([^\"]*)\"[\n|\r]+([^\n\r].*)?\r$/s', $block, $matches); |
100 | - if (count($matches) > 0) |
|
101 | - $encoded_data[$matches[1]] = isset($matches[2]) ? $matches[2] : ''; |
|
102 | + if (count($matches) > 0) { |
|
103 | + $encoded_data[$matches[1]] = isset($matches[2]) ? $matches[2] : ''; |
|
104 | + } |
|
102 | 105 | } |
103 | 106 | } |
104 | 107 | } |
@@ -69,8 +69,9 @@ |
||
69 | 69 | if (is_dir($src . '/' . $file)) { |
70 | 70 | self::recursive_copy($src . '/' . $file, $dst . '/' . $file); |
71 | 71 | } else { |
72 | - if ($file) |
|
73 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
72 | + if ($file) { |
|
73 | + copy($src . '/' . $file, $dst . '/' . $file); |
|
74 | + } |
|
74 | 75 | } |
75 | 76 | } |
76 | 77 | } |
@@ -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 |
@@ -249,7 +249,7 @@ |
||
249 | 249 | */ |
250 | 250 | public function joinTo(QtModel $model); |
251 | 251 | |
252 | - /** |
|
252 | + /** |
|
253 | 253 | * Joins through connector model |
254 | 254 | * |
255 | 255 | * @param QtModel $model |
@@ -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 | } |
@@ -41,7 +41,7 @@ |
||
41 | 41 | * @param array|null $customData |
42 | 42 | * @return mixed |
43 | 43 | */ |
44 | - public function signup(Mailer $mailer, $userData, $customData = null) |
|
44 | + public function signup(Mailer $mailer, $userData, $customData = null) |
|
45 | 45 | { |
46 | 46 | $activationToken = $this->generateToken(); |
47 | 47 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'activationToken' => $activationToken |
56 | 56 | ]; |
57 | 57 | |
58 | - if($customData) { |
|
58 | + if ($customData) { |
|
59 | 59 | $body = array_merge($body, $customData); |
60 | 60 | } |
61 | 61 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | { |
118 | 118 | $user = $this->authService->get($this->keys['resetTokenKey'], $token); |
119 | 119 | |
120 | - if(!$this->isActivated($user)) { |
|
120 | + if (!$this->isActivated($user)) { |
|
121 | 121 | $this->activate($token); |
122 | 122 | } |
123 | 123 |
@@ -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 | }; |