Skip to content

Commit

Permalink
Fix InvalidPeriodException with WEEK
Browse files Browse the repository at this point in the history
  • Loading branch information
eliseekn committed Aug 23, 2023
1 parent 583a60b commit 85238a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LaravelMetrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function by(string $period, int $count = 0): self
{
$period = strtolower($period);

if (!in_array($period, [self::DAY, self::MONTH, self::YEAR])) {
if (!in_array($period, [self::DAY, self::WEEK, self::MONTH, self::YEAR])) {
throw new InvalidPeriodException();
}

Expand Down

0 comments on commit 85238a9

Please sign in to comment.