mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Code cleanup
This commit is contained in:
@@ -231,14 +231,12 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
private function shouldntReportLocal(Throwable $e): bool
|
||||
{
|
||||
return !is_null(
|
||||
Arr::first(
|
||||
return null !== Arr::first(
|
||||
$this->dontReport,
|
||||
function ($type) use ($e) {
|
||||
static function ($type) use ($e) {
|
||||
return $e instanceof $type;
|
||||
}
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -59,14 +59,14 @@ final class IntervalException extends Exception
|
||||
array $intervals,
|
||||
int $code = 0,
|
||||
?Throwable $previous = null
|
||||
): IntervalException {
|
||||
): self {
|
||||
$message = sprintf(
|
||||
'The periodicity %s is unknown. Choose one of available periodicity: %s',
|
||||
$periodicity->name,
|
||||
join(', ', $intervals)
|
||||
implode(', ', $intervals)
|
||||
);
|
||||
|
||||
$exception = new IntervalException($message, $code, $previous);
|
||||
$exception = new self($message, $code, $previous);
|
||||
$exception->periodicity = $periodicity;
|
||||
$exception->availableIntervals = $intervals;
|
||||
return $exception;
|
||||
|
Reference in New Issue
Block a user