Fix phpstan issues.

This commit is contained in:
James Cole
2025-09-07 06:25:26 +02:00
parent bf53f5d6b7
commit b87b99a755
19 changed files with 81 additions and 115 deletions

View File

@@ -25,6 +25,8 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\System;
use function Safe\file_put_contents;
use function Safe\json_encode;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command;
use Symfony\Component\Console\Command\Command as CommandAlias;

View File

@@ -78,8 +78,8 @@ class ScansAttachments extends Command
}
$tempFileName = tempnam(sys_get_temp_dir(), 'FireflyIII');
file_put_contents($tempFileName, $decryptedContent);
$attachment->md5 = (string)md5_file($tempFileName);
$attachment->mime = (string)mime_content_type($tempFileName);
$attachment->md5 = md5_file($tempFileName);
$attachment->mime = mime_content_type($tempFileName);
$attachment->save();
$this->friendlyInfo(sprintf('Fixed attachment #%d', $attachment->id));
}