1 | <?php |
||
19 | final class ReceivedEvent implements Event |
||
20 | { |
||
21 | /** |
||
22 | * @var Event |
||
23 | */ |
||
24 | private $originalEvent; |
||
25 | |||
26 | /** |
||
27 | * ReceivedEvent constructor. |
||
28 | * |
||
29 | * @param Event $originalEvent |
||
30 | */ |
||
31 | public function __construct(Event $originalEvent) |
||
35 | |||
36 | /** |
||
37 | * Get original event. |
||
38 | * |
||
39 | * @return Event |
||
40 | */ |
||
41 | public function getOriginalEvent(): Event |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | * |
||
49 | * @throws ReceivedEventException |
||
50 | */ |
||
51 | public function has(string $parameter): bool |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | * |
||
59 | * @throws ReceivedEventException |
||
60 | * |
||
61 | * @return mixed |
||
|
|||
62 | */ |
||
63 | public function get(string $parameter) |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | * |
||
71 | * @throws ReceivedEventException |
||
72 | * |
||
73 | * @return array<string, mixed> |
||
74 | */ |
||
75 | public function getPayload(): array |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | * |
||
83 | * @throws ReceivedEventException |
||
84 | * |
||
85 | * @return array<string, mixed> |
||
86 | */ |
||
87 | public function getMetadata(): array |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | * |
||
95 | * @throws ReceivedEventException |
||
96 | * |
||
97 | * @return array<string, mixed> |
||
98 | */ |
||
99 | public function withMetadata(array $metadata) |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | * |
||
107 | * @throws ReceivedEventException |
||
108 | */ |
||
109 | public function getCreatedAt(): \DateTimeImmutable |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | * |
||
117 | * @throws ReceivedEventException |
||
118 | */ |
||
119 | public static function reconstitute(array $payload, array $attributes = []): void |
||
123 | } |
||
124 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.