@@ -40,6 +40,9 @@ |
||
| 40 | 40 | |
| 41 | 41 | protected $_updated = false; |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $name |
|
| 45 | + */ |
|
| 43 | 46 | public function __construct($name, SaitoCacheEngineInterface $CacheEngine = null, $options = []) { |
| 44 | 47 | $this->_settings = $options + $this->_settings; |
| 45 | 48 | $this->_now = time(); |
@@ -8,10 +8,16 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | protected $_CU; |
| 10 | 10 | |
| 11 | + /** |
|
| 12 | + * @return \Saito\User\ForumsUserInterface |
|
| 13 | + */ |
|
| 11 | 14 | public function getCurrentUser() { |
| 12 | 15 | return $this->_CU; |
| 13 | 16 | } |
| 14 | 17 | |
| 18 | + /** |
|
| 19 | + * @param \Saito\User\ForumsUserInterface $CU |
|
| 20 | + */ |
|
| 15 | 21 | public function setCurrentUser($CU) { |
| 16 | 22 | $this->_CU = $CU; |
| 17 | 23 | } |
@@ -19,8 +25,7 @@ discard block |
||
| 19 | 25 | /** |
| 20 | 26 | * Checks if answering an entry is allowed |
| 21 | 27 | * |
| 22 | - * @param array $entry |
|
| 23 | - * @return boolean |
|
| 28 | + * @return string|false |
|
| 24 | 29 | */ |
| 25 | 30 | public function isAnsweringForbidden() { |
| 26 | 31 | if ($this->isLocked()) { |
@@ -63,6 +63,9 @@ |
||
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | + /** |
|
| 67 | + * @param integer $id |
|
| 68 | + */ |
|
| 66 | 69 | protected function _loginUser($id) { |
| 67 | 70 | // see: http://stackoverflow.com/a/10411128/1372085 |
| 68 | 71 | $this->_logoutUser(); |
@@ -76,6 +76,9 @@ |
||
| 76 | 76 | return $out; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | + /** |
|
| 80 | + * @param \Saito\Posting\PostingInterface $node |
|
| 81 | + */ |
|
| 79 | 82 | protected function _renderThreadLine($node, array $posting, $level) { |
| 80 | 83 | $id = $posting['Entry']['id']; |
| 81 | 84 | $useLineCache = $level > 0 && $this->_LineCache; |
@@ -9,6 +9,9 @@ |
||
| 9 | 9 | |
| 10 | 10 | protected $_Cookie; |
| 11 | 11 | |
| 12 | + /** |
|
| 13 | + * @param \CurrentUserComponent $CurrentUser |
|
| 14 | + */ |
|
| 12 | 15 | public function write($CurrentUser) { |
| 13 | 16 | $cookie = [ |
| 14 | 17 | 'id' => $CurrentUser->getId(), |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * is last refresh newer than $timestamp |
| 26 | 26 | * |
| 27 | 27 | * @param mixed $timestamp int unix-timestamp or date as string |
| 28 | - * @return mixed bool or null if not determinable |
|
| 28 | + * @return null|boolean bool or null if not determinable |
|
| 29 | 29 | */ |
| 30 | 30 | public function isNewerThan($timestamp) { |
| 31 | 31 | if (is_string($timestamp)) { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | * Increments value of a field |
| 126 | 126 | * |
| 127 | 127 | * @param $id |
| 128 | - * @param $field |
|
| 128 | + * @param string $field |
|
| 129 | 129 | * @param int $amount |
| 130 | 130 | * @throws InvalidArgumentException |
| 131 | 131 | */ |
@@ -197,6 +197,9 @@ discard block |
||
| 197 | 197 | $this->dispatchSaitoEvent($event, $data); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | + /** |
|
| 201 | + * @param string $event |
|
| 202 | + */ |
|
| 200 | 203 | public function dispatchSaitoEvent($event, $data) { |
| 201 | 204 | if (!$this->_SEM) { |
| 202 | 205 | $this->_SEM = SaitoEventManager::getInstance(); |
@@ -225,7 +228,7 @@ discard block |
||
| 225 | 228 | * |
| 226 | 229 | * falls back to local definition if available |
| 227 | 230 | * |
| 228 | - * @param $name |
|
| 231 | + * @param string $name |
|
| 229 | 232 | * @return mixed |
| 230 | 233 | * @throws UnexpectedValueException |
| 231 | 234 | */ |
@@ -78,8 +78,8 @@ |
||
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * |
| 81 | - * @param int $entry_id |
|
| 82 | - * @param int $user_id |
|
| 81 | + * @param int $entryId |
|
| 82 | + * @param int $userId |
|
| 83 | 83 | * @return bool |
| 84 | 84 | */ |
| 85 | 85 | public function isBookmarked($entryId, $userId) { |
@@ -518,7 +518,7 @@ |
||
| 518 | 518 | /** |
| 519 | 519 | * trees for multiple tids |
| 520 | 520 | * |
| 521 | - * @param $ids |
|
| 521 | + * @param integer[] $ids |
|
| 522 | 522 | * @param null $order |
| 523 | 523 | * @param null $fieldlist |
| 524 | 524 | * @return array|bool false if no threads or array with Posting |