@@ -323,7 +323,7 @@ |
||
323 | 323 | /** |
324 | 324 | * find all available languages for an app |
325 | 325 | * @param string $app App that needs to be translated |
326 | - * @return array an array of available languages |
|
326 | + * @return string[] an array of available languages |
|
327 | 327 | * @deprecated 9.0.0 Use \OC::$server->getL10NFactory()->findAvailableLanguages() instead |
328 | 328 | */ |
329 | 329 | public static function findAvailableLanguages($app=null) { |
@@ -169,10 +169,10 @@ |
||
169 | 169 | $identifier = "_${text_singular}_::_${text_plural}_"; |
170 | 170 | if( array_key_exists($identifier, $this->translations)) { |
171 | 171 | return new OC_L10N_String( $this, $identifier, $parameters, $count ); |
172 | - }else{ |
|
172 | + } else{ |
|
173 | 173 | if($count === 1) { |
174 | 174 | return new OC_L10N_String($this, $text_singular, $parameters, $count); |
175 | - }else{ |
|
175 | + } else{ |
|
176 | 176 | return new OC_L10N_String($this, $text_plural, $parameters, $count); |
177 | 177 | } |
178 | 178 | } |
@@ -289,6 +289,9 @@ discard block |
||
289 | 289 | return $calendar; |
290 | 290 | } |
291 | 291 | |
292 | + /** |
|
293 | + * @param integer $calendarId |
|
294 | + */ |
|
292 | 295 | public function getCalendarById($calendarId) { |
293 | 296 | $fields = array_values($this->propertyMap); |
294 | 297 | $fields[] = 'id'; |
@@ -597,7 +600,7 @@ discard block |
||
597 | 600 | * calendar-data. If the result of a subsequent GET to this object is not |
598 | 601 | * the exact same as this request body, you should omit the ETag. |
599 | 602 | * |
600 | - * @param mixed $calendarId |
|
603 | + * @param integer $calendarId |
|
601 | 604 | * @param string $objectUri |
602 | 605 | * @param string $calendarData |
603 | 606 | * @return string |
@@ -1036,7 +1039,7 @@ discard block |
||
1036 | 1039 | * @param string $principalUri |
1037 | 1040 | * @param string $uri |
1038 | 1041 | * @param array $properties |
1039 | - * @return mixed |
|
1042 | + * @return integer |
|
1040 | 1043 | */ |
1041 | 1044 | function createSubscription($principalUri, $uri, array $properties) { |
1042 | 1045 | |
@@ -1377,6 +1380,9 @@ discard block |
||
1377 | 1380 | return $this->sharingBackend->applyShareAcl($resourceId, $acl); |
1378 | 1381 | } |
1379 | 1382 | |
1383 | + /** |
|
1384 | + * @param boolean $toV2 |
|
1385 | + */ |
|
1380 | 1386 | private function convertPrincipal($principalUri, $toV2) { |
1381 | 1387 | if ($this->principalBackend->getPrincipalPrefix() === 'principals') { |
1382 | 1388 | list(, $name) = URLUtil::splitPath($principalUri); |
@@ -808,7 +808,9 @@ |
||
808 | 808 | $stmt = $query->execute(); |
809 | 809 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
810 | 810 | |
811 | - if(!$row) return null; |
|
811 | + if(!$row) { |
|
812 | + return null; |
|
813 | + } |
|
812 | 814 | |
813 | 815 | return [ |
814 | 816 | 'id' => $row['id'], |
@@ -867,6 +867,7 @@ discard block |
||
867 | 867 | * * readOnly - boolean |
868 | 868 | * * summary - Optional, a description for the share |
869 | 869 | * |
870 | + * @param integer $addressBookId |
|
870 | 871 | * @return array |
871 | 872 | */ |
872 | 873 | public function getShares($addressBookId) { |
@@ -966,7 +967,7 @@ discard block |
||
966 | 967 | |
967 | 968 | /** |
968 | 969 | * For shared address books the sharee is set in the ACL of the address book |
969 | - * @param $addressBookId |
|
970 | + * @param integer $addressBookId |
|
970 | 971 | * @param $acl |
971 | 972 | * @return array |
972 | 973 | */ |
@@ -974,6 +975,9 @@ discard block |
||
974 | 975 | return $this->sharingBackend->applyShareAcl($addressBookId, $acl); |
975 | 976 | } |
976 | 977 | |
978 | + /** |
|
979 | + * @param boolean $toV2 |
|
980 | + */ |
|
977 | 981 | private function convertPrincipal($principalUri, $toV2) { |
978 | 982 | if ($this->principalBackend->getPrincipalPrefix() === 'principals') { |
979 | 983 | list(, $name) = URLUtil::splitPath($principalUri); |
@@ -745,7 +745,9 @@ |
||
745 | 745 | $stmt->execute([ $addressBookId ]); |
746 | 746 | $currentToken = $stmt->fetchColumn(0); |
747 | 747 | |
748 | - if (is_null($currentToken)) return null; |
|
748 | + if (is_null($currentToken)) { |
|
749 | + return null; |
|
750 | + } |
|
749 | 751 | |
750 | 752 | $result = [ |
751 | 753 | 'syncToken' => $currentToken, |
@@ -246,7 +246,7 @@ |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
249 | - * @return array|null |
|
249 | + * @return string |
|
250 | 250 | */ |
251 | 251 | public function getLocalSystemAddressBook() { |
252 | 252 | if (is_null($this->localSystemAddressBook)) { |
@@ -115,7 +115,7 @@ |
||
115 | 115 | /** |
116 | 116 | * Returns an array with all the child nodes |
117 | 117 | * |
118 | - * @return \Sabre\DAV\INode[] |
|
118 | + * @return CommentNode[] |
|
119 | 119 | */ |
120 | 120 | function getChildren() { |
121 | 121 | return $this->findChildren(); |
@@ -146,7 +146,7 @@ |
||
146 | 146 | /** |
147 | 147 | * Returns an array with all the child nodes |
148 | 148 | * |
149 | - * @return \Sabre\DAV\INode[] |
|
149 | + * @return EntityTypeCollection[] |
|
150 | 150 | */ |
151 | 151 | function getChildren() { |
152 | 152 | $this->initCollections(); |
@@ -64,6 +64,9 @@ |
||
64 | 64 | ); |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @param boolean $toV2 |
|
69 | + */ |
|
67 | 70 | private function convertPrincipal($principal, $toV2) { |
68 | 71 | list(, $name) = URLUtil::splitPath($principal); |
69 | 72 | if ($toV2) { |
@@ -53,7 +53,9 @@ |
||
53 | 53 | function getCurrentUserPrincipals() { |
54 | 54 | $principalV2 = $this->getCurrentUserPrincipal(); |
55 | 55 | |
56 | - if (is_null($principalV2)) return []; |
|
56 | + if (is_null($principalV2)) { |
|
57 | + return []; |
|
58 | + } |
|
57 | 59 | |
58 | 60 | $principalV1 = $this->convertPrincipal($principalV2, false); |
59 | 61 | return array_merge( |
@@ -95,7 +95,7 @@ |
||
95 | 95 | * returns a reference to the comments node |
96 | 96 | * |
97 | 97 | * @param Node $node |
98 | - * @return mixed|string |
|
98 | + * @return null|string |
|
99 | 99 | */ |
100 | 100 | public function getCommentsLink(Node $node) { |
101 | 101 | $href = $this->server->getBaseUri(); |
@@ -75,7 +75,7 @@ |
||
75 | 75 | private $cache = []; |
76 | 76 | |
77 | 77 | /** |
78 | - * @param Tree $tree node tree |
|
78 | + * @param ObjectTree $tree node tree |
|
79 | 79 | * @param IDBConnection $connection database connection |
80 | 80 | * @param IUser $user owner of the tree and properties |
81 | 81 | */ |