1 | <?php |
||
10 | class CleanParamClient implements ClientInterface |
||
11 | { |
||
12 | use DirectiveClientCommons; |
||
13 | |||
14 | /** |
||
15 | * Common dynamic uri parameters |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $commonParam = [ |
||
19 | 'popup', |
||
20 | 'ref', |
||
21 | 'token' |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * Clean-param |
||
26 | * @var string[][] |
||
27 | */ |
||
28 | private $cleanParam = []; |
||
29 | |||
30 | /** |
||
31 | * CleanParamClient constructor. |
||
32 | * |
||
33 | * @param string[][] $cleanParam |
||
34 | */ |
||
35 | public function __construct(array $cleanParam) |
||
39 | |||
40 | /** |
||
41 | * Has robots.txt defined dynamic or common dynamic parameters check |
||
42 | * |
||
43 | * @param string $uri |
||
44 | * @param string[] $customParam |
||
45 | * @return string[] |
||
46 | */ |
||
47 | public function detectWithCommon($uri, array $customParam = []) |
||
56 | |||
57 | /** |
||
58 | * Convert param list to an valid Clean-param list |
||
59 | * |
||
60 | * @param string[] $parameters |
||
61 | * @return array |
||
62 | */ |
||
63 | private function appendPath(array $parameters) |
||
71 | |||
72 | /** |
||
73 | * Parse uri and return detected parameters |
||
74 | * |
||
75 | * @param string $uri |
||
76 | * @param array $pairs |
||
77 | * @return string[] |
||
78 | */ |
||
79 | private function parse($uri, array $pairs) |
||
96 | |||
97 | /** |
||
98 | * Detect dynamic parameters |
||
99 | * |
||
100 | * @param string $uri |
||
101 | * @return string[] |
||
102 | */ |
||
103 | public function detect($uri) |
||
107 | |||
108 | /** |
||
109 | * Export |
||
110 | * |
||
111 | * @return string[][] |
||
112 | */ |
||
113 | public function export() |
||
117 | } |
||
118 |
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: