1 | <?php |
||
5 | class RequestBuilder |
||
6 | { |
||
7 | |||
8 | private $defaults = [ |
||
9 | 'get' => [], |
||
10 | 'post' => [], |
||
11 | 'server' => [], |
||
12 | 'files' => [], |
||
13 | 'cookies'=> [], |
||
14 | ]; |
||
15 | |||
16 | private $parsers = []; |
||
17 | |||
18 | |||
19 | /** |
||
20 | * @param array[] $params |
||
21 | * @return \Fracture\Routing\Routable |
||
22 | */ |
||
23 | 14 | public function create($params) |
|
37 | |||
38 | |||
39 | /** |
||
40 | * @param string $type |
||
41 | * @param callback $parser |
||
42 | */ |
||
43 | 4 | public function addContentParser($type, $parser) |
|
47 | |||
48 | |||
49 | 2 | protected function buildInstance() |
|
56 | |||
57 | |||
58 | /** |
||
59 | * @param Request $instance |
||
60 | */ |
||
61 | 6 | protected function applyContentParsers($instance) |
|
79 | |||
80 | |||
81 | 3 | private function alterParameters($parameters, $parser, $value) |
|
93 | |||
94 | |||
95 | /** |
||
96 | * @param Request $instance |
||
97 | * @param array[] $params |
||
98 | */ |
||
99 | 3 | protected function applyParams($instance, $params) |
|
111 | |||
112 | |||
113 | /** |
||
114 | * @param Request $instance |
||
115 | * @param array[] $params |
||
116 | */ |
||
117 | 1 | protected function applyWebContext($instance, $params) |
|
126 | |||
127 | |||
128 | /** |
||
129 | * @param Request $instance |
||
130 | * @param array $params |
||
131 | */ |
||
132 | 2 | public function applyHeaders($instance, $params) |
|
146 | } |
||
147 |
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: