@@ -17,7 +17,6 @@ |
||
17 | 17 | use Cake\Event\Event; |
18 | 18 | use Cake\Http\Response; |
19 | 19 | use Cake\I18n\I18n; |
20 | -use Saito\App\Registry; |
|
21 | 20 | use Saito\App\SettingsImmutable; |
22 | 21 | use Saito\Event\SaitoEventManager; |
23 | 22 | use Saito\User\CurrentUser\CurrentUser; |
@@ -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; |
@@ -12,8 +12,6 @@ |
||
12 | 12 | |
13 | 13 | namespace Saito\User\CurrentUser; |
14 | 14 | |
15 | -use App\Model\Table\UserReadsTable; |
|
16 | -use App\Model\Table\UsersTable; |
|
17 | 15 | use Cake\Controller\Controller; |
18 | 16 | use Cake\ORM\TableRegistry; |
19 | 17 | use Saito\User\Cookie\Storage; |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * tested if new for user. |
55 | 55 | * |
56 | 56 | * @param string|\DateTimeInterface $timestamp int unix-timestamp or date as string |
57 | - * @return mixed bool or null if not determinable |
|
57 | + * @return null|boolean bool or null if not determinable |
|
58 | 58 | */ |
59 | 59 | public function isNewerThan($timestamp) |
60 | 60 | { |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | * get parent id |
416 | 416 | * |
417 | 417 | * @param int $id id |
418 | - * @return mixed |
|
418 | + * @return integer |
|
419 | 419 | * @throws \UnexpectedValueException |
420 | 420 | */ |
421 | 421 | public function getParentId($id) |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | /** |
627 | 627 | * trees for multiple tids |
628 | 628 | * |
629 | - * @param array $ids ids |
|
629 | + * @param integer[] $ids ids |
|
630 | 630 | * @param array $order order |
631 | 631 | * @param array $fieldlist fieldlist |
632 | 632 | * @return array|bool false if no threads or array of Postings |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | * @param array $params params |
679 | 679 | * - 'fields' array of thread-ids: [1, 2, 5] |
680 | 680 | * - 'order' sort order for threads ['time' => 'ASC'], |
681 | - * @return mixed unhydrated result set |
|
681 | + * @return Query unhydrated result set |
|
682 | 682 | */ |
683 | 683 | protected function _getThreadEntries(array $tid, array $params = []) |
684 | 684 | { |
@@ -746,6 +746,8 @@ discard block |
||
746 | 746 | |
747 | 747 | /** |
748 | 748 | * {@inheritDoc} |
749 | + * @param integer $id |
|
750 | + * @param string $key |
|
749 | 751 | */ |
750 | 752 | public function toggle($id, $key) |
751 | 753 | { |
@@ -825,7 +827,7 @@ discard block |
||
825 | 827 | * Anonymizes the entries for a user |
826 | 828 | * |
827 | 829 | * @param string $userId user-ID |
828 | - * @return bool success |
|
830 | + * @return integer success |
|
829 | 831 | */ |
830 | 832 | public function anonymizeEntriesFromUser($userId) |
831 | 833 | { |
@@ -932,7 +934,7 @@ discard block |
||
932 | 934 | * Check if posting is thread-root. |
933 | 935 | * |
934 | 936 | * @param array $id posting-ID or posting data |
935 | - * @return mixed |
|
937 | + * @return boolean |
|
936 | 938 | */ |
937 | 939 | protected function _isRoot(array $id) |
938 | 940 | { |
@@ -1127,7 +1129,7 @@ discard block |
||
1127 | 1129 | * |
1128 | 1130 | * @param null $tid thread-ID |
1129 | 1131 | * @param null $newCategoryId id for new category |
1130 | - * @return bool success |
|
1132 | + * @return integer success |
|
1131 | 1133 | * @throws NotFoundException |
1132 | 1134 | * @throws \InvalidArgumentException |
1133 | 1135 | */ |
@@ -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 |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | //= set persistent Cookie |
139 | - $setCookie = (bool)$this->request->getData('remember_me'); |
|
139 | + $setCookie = (bool) $this->request->getData('remember_me'); |
|
140 | 140 | if ($setCookie) { |
141 | 141 | (new CurrentUserCookie($this->getController()))->write($this->CurrentUser->getId()); |
142 | 142 | }; |
@@ -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 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | if (empty($this->_timestamp)) { |
49 | 49 | $this->_timestamp = false; |
50 | 50 | } else { |
51 | - $this->_timestamp = (int)$this->_timestamp; |
|
51 | + $this->_timestamp = (int) $this->_timestamp; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 |