@@ -106,6 +106,10 @@ |
||
106 | 106 | $this->out("Generated $i users."); |
107 | 107 | } |
108 | 108 | |
109 | + /** |
|
110 | + * @param integer $i |
|
111 | + * @param integer $off |
|
112 | + */ |
|
109 | 113 | protected function _progress($i, $off) { |
110 | 114 | if ($i < 1) { |
111 | 115 | return; |
@@ -42,12 +42,18 @@ |
||
42 | 42 | exec($command); |
43 | 43 | } |
44 | 44 | |
45 | + /** |
|
46 | + * @param string $urlFilePath |
|
47 | + */ |
|
45 | 48 | protected function _cleanup($urlFilePath) { |
46 | 49 | if (file_exists($urlFilePath)) { |
47 | 50 | unlink($urlFilePath); |
48 | 51 | } |
49 | 52 | } |
50 | 53 | |
54 | + /** |
|
55 | + * @param string[] $out |
|
56 | + */ |
|
51 | 57 | protected function _generateEntriesIndex(&$out) { |
52 | 58 | for ($i = 0; $i < 400; $i++) { |
53 | 59 | $out[] = $this->_prefix . 'entries/index/page:' . rand(1, 2); |
@@ -104,6 +104,10 @@ discard block |
||
104 | 104 | return $this->_countYearStats(['fields' => ['COUNT(DISTINCT `user_id`) AS `count`']]); |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param string $model |
|
109 | + * @param string $field |
|
110 | + */ |
|
107 | 111 | protected function _getYearStats($model, $field) { |
108 | 112 | return $this->_countYearStats(['fields' => ['COUNT(*) AS `count`']], |
109 | 113 | [], $model, $field); |
@@ -147,6 +151,10 @@ discard block |
||
147 | 151 | return $this->_wrapData($data); |
148 | 152 | } |
149 | 153 | |
154 | + /** |
|
155 | + * @param string $model |
|
156 | + * @param string $field |
|
157 | + */ |
|
150 | 158 | protected function _getMonthStats($model, $field) { |
151 | 159 | $results = $this->_countYearStats( |
152 | 160 | ['fields' => ['COUNT(*) AS `count`']], |
@@ -15,6 +15,9 @@ |
||
15 | 15 | return $hashWithSalt; |
16 | 16 | } |
17 | 17 | |
18 | + /** |
|
19 | + * @param integer $maxLength |
|
20 | + */ |
|
18 | 21 | protected static function _generateRandomString($maxLength = null) { |
19 | 22 | $string = Security::generateAuthKey(); |
20 | 23 | if ($maxLength) { |
@@ -268,6 +268,7 @@ |
||
268 | 268 | |
269 | 269 | /** |
270 | 270 | * write the settings to the session, so that they are available on next request |
271 | + * @param Controller $controller |
|
271 | 272 | */ |
272 | 273 | protected function _writeSession(&$controller) { |
273 | 274 | if ($controller->action !== 'logout' && $controller->Auth->user()): |
@@ -203,6 +203,9 @@ |
||
203 | 203 | $this->_CakeEmail->config('saito'); |
204 | 204 | } |
205 | 205 | |
206 | + /** |
|
207 | + * @param string $type |
|
208 | + */ |
|
206 | 209 | public function getPredefinedSender($type) { |
207 | 210 | $this->_init(); |
208 | 211 | return ['User' => [ |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | * @param null $id |
651 | 651 | * @param null $toggle |
652 | 652 | * |
653 | - * @return translated |
|
653 | + * @return null|string |
|
654 | 654 | */ |
655 | 655 | public function ajax_toggle($id = null, $toggle = null) { |
656 | 656 | $this->autoLayout = false; |
@@ -781,6 +781,9 @@ discard block |
||
781 | 781 | } |
782 | 782 | } |
783 | 783 | |
784 | + /** |
|
785 | + * @param string $type |
|
786 | + */ |
|
784 | 787 | protected function _incrementViews($entry, $type = null) { |
785 | 788 | if ($this->CurrentUser->isBot()) { |
786 | 789 | return; |
@@ -947,6 +950,9 @@ discard block |
||
947 | 950 | $this->set('rootEntry', $_rootEntry); |
948 | 951 | } |
949 | 952 | |
953 | + /** |
|
954 | + * @param string $type |
|
955 | + */ |
|
950 | 956 | protected function _setTitleFromEntry($entry, $type = null) { |
951 | 957 | if ($type === null) { |
952 | 958 | $template = __(':subject | :category'); |
@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | + /** |
|
32 | + * @param string $data |
|
33 | + */ |
|
31 | 34 | protected function _statusAsEventStream($data) { |
32 | 35 | // time in ms to next request |
33 | 36 | $_retry = '10000'; |
@@ -40,6 +43,9 @@ discard block |
||
40 | 43 | return $_out; |
41 | 44 | } |
42 | 45 | |
46 | + /** |
|
47 | + * @param string $data |
|
48 | + */ |
|
43 | 49 | protected function _statusAsJson($data) { |
44 | 50 | if ($this->request->is('ajax') === false) { |
45 | 51 | throw new BadRequestException(); |
@@ -221,6 +221,9 @@ discard block |
||
221 | 221 | $this->_ignore($blockedId, false); |
222 | 222 | } |
223 | 223 | |
224 | + /** |
|
225 | + * @param boolean $set |
|
226 | + */ |
|
224 | 227 | protected function _ignore($blockedId, $set) { |
225 | 228 | if (!$this->CurrentUser->isLoggedIn() || !is_numeric($blockedId)) { |
226 | 229 | throw new BadRequestException(); |
@@ -661,7 +664,7 @@ discard block |
||
661 | 664 | * |
662 | 665 | * @param SaitoUser $CurrentUser |
663 | 666 | * @param int $userId |
664 | - * @return type |
|
667 | + * @return boolean |
|
665 | 668 | */ |
666 | 669 | protected function _isEditingAllowed(\Saito\User\ForumsUserInterface $CurrentUser, $userId) { |
667 | 670 | if ($CurrentUser->isAdmin()) { |