1 | <?php |
||
22 | class EventDispatcher |
||
23 | { |
||
24 | /** |
||
25 | * @var EventDispatcherInterface |
||
26 | */ |
||
27 | private $eventDispatcher; |
||
28 | |||
29 | /** |
||
30 | * @param EventDispatcherInterface $eventDispatcher |
||
31 | */ |
||
32 | 7 | public function __construct(EventDispatcherInterface $eventDispatcher) |
|
36 | |||
37 | /** |
||
38 | * @param string $purpose |
||
39 | * @param string $value |
||
40 | * @param array $payload |
||
41 | * |
||
42 | * @return CreateTokenEvent |
||
43 | */ |
||
44 | 1 | public function createToken($purpose, $value, array $payload) |
|
53 | |||
54 | /** |
||
55 | * @param Token $token |
||
56 | * |
||
57 | * @return TokenCreatedEvent |
||
58 | */ |
||
59 | 1 | public function tokenCreated(Token $token) |
|
68 | |||
69 | /** |
||
70 | * @param Token $token |
||
71 | * @param DateTime|null $at |
||
72 | * @param array $information |
||
73 | * |
||
74 | * @return ConsumeTokenEvent |
||
75 | */ |
||
76 | 1 | public function consumeToken(Token $token, DateTime $at = null, array $information = []) |
|
85 | |||
86 | /** |
||
87 | * @param Token $token |
||
88 | * |
||
89 | * @return TokenConsumedEvent |
||
90 | */ |
||
91 | 1 | public function tokenConsumed(Token $token) |
|
100 | |||
101 | /** |
||
102 | * @param Token $token |
||
103 | * |
||
104 | * @return TokenTotallyConsumedEvent |
||
105 | */ |
||
106 | 1 | public function tokenTotallyConsumed(Token $token) |
|
115 | |||
116 | /** |
||
117 | * @param string $purpose |
||
118 | * @param string $value |
||
119 | * |
||
120 | * @return TokenNotFoundEvent |
||
121 | */ |
||
122 | 1 | public function tokenNotFound($purpose, $value) |
|
131 | |||
132 | /** |
||
133 | * @param string $purpose |
||
134 | * @param string $value |
||
135 | * |
||
136 | * @return TokenExpiredEvent |
||
137 | */ |
||
138 | 1 | public function tokenExpired($purpose, $value) |
|
147 | |||
148 | /** |
||
149 | * @deprecated since 2.3 to be removed in 3.0. Use tokenAlreadyConsumed instead. |
||
150 | * @param string $purpose |
||
151 | * @param string $value |
||
152 | * |
||
153 | * @return TokenUsedEvent |
||
154 | */ |
||
155 | public function tokenUsed($purpose, $value) |
||
163 | |||
164 | /** |
||
165 | * @param string $purpose |
||
166 | * @param string $value |
||
167 | * |
||
168 | * @return TokenAlreadyConsumedEvent |
||
169 | */ |
||
170 | 1 | public function tokenAlreadyConsumed($purpose, $value) |
|
179 | |||
180 | /** |
||
181 | * @param Token $token |
||
182 | * |
||
183 | * @return TokenRetrievedEvent |
||
184 | */ |
||
185 | 1 | public function tokenRetrieved(Token $token) |
|
194 | } |
||
195 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: