Skip to content

Commit 85238a9

Browse files
committed
Fix InvalidPeriodException with WEEK
1 parent 583a60b commit 85238a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LaravelMetrics.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function by(string $period, int $count = 0): self
6060
{
6161
$period = strtolower($period);
6262

63-
if (!in_array($period, [self::DAY, self::MONTH, self::YEAR])) {
63+
if (!in_array($period, [self::DAY, self::WEEK, self::MONTH, self::YEAR])) {
6464
throw new InvalidPeriodException();
6565
}
6666

0 commit comments

Comments
 (0)