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 | public function __construct() |
||
42 | |||
43 | /** |
||
44 | * @return DateTime |
||
45 | */ |
||
46 | public function occurredOn() |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function eventName() |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function stopPropagation() |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function isPropagationStopped() |
||
74 | |||
75 | /** |
||
76 | * @param string $property |
||
77 | * @param mixed $value |
||
78 | */ |
||
79 | protected function setMetadata($property, $value) |
||
83 | |||
84 | /** |
||
85 | * @param string $property |
||
86 | * |
||
87 | * @return mixed |
||
88 | */ |
||
89 | protected function getMetadata($property) |
||
93 | |||
94 | /** |
||
95 | * @param string $property |
||
96 | * @param mixed $value |
||
97 | */ |
||
98 | protected function setPayload($property, $value) |
||
102 | |||
103 | /** |
||
104 | * @param string $property |
||
105 | * |
||
106 | * @return mixed |
||
107 | */ |
||
108 | protected function getPayload($property) |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public static function fromArray(array $data) |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | public function toArray() |
||
138 | } |
||
139 |
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.