1 | <?php |
||
11 | class Resolver |
||
12 | { |
||
13 | /** |
||
14 | * The request object. |
||
15 | * |
||
16 | * @var \Psr\Http\Message\ServerRequestInterface |
||
17 | */ |
||
18 | protected $request; |
||
19 | |||
20 | /** |
||
21 | * Configuration array. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $config; |
||
26 | |||
27 | /** |
||
28 | * The page api object. |
||
29 | * |
||
30 | * @var \Vssl\Render\PageApi |
||
31 | */ |
||
32 | protected $api; |
||
33 | |||
34 | /** |
||
35 | * Initialize a new Resolver |
||
36 | */ |
||
37 | 7 | public function __construct(ServerRequestInterface $request, $config = false) |
|
46 | |||
47 | /** |
||
48 | * Get a modified request message. |
||
49 | * |
||
50 | * @return \Psr\Http\Message\ServerRequestInterface |
||
51 | */ |
||
52 | 4 | public function getRequest() |
|
56 | |||
57 | /** |
||
58 | * Get an instance of the PageApi class. |
||
59 | * |
||
60 | * @return \Vssl\Render\PageApi |
||
61 | */ |
||
62 | 3 | public function getPageApi() |
|
66 | |||
67 | /** |
||
68 | * Resolve the current page from WebStories. Returns a render able page or |
||
69 | * false. |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | 4 | public function resolve() |
|
93 | |||
94 | /** |
||
95 | * Decode the body of a particular request. |
||
96 | * |
||
97 | * @return mixed |
||
98 | */ |
||
99 | 3 | public function decodePage(ResponseInterface $response) |
|
108 | |||
109 | /** |
||
110 | * Configure the resolver. |
||
111 | * |
||
112 | * @return void |
||
113 | */ |
||
114 | 19 | public static function config($assign = false) |
|
133 | } |
||
134 |
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: