Total Complexity | 3 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
6 | class IsSameDayAs extends DateFormatComparator |
||
7 | { |
||
8 | 11 | public function __construct(\DateTimeInterface $date) |
|
9 | { |
||
10 | 11 | parent::__construct($date, 'Y-m-d'); |
|
11 | 11 | } |
|
12 | |||
13 | 3 | public function toString(): string |
|
14 | { |
||
15 | 3 | return \sprintf( |
|
16 | 3 | 'is the same day as %s', |
|
17 | 3 | $this->date->format($this->format) |
|
18 | ); |
||
19 | } |
||
20 | |||
21 | 3 | protected function failureDescription($other): string |
|
24 | } |
||
25 | } |
||
26 |