1 | <?php |
||
11 | class DateField extends Field |
||
12 | { |
||
13 | /** |
||
14 | * @var DateStyle|null |
||
15 | */ |
||
16 | private $dateStyle; |
||
17 | |||
18 | /** |
||
19 | * @var DateStyle|null; |
||
20 | */ |
||
21 | private $timeStyle; |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | private $ignoresTimeZone = false; |
||
27 | |||
28 | /** |
||
29 | * @var bool |
||
30 | */ |
||
31 | private $isRelative = false; |
||
32 | |||
33 | 9 | public function __construct(?string $key = null, ?DateTimeImmutable $date = null, ?string $label = null) |
|
41 | |||
42 | 9 | public function setDate(DateTimeImmutable $date): void |
|
46 | |||
47 | 1 | public function setDateStyle(DateStyle $dateStyle): void |
|
51 | |||
52 | 1 | public function setTimeStyle(DateStyle $timeStyle): void |
|
56 | |||
57 | 1 | public function ignoresTimeZone(): void |
|
61 | |||
62 | 1 | public function isRelative(): void |
|
66 | |||
67 | 9 | public function getMetadata(): array |
|
89 | } |
||
90 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.