Various code cleanup.

This commit is contained in:
James Cole
2023-11-05 19:41:37 +01:00
parent a0564751d6
commit 1d2e95f5af
136 changed files with 1171 additions and 514 deletions

View File

@@ -144,7 +144,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
$route = $request->route();
$param = $route->parameter('account');
if ($param instanceof Account) {
$accountId = (int)$param->id;
$accountId = $param->id;
}
if (!($param instanceof Account)) {
$accountId = (int)$param;

View File

@@ -36,6 +36,7 @@ final class IntervalException extends Exception
{
public array $availableIntervals;
public Periodicity $periodicity;
/** @var mixed */
protected $message = 'The periodicity %s is unknown. Choose one of available periodicity: %s';
public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null)