| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | trait DateTimeFactory |
||
| 14 | { |
||
| 15 | abstract public function add(Rule|RuleSet ...$rules): RuleSet; |
||
| 16 | |||
| 17 | public function isPast(?string $message = null): RuleSet |
||
| 18 | { |
||
| 19 | return $this->add(new IsPast($message)); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function isFuture(?string $message = null): RuleSet |
||
| 23 | { |
||
| 24 | return $this->add(new IsFuture($message)); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function currentDay(?string $message = null): RuleSet |
||
| 28 | { |
||
| 29 | return $this->add(new CurrentDay($message)); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function currentMonth(bool $sameYear = true, ?string $message = null): RuleSet |
||
| 35 | } |
||
| 36 | |||
| 37 | public function currentYear(?string $message = null): RuleSet |
||
| 38 | { |
||
| 42 |