@@ -46,7 +46,7 @@ |
||
46 | 46 | $this->response->disableCache(); |
47 | 47 | $out = ''; |
48 | 48 | $out .= "retry: $retry\n"; |
49 | - $out .= 'data: ' . $data . "\n\n"; |
|
49 | + $out .= 'data: '.$data."\n\n"; |
|
50 | 50 | |
51 | 51 | return $out; |
52 | 52 | } |
@@ -105,7 +105,7 @@ |
||
105 | 105 | 'subject' => $this->request->getData('subject'), |
106 | 106 | 'message' => $this->request->getData('text'), |
107 | 107 | 'template' => 'user_contact', |
108 | - 'ccsender' => (bool)$this->request->getData('cc'), |
|
108 | + 'ccsender' => (bool) $this->request->getData('cc'), |
|
109 | 109 | ]; |
110 | 110 | $this->SaitoEmail->email($email); |
111 | 111 | $message = __('Message was send.'); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | //= set persistent Cookie |
183 | - $setCookie = (bool)$this->request->getData('remember_me'); |
|
183 | + $setCookie = (bool) $this->request->getData('remember_me'); |
|
184 | 184 | if ($setCookie) { |
185 | 185 | (new CurrentUserCookie($this->getController()))->write($this->getId()); |
186 | 186 | }; |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | $auth->setConfig('loginAction', '/login'); |
293 | 293 | |
294 | 294 | $here = urlencode($this->getController()->getRequest()->getRequestTarget()); |
295 | - $auth->setConfig('unauthorizedRedirect', '/login?redirect=' . $here); |
|
295 | + $auth->setConfig('unauthorizedRedirect', '/login?redirect='.$here); |
|
296 | 296 | |
297 | 297 | if ($this->isLoggedIn()) { |
298 | 298 | $auth->allow(); |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | */ |
319 | 319 | private function setJwtCookie(Controller $controller): void |
320 | 320 | { |
321 | - $cookieKey = Configure::read('Session.cookie') . '-jwt'; |
|
321 | + $cookieKey = Configure::read('Session.cookie').'-jwt'; |
|
322 | 322 | $cookie = (new Storage($controller, $cookieKey, ['http' => false, 'expire' => '+1 week'])); |
323 | 323 | |
324 | 324 | $existingToken = $cookie->read(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace App\Controller\Component; |
6 | 6 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | $ctrler = $controller->request->getParam('controller'); |
47 | 47 | $action = $controller->request->getParam('action'); |
48 | - $key = lcfirst($ctrler) . '/' . $action; |
|
48 | + $key = lcfirst($ctrler).'/'.$action; |
|
49 | 49 | $page = __d('page_titles', $key); |
50 | 50 | if ($key === $page) { |
51 | 51 | $page = ''; |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $tabs = $slidetabs; |
50 | 50 | } |
51 | 51 | $tabs = array_map( |
52 | - function ($v) { |
|
52 | + function($v) { |
|
53 | 53 | return $this->_available[$v]; |
54 | 54 | }, |
55 | 55 | $tabs |
@@ -80,14 +80,14 @@ |
||
80 | 80 | 'order' => $order, |
81 | 81 | // Performance: Custom counter from categories counter-cache; |
82 | 82 | // avoids a costly COUNT(*) DB call counting all pages for pagination. |
83 | - 'counter' => function ($query) use ($categories) { |
|
83 | + 'counter' => function($query) use ($categories) { |
|
84 | 84 | $results = $this->Entries->Categories->find('all') |
85 | 85 | ->select(['thread_count']) |
86 | 86 | ->where(['id IN' => $categories]) |
87 | 87 | ->all(); |
88 | 88 | $count = array_reduce( |
89 | 89 | $results->toArray(), |
90 | - function ($carry, Entity $entity) { |
|
90 | + function($carry, Entity $entity) { |
|
91 | 91 | return $carry + $entity->get('thread_count'); |
92 | 92 | }, |
93 | 93 | 0 |
@@ -22,11 +22,11 @@ |
||
22 | 22 | if (!is_numeric($value)) { |
23 | 23 | return false; |
24 | 24 | } |
25 | - $value = (int)$value; |
|
25 | + $value = (int) $value; |
|
26 | 26 | |
27 | - $key = $table . $value; |
|
27 | + $key = $table.$value; |
|
28 | 28 | |
29 | - return static::rememberStatic($key, function () use ($value, $table) { |
|
29 | + return static::rememberStatic($key, function() use ($value, $table) { |
|
30 | 30 | $Table = TableRegistry::get($table); |
31 | 31 | |
32 | 32 | return $Table->exists(['id' => $value]); |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | { |
133 | 133 | $delimiter = '/'; |
134 | 134 | foreach ($codes['codes'] as $key => $code) { |
135 | - $codes['quoted'][$key] = $delimiter . |
|
135 | + $codes['quoted'][$key] = $delimiter. |
|
136 | 136 | // a smiley can't be concatenated to a string and requires a |
137 | 137 | // whitespace in front |
138 | - '(^|(?<=(\s)))' . |
|
139 | - preg_quote($code, $delimiter) . |
|
138 | + '(^|(?<=(\s)))'. |
|
139 | + preg_quote($code, $delimiter). |
|
140 | 140 | $delimiter; |
141 | 141 | } |
142 | 142 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | //= pixel image smileys |
168 | 168 | } else { |
169 | 169 | $replacements['html'][$k] = $this->HtmlHelper->image( |
170 | - 'smilies/' . $smiley['image'], |
|
170 | + 'smilies/'.$smiley['image'], |
|
171 | 171 | [ |
172 | 172 | 'alt' => $smiley['code'], |
173 | 173 | 'class' => 'saito-smiley-image', |
@@ -21,7 +21,7 @@ |
||
21 | 21 | if ($this->_smilies !== null) { |
22 | 22 | return $this->_smilies; |
23 | 23 | } |
24 | - $this->_smilies = Cache::remember('Saito.Smilies.data', function () { |
|
24 | + $this->_smilies = Cache::remember('Saito.Smilies.data', function() { |
|
25 | 25 | $Smilies = TableRegistry::get('Smilies'); |
26 | 26 | $smiliesRaw = $Smilies->find() |
27 | 27 | ->contain(['SmileyCodes']) |