Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
22 | public function __construct(array $excludedDays = []) |
||
23 | { |
||
24 | 1 | $this->excludedDays = array_unique($excludedDays); |
|
25 | |||
26 | 1 | sort($this->excludedDays); |
|
27 | |||
28 | 1 | if (count($this->excludedDays) >= 7) { |
|
29 | 1 | throw new \InvalidArgumentException('At least one day of the week must be allowed'); |
|
30 | } |
||
31 | 1 | } |
|
32 | |||
47 |