diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 915976d7dd3e6..3b5840cce580d 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2602,7 +2602,7 @@ public function deleteSubscription($subscriptionId) { * * @param string $principalUri * @param string $objectUri - * @return array + * @return array|null */ public function getSchedulingObject($principalUri, $objectUri) { $query = $this->db->getQueryBuilder(); diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index d2ad4cafb981c..6788968d80a6e 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -157,7 +157,7 @@ public function getPrincipalsByPrefix($prefixPath): array { * * @param string $prefixPath * - * @return array + * @return array|null */ public function getPrincipalByPath($path) { if (strpos($path, $this->principalPrefix) !== 0) { diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index d7bad8d74cadf..64d9f092b08ce 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -543,7 +543,7 @@ public function getCards($addressbookId) { * * @param mixed $addressBookId * @param string $cardUri - * @return array + * @return array|false */ public function getCard($addressBookId, $cardUri) { $query = $this->db->getQueryBuilder(); diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 36842abc8c99d..bd000061e5a72 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -183,7 +183,7 @@ public function getSupportedReportSet($uri) { public function onReport($reportName, $report, $uri) { $reportTargetNode = $this->server->tree->getNodeForPath($uri); if (!$reportTargetNode instanceof Directory || $reportName !== self::REPORT_NAME) { - return; + return false; } $ns = '{' . $this::NS_OWNCLOUD . '}'; diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index b1f1da6f63df4..614e8c9934b14 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -159,7 +159,7 @@ public function getPrincipalsByPrefix($prefixPath) { * getPrincipalsByPrefix. * * @param string $path - * @return array + * @return array|null */ public function getPrincipalByPath($path) { [$prefix, $name] = \Sabre\Uri\split($path); diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php index da5dd8749052e..7fd8bffca1aab 100644 --- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php @@ -158,7 +158,7 @@ private function getTagsAndFav($fileId) { * Returns tags for the given file id * * @param integer $fileId file id - * @return array list of tags for that file + * @return array|null list of tags for that file */ private function getTags($fileId) { if (isset($this->cachedTags[$fileId])) { diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index f1f15fd61a6d7..4e3e06b742971 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -101,7 +101,7 @@ public function getPrincipalsByPrefix($prefixPath) { * getPrincipalsByPrefix. * * @param string $path - * @return array + * @return array|null */ public function getPrincipalByPath($path) { $elements = explode('/', $path, 3); diff --git a/apps/dav/lib/DAV/SystemPrincipalBackend.php b/apps/dav/lib/DAV/SystemPrincipalBackend.php index d5739212e86d8..8915a56acc0c1 100644 --- a/apps/dav/lib/DAV/SystemPrincipalBackend.php +++ b/apps/dav/lib/DAV/SystemPrincipalBackend.php @@ -65,7 +65,7 @@ public function getPrincipalsByPrefix($prefixPath) { * getPrincipalsByPrefix. * * @param string $path - * @return array + * @return array|null */ public function getPrincipalByPath($path) { if ($path === 'principals/system/system') { diff --git a/core/Command/Config/ListConfigs.php b/core/Command/Config/ListConfigs.php index 4adb0a9df5b79..07a80fe58aae6 100644 --- a/core/Command/Config/ListConfigs.php +++ b/core/Command/Config/ListConfigs.php @@ -135,7 +135,7 @@ protected function getSystemConfigs($noSensitiveValues) { */ protected function getAppConfigs($app, $noSensitiveValues) { if ($noSensitiveValues) { - return $this->appConfig->getFilteredValues($app, false); + return $this->appConfig->getFilteredValues($app); } else { return $this->appConfig->getValues($app, false); } diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php index 095b026cb4488..d48c5c6157e9c 100644 --- a/lib/private/App/AppStore/Fetcher/Fetcher.php +++ b/lib/private/App/AppStore/Fetcher/Fetcher.php @@ -187,7 +187,7 @@ public function get($allowUnstable = false) { // Refresh the file content try { - $responseJson = $this->fetch($ETag, $content, $allowUnstable); + $responseJson = $this->fetch($ETag, $content); if (empty($responseJson)) { return []; diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php index 79d051fd2a1f6..3d33d41e5885e 100644 --- a/lib/private/App/InfoParser.php +++ b/lib/private/App/InfoParser.php @@ -235,7 +235,7 @@ private function isNavigationItem($data): bool { /** * @param \SimpleXMLElement $xml - * @return array + * @return array|string */ public function xmlToArray($xml) { if (!$xml->children()) { diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index af4fda277d6cf..4f64395dcd879 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -618,7 +618,7 @@ public function searchForObjects(string $search, string $objectType, array $obje * @param \DateTime $notOlderThan optional, timestamp of the oldest comments * that may be returned * @param string $verb Limit the verb of the comment - Added in 14.0.0 - * @return Int + * @return int * @since 9.0.0 */ public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '') { diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php index c39f7c715cc16..531fb16949e5c 100644 --- a/lib/private/ContactsManager.php +++ b/lib/private/ContactsManager.php @@ -92,7 +92,7 @@ public function search($pattern, $searchProperties = [], $options = []) { * * @param int $id the unique identifier to a contact * @param string $address_book_key identifier of the address book in which the contact shall be deleted - * @return bool successful or not + * @return bool|null successful or not */ public function delete($id, $address_book_key) { $addressBook = $this->getAddressBook($address_book_key); @@ -113,7 +113,7 @@ public function delete($id, $address_book_key) { * * @param array $properties this array if key-value-pairs defines a contact * @param string $address_book_key identifier of the address book in which the contact shall be created or updated - * @return array representing the contact just created or updated + * @return array|null representing the contact just created or updated */ public function createOrUpdate($properties, $address_book_key) { $addressBook = $this->getAddressBook($address_book_key); @@ -194,7 +194,7 @@ public function register(\Closure $callable) { * Get (and load when needed) the address book for $key * * @param string $addressBookKey - * @return IAddressBook + * @return IAddressBook|null */ protected function getAddressBook($addressBookKey) { $this->loadAddressBooks(); diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index 85c6a72dfdbd5..a1289ffcfc730 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -321,7 +321,7 @@ protected function logQueryToFile(string $sql): void { * * @param string $seqName Name of the sequence object from which the ID should be returned. * - * @return string the last inserted ID. + * @return int the last inserted ID. * @throws Exception */ public function lastInsertId($seqName = null) { diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 67d01bb699907..b1b9fc95b42e9 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -1066,7 +1066,7 @@ public function getPathById($id) { * instead does a global search in the cache table * * @param int $id - * @return array first element holding the storage id, second the path + * @return array|null first element holding the storage id, second the path * @deprecated use getPathById() instead */ public static function getById($id) { diff --git a/lib/private/Files/Mount/ObjectHomeMountProvider.php b/lib/private/Files/Mount/ObjectHomeMountProvider.php index 77912adfd34ed..b049903de7497 100644 --- a/lib/private/Files/Mount/ObjectHomeMountProvider.php +++ b/lib/private/Files/Mount/ObjectHomeMountProvider.php @@ -53,7 +53,7 @@ public function __construct(IConfig $config) { * * @param IUser $user * @param IStorageFactory $loader - * @return \OCP\Files\Mount\IMountPoint + * @return \OCP\Files\Mount\IMountPoint|null */ public function getHomeMountForUser(IUser $user, IStorageFactory $loader) { $config = $this->getMultiBucketObjectStoreConfig($user); diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php index 8c01d6609155c..5ee0f10d5f421 100644 --- a/lib/private/Share20/ProviderFactory.php +++ b/lib/private/Share20/ProviderFactory.php @@ -114,7 +114,7 @@ protected function defaultShareProvider() { /** * Create the federated share provider * - * @return FederatedShareProvider + * @return FederatedShareProvider|null */ protected function federatedShareProvider() { if ($this->federatedProvider === null) { @@ -171,7 +171,7 @@ protected function federatedShareProvider() { /** * Create the federated share provider * - * @return ShareByMailProvider + * @return ShareByMailProvider|null */ protected function getShareByMailProvider() { if ($this->shareByMailProvider === null) { @@ -211,7 +211,7 @@ protected function getShareByMailProvider() { /** * Create the circle share provider * - * @return FederatedShareProvider + * @return FederatedShareProvider|null * * @suppress PhanUndeclaredClassMethod */ @@ -245,7 +245,7 @@ protected function getShareByCircleProvider() { /** * Create the room share provider * - * @return RoomShareProvider + * @return RoomShareProvider|null */ protected function getRoomShareProvider() { if ($this->roomShareProvider === null) { diff --git a/lib/private/TagManager.php b/lib/private/TagManager.php index 82c4dd2188d8d..091e1c1e6ab75 100644 --- a/lib/private/TagManager.php +++ b/lib/private/TagManager.php @@ -63,7 +63,7 @@ public function __construct(TagMapper $mapper, IUserSession $userSession, IDBCon * @param boolean $includeShared Whether to include tags for items shared with this user by others. * @param string $userId user for which to retrieve the tags, defaults to the currently * logged in user - * @return \OCP\ITags + * @return \OCP\ITags|null * * since 20.0.0 $includeShared isn't used anymore */ diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 9ef1bc67a58d0..411227a6d4bf1 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -342,7 +342,7 @@ public function searchKnownUsersByDisplayName(string $searcher, string $pattern, * * @param string $loginName The loginname * @param string $password The password - * @return string + * @return string|false * * Check if the password is correct without logging in the user * returns the user id or false diff --git a/lib/private/legacy/OC_API.php b/lib/private/legacy/OC_API.php index 275e02986c4b2..fe8d72932aa3e 100644 --- a/lib/private/legacy/OC_API.php +++ b/lib/private/legacy/OC_API.php @@ -135,7 +135,7 @@ protected static function isV2(\OCP\IRequest $request) { /** * @param integer $sc - * @return int + * @return int|null */ public static function mapStatusCodes($sc) { switch ($sc) { diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index ac449a62a4ffb..7f5aabe2e75b6 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -283,7 +283,7 @@ public function enable(string $appId, /** * Get the path where to install apps * - * @return string|false + * @return string|false|null */ public static function getInstallPath() { foreach (OC::$APPSROOTS as $dir) { diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php index ce89a6427411d..15de431027e73 100644 --- a/lib/private/legacy/OC_Defaults.php +++ b/lib/private/legacy/OC_Defaults.php @@ -234,7 +234,7 @@ public function getEntity() { */ public function getSlogan(?string $lang = null) { if ($this->themeExist('getSlogan')) { - return $this->theme->getSlogan($lang); + return $this->theme->getSlogan(); } else { if ($this->defaultSlogan === null) { $l10n = \OC::$server->getL10N('lib', $lang); diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 8d7ffd164b3af..69975663144a6 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -198,7 +198,7 @@ public function searchForObjects(string $search, string $objectType, array $obje * @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments * that may be returned * @param string $verb Limit the verb of the comment - Added in 14.0.0 - * @return Int + * @return int * @since 9.0.0 */ public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '');