Code cleanup

This commit is contained in:
James Cole
2023-11-04 14:18:49 +01:00
parent 5a35960434
commit ba0843d0bb
211 changed files with 566 additions and 568 deletions

View File

@@ -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;