PHPStan level 5

This commit is contained in:
Yassine Guedidi
2025-04-21 16:27:44 +02:00
parent 3ef7064ada
commit 36eb513e1b
22 changed files with 60 additions and 47 deletions

View File

@ -208,7 +208,7 @@ class DownloadImages
case 'png':
imagealphablending($im, false);
imagesavealpha($im, true);
imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9));
imagepng($im, $localPath, (int) ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9));
$this->logger->debug('DownloadImages: Re-creating png');
break;
case 'webp':
@ -254,7 +254,7 @@ class DownloadImages
*/
public function getRelativePath($entryId, $createFolder = true)
{
$hashId = hash('crc32', $entryId);
$hashId = hash('crc32', (string) $entryId);
$relativePath = $hashId[0] . '/' . $hashId[1] . '/' . $hashId;
$folderPath = $this->baseFolder . '/' . $relativePath;