Fix code quality with rector [skip ci]

This commit is contained in:
James Cole
2025-11-09 09:08:03 +01:00
parent d2610be790
commit 68183a0a0e
209 changed files with 1021 additions and 1248 deletions

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Support\Binder;
use Illuminate\Support\Facades\Log;
use Carbon\Carbon;
use Carbon\Exceptions\InvalidDateException;
use Carbon\Exceptions\InvalidFormatException;
@@ -61,7 +62,7 @@ class Date implements BinderInterface
];
if (array_key_exists($value, $magicWords)) {
$return = $magicWords[$value];
app('log')->debug(sprintf('User requests "%s", so will return "%s"', $value, $return));
Log::debug(sprintf('User requests "%s", so will return "%s"', $value, $return));
return $return;
}
@@ -70,7 +71,7 @@ class Date implements BinderInterface
$result = new Carbon($value);
} catch (InvalidDateException|InvalidFormatException $e) { // @phpstan-ignore-line
$message = sprintf('Could not parse date "%s" for user #%d: %s', $value, auth()->user()->id, $e->getMessage());
app('log')->error($message);
Log::error($message);
throw new NotFoundHttpException('Could not parse value', $e);
}