@@ -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 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function thumb(): Response |
37 | 37 | { |
38 | - $id = (int)$this->request->getParam('id'); |
|
39 | - ['hash' => $fingerprint, 'type' => $type, 'raw' => $raw] = Cache::remember((string)$id, function () use ($id) { |
|
38 | + $id = (int) $this->request->getParam('id'); |
|
39 | + ['hash' => $fingerprint, 'type' => $type, 'raw' => $raw] = Cache::remember((string) $id, function() use ($id) { |
|
40 | 40 | $Uploads = $this->loadModel('ImageUploader.Uploads'); |
41 | 41 | $document = $Uploads->get($id); |
42 | 42 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | return compact('hash', 'raw', 'type'); |
56 | 56 | }, Plugin::CACHE_KEY); |
57 | 57 | |
58 | - $hash = (string)$this->request->getQuery('h'); |
|
58 | + $hash = (string) $this->request->getQuery('h'); |
|
59 | 59 | if ($hash !== $fingerprint) { |
60 | 60 | throw new SaitoForbiddenException( |
61 | 61 | "Attempt to access image-thumbnail $id." |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -55,12 +55,12 @@ discard block |
||
55 | 55 | if ($lastAction !== 'add') { |
56 | 56 | $session = $this->getView()->getRequest()->getSession(); |
57 | 57 | if ($session->read('paginator.lastPage')) { |
58 | - $params[] = 'page=' . $session->read('paginator.lastPage'); |
|
58 | + $params[] = 'page='.$session->read('paginator.lastPage'); |
|
59 | 59 | } |
60 | 60 | } |
61 | - $params[] = 'jump=' . $tid; |
|
61 | + $params[] = 'jump='.$tid; |
|
62 | 62 | |
63 | - return '/?' . implode('&', $params); |
|
63 | + return '/?'.implode('&', $params); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $id = $posting->get('id'); |
77 | 77 | $webroot = $this->getView()->getRequest()->getAttribute('webroot'); |
78 | 78 | $url = "{$webroot}entries/view/{$id}"; |
79 | - $link = "<a href=\"{$url}\" class=\"{$options['class']}\">" . $this->getSubject($posting) . '</a>'; |
|
79 | + $link = "<a href=\"{$url}\" class=\"{$options['class']}\">".$this->getSubject($posting).'</a>'; |
|
80 | 80 | |
81 | 81 | return $link; |
82 | 82 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function views(BasicPostingInterface $posting) |
133 | 133 | { |
134 | - return __('views_headline') . ': ' . $posting->get('views'); |
|
134 | + return __('views_headline').': '.$posting->get('views'); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | { |
148 | 148 | $options += [ |
149 | 149 | 'lineCache' => $this->_View->get('LineCache'), |
150 | - 'maxThreadDepthIndent' => (int)Configure::read( |
|
150 | + 'maxThreadDepthIndent' => (int) Configure::read( |
|
151 | 151 | 'Saito.Settings.thread_depth_indent' |
152 | 152 | ), |
153 | 153 | 'renderer' => 'thread', |
@@ -190,10 +190,10 @@ discard block |
||
190 | 190 | { |
191 | 191 | $out = ''; |
192 | 192 | if ($entry->isPinned()) { |
193 | - $out .= '<i class="fa fa-thumb-tack" title="' . __('fixed') . '"></i> '; |
|
193 | + $out .= '<i class="fa fa-thumb-tack" title="'.__('fixed').'"></i> '; |
|
194 | 194 | } |
195 | 195 | // anchor for inserting solve-icon via FE-JS |
196 | - $out .= '<span class="solves ' . $entry->get('id') . '">'; |
|
196 | + $out .= '<span class="solves '.$entry->get('id').'">'; |
|
197 | 197 | if ($entry->get('solves')) { |
198 | 198 | $out .= $this->solvedBadge(); |
199 | 199 | } |
@@ -217,8 +217,8 @@ discard block |
||
217 | 217 | */ |
218 | 218 | public function solvedBadge() |
219 | 219 | { |
220 | - return '<i class="fa fa-badge-solves solves-isSolved" title="' . |
|
221 | - __('Helpful entry') . '"></i>'; |
|
220 | + return '<i class="fa fa-badge-solves solves-isSolved" title="'. |
|
221 | + __('Helpful entry').'"></i>'; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | /** |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | */ |
231 | 231 | public function getSubject(BasicPostingInterface $posting) |
232 | 232 | { |
233 | - return \h($posting->get('subject')) . ($posting->isNt() ? ' n/t' : ''); |
|
233 | + return \h($posting->get('subject')).($posting->isNt() ? ' n/t' : ''); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |