Fix phpstan issues.

This commit is contained in:
James Cole
2024-04-23 19:40:48 +02:00
parent f43aadf02d
commit fa3ccbda33
18 changed files with 61 additions and 111 deletions

View File

@@ -130,12 +130,12 @@ class MailError extends Job implements ShouldQueue
}
if (file_exists($file)) {
Log::debug(sprintf('Read file in "%s"', $file));
$limits = json_decode(file_get_contents($file), true);
$limits = json_decode((string)file_get_contents($file), true);
}
// limit reached?
foreach ($types as $type => $info) {
Log::debug(sprintf('Now checking limit "%s"', $type), $info);
if (!isset($limits[$type])) {
if (!array_key_exists($type, $limits)) {
Log::debug(sprintf('Limit "%s" reset to zero, did not exist yet.', $type));
$limits[$type] = [
'time' => time(),