diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/AllConfig.php | 12 | ||||
-rw-r--r-- | lib/private/AppFramework/OCS/BaseResponse.php | 2 | ||||
-rw-r--r-- | lib/private/Authentication/TwoFactorAuth/EnforcementState.php | 2 | ||||
-rw-r--r-- | lib/private/Authentication/TwoFactorAuth/Manager.php | 2 | ||||
-rw-r--r-- | lib/private/DB/Migrator.php | 2 | ||||
-rw-r--r-- | lib/private/DB/MySQLMigrator.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Cache/Updater.php | 15 | ||||
-rw-r--r-- | lib/private/Group/Database.php | 3 | ||||
-rw-r--r-- | lib/private/Preview/GeneratorHelper.php | 3 | ||||
-rw-r--r-- | lib/private/Updater/ChangesCheck.php | 4 | ||||
-rw-r--r-- | lib/private/User/Session.php | 2 |
11 files changed, 30 insertions, 19 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index 9ccb443aabb..2eca9d55b28 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -129,7 +129,9 @@ class AllConfig implements \OCP\IConfig { * * @param string $key the key of the value, under which it was saved * @param mixed $default the default value to be returned if the value isn't set - * @return mixed the value or $default + * + * @return bool + * * @since 16.0.0 */ public function getSystemValueBool(string $key, bool $default = false): bool { @@ -141,7 +143,9 @@ class AllConfig implements \OCP\IConfig { * * @param string $key the key of the value, under which it was saved * @param mixed $default the default value to be returned if the value isn't set - * @return mixed the value or $default + * + * @return int + * * @since 16.0.0 */ public function getSystemValueInt(string $key, int $default = 0): int { @@ -153,7 +157,9 @@ class AllConfig implements \OCP\IConfig { * * @param string $key the key of the value, under which it was saved * @param mixed $default the default value to be returned if the value isn't set - * @return mixed the value or $default + * + * @return string + * * @since 16.0.0 */ public function getSystemValueString(string $key, string $default = ''): string { diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php index 68456289be5..c7aa5ad073b 100644 --- a/lib/private/AppFramework/OCS/BaseResponse.php +++ b/lib/private/AppFramework/OCS/BaseResponse.php @@ -48,7 +48,7 @@ abstract class BaseResponse extends Response { /** * BaseResponse constructor. * - * @param DataResponse|null $dataResponse + * @param DataResponse $dataResponse * @param string $format * @param string|null $statusMessage * @param int|null $itemsCount diff --git a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php index 46bcc596d92..abd0ec7f2e7 100644 --- a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php +++ b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php @@ -55,7 +55,7 @@ class EnforcementState implements JsonSerializable { } /** - * @return string[] + * @return bool */ public function isEnforced(): bool { return $this->enforced; diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index 7fba6d4874a..b048d4e1f3c 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -181,7 +181,7 @@ class Manager { /** * @param array $states - * @param IProvider $providers + * @param IProvider[] $providers */ private function isProviderMissing(array $states, array $providers): bool { $indexed = []; diff --git a/lib/private/DB/Migrator.php b/lib/private/DB/Migrator.php index cf4eb43bc8f..8b1621a5f55 100644 --- a/lib/private/DB/Migrator.php +++ b/lib/private/DB/Migrator.php @@ -62,7 +62,7 @@ class Migrator { private $noEmit = false; /** - * @param \Doctrine\DBAL\Connection|Connection $connection + * @param \Doctrine\DBAL\Connection $connection * @param ISecureRandom $random * @param IConfig $config * @param EventDispatcherInterface $dispatcher diff --git a/lib/private/DB/MySQLMigrator.php b/lib/private/DB/MySQLMigrator.php index 8cc537f6b75..73122fb0715 100644 --- a/lib/private/DB/MySQLMigrator.php +++ b/lib/private/DB/MySQLMigrator.php @@ -51,7 +51,7 @@ class MySQLMigrator extends Migrator { return $schemaDiff; } - + /** * Speed up migration test by disabling autocommit and unique indexes check * diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 3809d4c2aeb..59cff9b3a41 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -224,12 +224,15 @@ class Updater implements IUpdater { private function updateStorageMTimeOnly($internalPath) { $fileId = $this->cache->getId($internalPath); if ($fileId !== -1) { - $this->cache->update( - $fileId, [ - 'mtime' => null, // this magic tells it to not overwrite mtime - 'storage_mtime' => $this->storage->filemtime($internalPath) - ] - ); + $mtime = $this->storage->filemtime($internalPath); + if ($mtime !== false) { + $this->cache->update( + $fileId, [ + 'mtime' => null, // this magic tells it to not overwrite mtime + 'storage_mtime' => $mtime + ] + ); + } } } diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 450fffe573e..27dad809f89 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -400,7 +400,8 @@ class Database extends ABackend * get the number of disabled users in a group * * @param string $search - * @return int|bool + * + * @return int */ public function countDisabledInGroup(string $gid): int { $this->fixDI(); diff --git a/lib/private/Preview/GeneratorHelper.php b/lib/private/Preview/GeneratorHelper.php index 0e271947b56..470cad2d0a6 100644 --- a/lib/private/Preview/GeneratorHelper.php +++ b/lib/private/Preview/GeneratorHelper.php @@ -52,10 +52,11 @@ class GeneratorHelper { } /** - * @param IProvider $provider + * @param IProviderV2 $provider * @param File $file * @param int $maxWidth * @param int $maxHeight + * * @return bool|IImage */ public function getThumbnail(IProviderV2 $provider, File $file, $maxWidth, $maxHeight) { diff --git a/lib/private/Updater/ChangesCheck.php b/lib/private/Updater/ChangesCheck.php index 7346ceab6b1..259fb750c05 100644 --- a/lib/private/Updater/ChangesCheck.php +++ b/lib/private/Updater/ChangesCheck.php @@ -56,8 +56,8 @@ class ChangesCheck { $version = $this->normalizeVersion($version); $changesInfo = $this->mapper->getChanges($version); $changesData = json_decode($changesInfo->getData(), true); - if(empty($changesData)) { - throw new DoesNotExistException(); + if (empty($changesData)) { + throw new DoesNotExistException('Unable to decode changes info'); } return $changesData; } diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 4aa9074b4a4..602f779c901 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -317,7 +317,7 @@ class Session implements IUserSession, Emitter { } /** - * @return mixed + * @return null|string */ public function getImpersonatingUserID(): ?string { |