diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-11-07 13:40:30 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-01-02 15:02:28 +0100 |
commit | a372564850cb2f8813c4c3cca67bd1b6cfcdb882 (patch) | |
tree | fc879b783dae0d038c60111b7adbb3b0749c6d09 /lib | |
parent | e4e20bf40ad8ca139655b36a6efa2b1710ae50f0 (diff) | |
download | nextcloud-server-a372564850cb2f8813c4c3cca67bd1b6cfcdb882.tar.gz nextcloud-server-a372564850cb2f8813c4c3cca67bd1b6cfcdb882.zip |
Fix psalm spotted errors with new requirements
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php | 2 | ||||
-rw-r--r-- | lib/private/KnownUser/KnownUserMapper.php | 5 | ||||
-rwxr-xr-x | lib/private/LargeFileHelper.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/Office.php | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php b/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php index 935a15af4cf..3a29b164b01 100644 --- a/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php +++ b/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php @@ -31,7 +31,7 @@ use OC\Files\Filesystem; */ class EncodingDirectoryWrapper extends DirectoryWrapper { /** - * @return string + * @return string|false */ public function dir_readdir() { $file = readdir($this->source); diff --git a/lib/private/KnownUser/KnownUserMapper.php b/lib/private/KnownUser/KnownUserMapper.php index 864ece36345..ce7dc9ead63 100644 --- a/lib/private/KnownUser/KnownUserMapper.php +++ b/lib/private/KnownUser/KnownUserMapper.php @@ -32,7 +32,6 @@ use OCP\IDBConnection; * @method KnownUser mapRowToEntity(array $row) */ class KnownUserMapper extends QBMapper { - /** * @param IDBConnection $db */ @@ -49,7 +48,7 @@ class KnownUserMapper extends QBMapper { $query->delete($this->getTableName()) ->where($query->expr()->eq('known_to', $query->createNamedParameter($knownTo))); - return (int) $query->execute(); + return $query->executeStatement(); } /** @@ -61,7 +60,7 @@ class KnownUserMapper extends QBMapper { $query->delete($this->getTableName()) ->where($query->expr()->eq('known_user', $query->createNamedParameter($knownUser))); - return (int) $query->execute(); + return $query->executeStatement(); } /** diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index 82b3c5ae760..a9c5a329620 100755 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -50,7 +50,7 @@ class LargeFileHelper { /** * @brief Checks whether our assumptions hold on the PHP platform we are on. * - * @throws \RunTimeException if our assumptions do not hold on the current + * @throws \RuntimeException if our assumptions do not hold on the current * PHP platform. */ public function __construct() { diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php index 6717584e887..3ba7c5a21a0 100644 --- a/lib/private/Preview/Office.php +++ b/lib/private/Preview/Office.php @@ -71,7 +71,7 @@ abstract class Office extends ProviderV2 { [$dirname, , , $filename] = array_values(pathinfo($absPath)); $pngPreview = $tmpDir . '/' . $filename . '.png'; - $png = new \imagick($pngPreview . '[0]'); + $png = new \Imagick($pngPreview . '[0]'); $png->setImageFormat('jpg'); } catch (\Exception $e) { $this->cleanTmpFiles(); |