1 | <?php |
||
20 | class Resource extends Group |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | * @throws \BadMethodCallException |
||
26 | */ |
||
27 | |||
28 | public function setMethod($method) |
||
32 | |||
33 | /** |
||
34 | * Remove the routes without the passed methods. |
||
35 | * |
||
36 | * @param string|string[] $methods |
||
37 | * @return self |
||
38 | */ |
||
39 | |||
40 | 1 | public function only($methods) |
|
45 | |||
46 | /** |
||
47 | * Remove the routes with the passed methods. |
||
48 | * |
||
49 | * @param string|string[] $methods |
||
50 | * @return self |
||
51 | */ |
||
52 | |||
53 | 1 | public function except($methods) |
|
58 | |||
59 | /** |
||
60 | * Forget the grouped routes filtering by http methods. |
||
61 | * |
||
62 | * @param string[] $methods |
||
63 | * @param bool $alt Should remove? |
||
64 | */ |
||
65 | |||
66 | 2 | private function filterByMethod(array $methods, $alt) |
|
76 | |||
77 | /** |
||
78 | * Translate the "make" or "edit" from resources path. |
||
79 | * |
||
80 | * @param string[] $translations |
||
81 | * @return self |
||
82 | */ |
||
83 | |||
84 | public function translate(array $translations) |
||
98 | |||
99 | /** |
||
100 | * Add a route or a group of routes to the resource, it means that |
||
101 | * every added route will now receive the parameters of the resource, like id. |
||
102 | * |
||
103 | * @param Route|Group $route |
||
104 | * @return self |
||
105 | */ |
||
106 | |||
107 | public function member($route) |
||
113 | |||
114 | /** |
||
115 | * Nested routes capture the relation between a resource and another resource. |
||
116 | * |
||
117 | * @param self $resource |
||
118 | * @return self |
||
119 | */ |
||
120 | |||
121 | 3 | public function nest(self $resource) |
|
131 | |||
132 | /** |
||
133 | * Nest resources but with only build routes with the minimal amount of information |
||
134 | * to uniquely identify the resource. |
||
135 | * |
||
136 | * @param self $resource |
||
137 | * @return self |
||
138 | */ |
||
139 | |||
140 | 1 | public function shallow(self $resource) |
|
154 | |||
155 | /** |
||
156 | * Resolve the nesting pattern, setting the prefixes based on |
||
157 | * parent resources patterns. |
||
158 | * |
||
159 | * @param string $pattern |
||
160 | * @return string |
||
161 | */ |
||
162 | |||
163 | 3 | protected function getNestedPrefix($pattern) |
|
176 | |||
177 | } |
||
178 |
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: