@@ -30,7 +30,6 @@ discard block |
||
30 | 30 | use OCP\IUserManager; |
31 | 31 | use OCP\Share\IManager; |
32 | 32 | use OCP\Share\IProviderFactory; |
33 | -use OC\Share20\Exception\BackendError; |
|
34 | 33 | use OCP\IConfig; |
35 | 34 | use OCP\IL10N; |
36 | 35 | use OCP\ILogger; |
@@ -40,7 +39,6 @@ discard block |
||
40 | 39 | use OCP\IGroupManager; |
41 | 40 | use OCP\Files\File; |
42 | 41 | use OCP\Files\Folder; |
43 | - |
|
44 | 42 | use OCP\Share\Exceptions\ShareNotFound; |
45 | 43 | use OCP\Share\Exceptions\GenericShareException; |
46 | 44 |
@@ -30,7 +30,6 @@ |
||
30 | 30 | use OCP\SystemTag\TagAlreadyExistsException; |
31 | 31 | use OCP\SystemTag\TagNotFoundException; |
32 | 32 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
33 | -use OCP\IUserManager; |
|
34 | 33 | use OCP\IGroupManager; |
35 | 34 | use OCP\SystemTag\ISystemTag; |
36 | 35 | use OCP\IUser; |
@@ -742,11 +742,19 @@ discard block |
||
742 | 742 | } |
743 | 743 | |
744 | 744 | // case-insensitive array_search |
745 | + |
|
746 | + /** |
|
747 | + * @param string $needle |
|
748 | + */ |
|
745 | 749 | protected function array_searchi($needle, $haystack, $mem='getName') { |
746 | 750 | if(!is_array($haystack)) { |
747 | 751 | return false; |
748 | 752 | } |
749 | 753 | return array_search(strtolower($needle), array_map( |
754 | + |
|
755 | + /** |
|
756 | + * @param string $tag |
|
757 | + */ |
|
750 | 758 | function($tag) use($mem) { |
751 | 759 | return strtolower(call_user_func(array($tag, $mem))); |
752 | 760 | }, $haystack) |
@@ -771,7 +779,7 @@ discard block |
||
771 | 779 | * Get a tag by its name. |
772 | 780 | * |
773 | 781 | * @param string $name The tag name. |
774 | - * @return integer|bool The tag object's offset within the $this->tags |
|
782 | + * @return \OCP\AppFramework\Db\Entity The tag object's offset within the $this->tags |
|
775 | 783 | * array or false if it doesn't exist. |
776 | 784 | */ |
777 | 785 | private function getTagByName($name) { |
@@ -782,7 +790,7 @@ discard block |
||
782 | 790 | * Get a tag by its ID. |
783 | 791 | * |
784 | 792 | * @param string $id The tag ID to look for. |
785 | - * @return integer|bool The tag object's offset within the $this->tags |
|
793 | + * @return \OCP\AppFramework\Db\Entity The tag object's offset within the $this->tags |
|
786 | 794 | * array or false if it doesn't exist. |
787 | 795 | */ |
788 | 796 | private function getTagById($id) { |
@@ -103,7 +103,7 @@ |
||
103 | 103 | /** |
104 | 104 | * Appends a variable |
105 | 105 | * @param string $key key |
106 | - * @param mixed $value value |
|
106 | + * @param string $value value |
|
107 | 107 | * @return boolean|null |
108 | 108 | * |
109 | 109 | * This function assigns a variable in an array context. If the key already |
@@ -179,7 +179,7 @@ |
||
179 | 179 | * |
180 | 180 | * @param string $loginName |
181 | 181 | * @param string $password |
182 | - * @return mixed the User object on success, false otherwise |
|
182 | + * @return string|null the User object on success, false otherwise |
|
183 | 183 | */ |
184 | 184 | public function checkPassword($loginName, $password) { |
185 | 185 | $loginName = str_replace("\0", '', $loginName); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | * |
293 | 293 | * @param string $uid |
294 | 294 | * @param string $password |
295 | - * @return boolean|null |
|
295 | + * @return boolean |
|
296 | 296 | * @throws LoginException |
297 | 297 | */ |
298 | 298 | public function login($uid, $password) { |
@@ -368,6 +368,9 @@ discard block |
||
368 | 368 | return $this->config->getSystemValue('token_auth_enforced', false); |
369 | 369 | } |
370 | 370 | |
371 | + /** |
|
372 | + * @param string $username |
|
373 | + */ |
|
371 | 374 | protected function isTwoFactorEnforced($username) { |
372 | 375 | Util::emitHook( |
373 | 376 | '\OCA\Files_Sharing\API\Server2Server', |
@@ -385,7 +388,7 @@ discard block |
||
385 | 388 | /** |
386 | 389 | * Check if the given 'password' is actually a device token |
387 | 390 | * |
388 | - * @param type $password |
|
391 | + * @param string $password |
|
389 | 392 | * @return boolean |
390 | 393 | */ |
391 | 394 | public function isTokenPassword($password) { |
@@ -435,6 +438,9 @@ discard block |
||
435 | 438 | return false; |
436 | 439 | } |
437 | 440 | |
441 | + /** |
|
442 | + * @param string $uid |
|
443 | + */ |
|
438 | 444 | private function loginWithToken($uid) { |
439 | 445 | // TODO: $this->manager->emit('\OC\User', 'preTokenLogin', array($uid)); |
440 | 446 | $user = $this->manager->get($uid); |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | /** |
328 | 328 | * get the users email address |
329 | 329 | * |
330 | - * @return string|null |
|
330 | + * @return string |
|
331 | 331 | * @since 9.0.0 |
332 | 332 | */ |
333 | 333 | public function getEMailAddress() { |
@@ -412,6 +412,10 @@ discard block |
||
412 | 412 | return $url; |
413 | 413 | } |
414 | 414 | |
415 | + /** |
|
416 | + * @param string $feature |
|
417 | + * @param string $value |
|
418 | + */ |
|
415 | 419 | public function triggerChange($feature, $value = null) { |
416 | 420 | if ($this->emitter) { |
417 | 421 | $this->emitter->emit('\OC\User', 'changeUser', array($this, $feature, $value)); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | * DispatcherEvent constructor. |
47 | 47 | * |
48 | 48 | * @param string $event |
49 | - * @param $appID |
|
49 | + * @param string $appID |
|
50 | 50 | * @param \OCP\IGroup[] $groups |
51 | 51 | * @since 9.0.0 |
52 | 52 | */ |
@@ -308,6 +308,7 @@ discard block |
||
308 | 308 | * @param array $params the parameters of the sql query |
309 | 309 | * @param int $limit the maximum number of rows |
310 | 310 | * @param int $offset from which row we want to start |
311 | + * @param string $msg |
|
311 | 312 | * @return string formatted error message string |
312 | 313 | * @since 9.1.0 |
313 | 314 | */ |
@@ -360,7 +361,7 @@ discard block |
||
360 | 361 | * Returns an db result and throws exceptions when there are more or less |
361 | 362 | * results |
362 | 363 | * @param string $sql the sql query |
363 | - * @param array $params the parameters of the sql query |
|
364 | + * @param string[] $params the parameters of the sql query |
|
364 | 365 | * @param int $limit the maximum number of rows |
365 | 366 | * @param int $offset from which row we want to start |
366 | 367 | * @throws DoesNotExistException if the item does not exist |