1 | <?php |
||
21 | class DomainEvent extends Event implements DomainEventInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $metadata = []; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | private $payload = []; |
||
32 | |||
33 | /** |
||
34 | * DomainEvent constructor. |
||
35 | * |
||
36 | * @param string|null $eventName |
||
37 | */ |
||
38 | public function __construct($eventName = null) |
||
46 | |||
47 | /** |
||
48 | * @return DateTime |
||
49 | */ |
||
50 | public function occurredOn() |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function eventName() |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function stopPropagation() |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function isPropagationStopped() |
||
78 | |||
79 | /** |
||
80 | * @param string $property |
||
81 | * @param mixed $value |
||
82 | */ |
||
83 | protected function setMetadata($property, $value) |
||
87 | |||
88 | /** |
||
89 | * @param string $property |
||
90 | * |
||
91 | * @return mixed |
||
92 | */ |
||
93 | protected function getMetadata($property) |
||
97 | |||
98 | /** |
||
99 | * @param string $property |
||
100 | * @param mixed $value |
||
101 | */ |
||
102 | protected function setPayload($property, $value) |
||
106 | |||
107 | /** |
||
108 | * @param string $property |
||
109 | * |
||
110 | * @return mixed |
||
111 | */ |
||
112 | protected function getPayload($property) |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | public static function fromArray(array $data) |
||
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | public function toArray() |
||
142 | } |
||
143 |
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.