| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 8 | abstract class DateFormatComparator extends Constraint |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var \DateTimeInterface |
||
| 12 | */ |
||
| 13 | protected $date; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $format; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * IsSameUsingFormat constructor. |
||
| 22 | * |
||
| 23 | * @param \DateTimeInterface $date |
||
| 24 | * @param $format |
||
| 25 | */ |
||
| 26 | 23 | protected function __construct(\DateTimeInterface $date, string $format) |
|
| 27 | { |
||
| 28 | 23 | $this->date = $date; |
|
| 29 | 23 | $this->format = $format; |
|
| 30 | 23 | } |
|
| 31 | |||
| 32 | 14 | protected function matches($other): bool |
|
| 36 | } |
||
| 37 | } |
||
| 38 |