1 | <?php |
||
23 | class DispatchEvent extends AppEvent implements |
||
24 | DispatchEventInterface |
||
25 | { |
||
26 | /** |
||
27 | * @param ConfiguredApplicationInterface|AbstractApplication $app |
||
28 | */ |
||
29 | public function __construct(ConfiguredApplicationInterface $app) |
||
34 | |||
35 | /** |
||
36 | * @return RequestInterface |
||
37 | */ |
||
38 | public function getRequest() |
||
42 | |||
43 | /** |
||
44 | * @param RequestInterface $request |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function setRequest(RequestInterface $request) |
||
52 | |||
53 | /** |
||
54 | * @return ResponseInterface|AbstractMessage |
||
55 | */ |
||
56 | public function getResponse() |
||
60 | |||
61 | /** |
||
62 | * Set response |
||
63 | * |
||
64 | * It sets response content when response is a string. |
||
65 | * It joins values to a string when response is an array. |
||
66 | * It converts to string when response is an object. |
||
67 | * It sets response object when response is an interface. |
||
68 | * |
||
69 | * @param string|array|ResponseInterface $response |
||
70 | * @return $this |
||
71 | */ |
||
72 | public function setResponse($response) |
||
83 | |||
84 | /** |
||
85 | * Reset response |
||
86 | * |
||
87 | * @param string|array|ResponseInterface $response |
||
88 | * @return $this |
||
89 | */ |
||
90 | public function resetResponse($response = null) |
||
99 | |||
100 | /** |
||
101 | * @param string|array $content |
||
102 | * @return string |
||
103 | */ |
||
104 | private function normalizeResponseContent($content) |
||
108 | } |
||
109 |
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: