@@ -13,13 +13,11 @@ |
||
13 | 13 | namespace ImageUploader\Test\TestCase\Controller; |
14 | 14 | |
15 | 15 | use Api\Error\Exception\GenericApiException; |
16 | -use Cake\Cache\Cache; |
|
17 | 16 | use Cake\Core\Configure; |
18 | 17 | use Cake\Core\Plugin; |
19 | 18 | use Cake\Filesystem\File; |
20 | 19 | use Cake\Http\Exception\UnauthorizedException; |
21 | 20 | use Cake\ORM\TableRegistry; |
22 | -use claviska\SimpleImage; |
|
23 | 21 | use Saito\Exception\SaitoForbiddenException; |
24 | 22 | use Saito\Test\IntegrationTestCase; |
25 | 23 |
@@ -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 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $this->loginJwt(1); |
73 | 73 | |
74 | 74 | $this->upload($this->file); |
75 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
75 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
76 | 76 | |
77 | 77 | $this->assertResponseCode(200); |
78 | 78 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | <svg width="9" height="9" style="background:red;"></svg>'); |
120 | 120 | $this->upload($this->file); |
121 | 121 | |
122 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
122 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
123 | 123 | |
124 | 124 | $this->assertResponseCode(200); |
125 | 125 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | $this->upload($this->file); |
178 | 178 | |
179 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
179 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
180 | 180 | |
181 | 181 | $this->assertResponseCode(200); |
182 | 182 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | |
237 | 237 | $this->get('api/v2/uploads'); |
238 | 238 | |
239 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
239 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
240 | 240 | |
241 | 241 | $this->assertResponseCode(200); |
242 | 242 | |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | |
284 | 284 | $this->delete('api/v2/uploads/1'); |
285 | 285 | |
286 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
286 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
287 | 287 | |
288 | 288 | $this->assertResponseCode(204); |
289 | 289 |
@@ -12,7 +12,6 @@ |
||
12 | 12 | |
13 | 13 | namespace Installer\Test\TestCase\Controller; |
14 | 14 | |
15 | -use App\Model\Table\SettingsTable; |
|
16 | 15 | use Cake\Core\Configure; |
17 | 16 | use Cake\Datasource\ConnectionManager; |
18 | 17 | use Cake\Filesystem\File; |
@@ -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 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $this->assertResponseOk(); |
56 | 56 | $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate()); |
57 | - $this->assertResponseContains((string)1529737182); |
|
57 | + $this->assertResponseContains((string) 1529737182); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | public function testUpdaterShowFailureNoDbVersionString() |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | $this->assertResponseOk(); |
66 | 66 | $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate()); |
67 | - $this->assertResponseContains((string)1529737397); |
|
67 | + $this->assertResponseContains((string) 1529737397); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | public function testUpdaterShowFailureWrongDbVersionString() |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | $this->assertResponseOk(); |
76 | 76 | $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate()); |
77 | - $this->assertResponseContains((string)1529737648); |
|
77 | + $this->assertResponseContains((string) 1529737648); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | public function testUpdaterInitMigrationsFormEmpty() |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | /** |
45 | 45 | * @param string $file filename |
46 | - * @return mixed |
|
46 | + * @return false|string |
|
47 | 47 | */ |
48 | 48 | public function content($file) |
49 | 49 | { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | /** |
95 | 95 | * Creates name for sitemap-file |
96 | 96 | * |
97 | - * @param array $params additional name parameters |
|
97 | + * @param integer[] $params additional name parameters |
|
98 | 98 | * @return string |
99 | 99 | */ |
100 | 100 | protected function _filename($params = []) |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | /** |
168 | 168 | * time to Cake start |
169 | 169 | * |
170 | - * @return mixed |
|
170 | + * @return double |
|
171 | 171 | */ |
172 | 172 | protected static function _timeToCake() |
173 | 173 | { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | /** |
178 | 178 | * time from cake to stopwatch |
179 | 179 | * |
180 | - * @return int |
|
180 | + * @return double |
|
181 | 181 | */ |
182 | 182 | protected static function _timeFromCakeToStopwatch() |
183 | 183 | { |
@@ -10,7 +10,6 @@ |
||
10 | 10 | namespace App\Auth; |
11 | 11 | |
12 | 12 | use Cake\Auth\BaseAuthenticate; |
13 | -use Cake\Core\Configure; |
|
14 | 13 | use Cake\Event\Event; |
15 | 14 | use Cake\Http\Response; |
16 | 15 | use Cake\Http\ServerRequest; |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace App\Controller\Component; |
4 | 4 | |
5 | 5 | use Cake\Controller\Component; |
6 | -use Cake\Core\Configure; |
|
7 | 6 | use Saito\User\ForumsUserInterface; |
8 | 7 | |
9 | 8 | class SlidetabsComponent extends Component |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param Form $contact contact-form |
86 | 86 | * @param mixed $recipient recipient |
87 | 87 | * @param mixed $sender sender |
88 | - * @return \Cake\Network\Response|void |
|
88 | + * @return \Cake\Http\Response|null |
|
89 | 89 | */ |
90 | 90 | protected function _contact(Form $contact, $recipient, $sender) |
91 | 91 | { |
@@ -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.'); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * posting index |
66 | 66 | * |
67 | - * @return void|\Cake\Network\Response |
|
67 | + * @return \Cake\Http\Response|null |
|
68 | 68 | */ |
69 | 69 | public function index() |
70 | 70 | { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * Mix view |
112 | 112 | * |
113 | 113 | * @param string $tid thread-ID |
114 | - * @return void|Response |
|
114 | + * @return \Cake\Http\Response|null |
|
115 | 115 | * @throws NotFoundException |
116 | 116 | */ |
117 | 117 | public function mix($tid) |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | * View posting. |
185 | 185 | * |
186 | 186 | * @param string $id posting-ID |
187 | - * @return \Cake\Network\Response|void |
|
187 | + * @return \Cake\Http\Response|null |
|
188 | 188 | */ |
189 | 189 | public function view($id = null) |
190 | 190 | { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | * Add new posting. |
237 | 237 | * |
238 | 238 | * @param null|string $id parent-ID if is answer |
239 | - * @return void|\Cake\Network\Response |
|
239 | + * @return \Cake\Http\Response|null |
|
240 | 240 | * @throws ForbiddenException |
241 | 241 | */ |
242 | 242 | public function add($id = null) |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | * Get thread-line to insert after an inline-answer |
346 | 346 | * |
347 | 347 | * @param string $id posting-ID |
348 | - * @return void|\Cake\Network\Response |
|
348 | + * @return \Cake\Http\Response|null |
|
349 | 349 | */ |
350 | 350 | public function threadLine($id = null) |
351 | 351 | { |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | * Edit posting |
365 | 365 | * |
366 | 366 | * @param string $id posting-ID |
367 | - * @return void|\Cake\Network\Response |
|
367 | + * @return \Cake\Http\Response|null |
|
368 | 368 | * @throws NotFoundException |
369 | 369 | * @throws BadRequestException |
370 | 370 | */ |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | * @param string $id posting-ID |
571 | 571 | * @param string $toggle property |
572 | 572 | * |
573 | - * @return \Cake\Network\Response |
|
573 | + * @return \Cake\Http\Response |
|
574 | 574 | */ |
575 | 575 | public function ajaxToggle($id = null, $toggle = null) |
576 | 576 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $threads = $this->Threads->paginate($order); |
82 | 82 | $this->set('entries', $threads); |
83 | 83 | |
84 | - $currentPage = (int)$this->request->getQuery('page') ?: 1; |
|
84 | + $currentPage = (int) $this->request->getQuery('page') ?: 1; |
|
85 | 85 | if ($currentPage > 1) { |
86 | 86 | $this->set('titleForLayout', __('page') . ' ' . $currentPage); |
87 | 87 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function mix($tid) |
118 | 118 | { |
119 | - $tid = (int)$tid; |
|
119 | + $tid = (int) $tid; |
|
120 | 120 | if ($tid <= 0) { |
121 | 121 | throw new BadRequestException(); |
122 | 122 | } |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | throw new BadRequestException; |
584 | 584 | } |
585 | 585 | |
586 | - $current = $this->Entries->toggle((int)$id, $toggle); |
|
586 | + $current = $this->Entries->toggle((int) $id, $toggle); |
|
587 | 587 | if ($current) { |
588 | 588 | $out['html'] = __d('nondynamic', $toggle . '_unset_entry_link'); |
589 | 589 | } else { |
@@ -9,7 +9,6 @@ discard block |
||
9 | 9 | |
10 | 10 | namespace App\Controller; |
11 | 11 | |
12 | -use App\Controller\Component\CurrentUserComponent; |
|
13 | 12 | use App\Controller\Component\MarkAsReadComponent; |
14 | 13 | use App\Controller\Component\ThreadsComponent; |
15 | 14 | use App\Model\Entity\Entry; |
@@ -21,9 +20,7 @@ discard block |
||
21 | 20 | use Cake\Http\Exception\ForbiddenException; |
22 | 21 | use Cake\Http\Exception\MethodNotAllowedException; |
23 | 22 | use Cake\Http\Exception\NotFoundException; |
24 | -use Cake\I18n\Time; |
|
25 | 23 | use Cake\Routing\RequestActionTrait; |
26 | -use Saito\App\Registry; |
|
27 | 24 | use Saito\Posting\Posting; |
28 | 25 | use Saito\User\CurrentUser\CurrentUserInterface; |
29 | 26 | use Saito\User\ForumsUserInterface; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | /** |
27 | 27 | * Generate posting preview for JSON frontend. |
28 | 28 | * |
29 | - * @return \Cake\Network\Response|void |
|
29 | + * @return null|\Cake\Http\Response |
|
30 | 30 | * @throws BadRequestException |
31 | 31 | * @throws ForbiddenException |
32 | 32 | */ |