1 | <?php |
||
18 | abstract class Composite extends \yii\web\CompositeUrlRule |
||
19 | { |
||
20 | /** |
||
21 | * @var bool whether this rule must throw an `NotFoundHttpException` when |
||
22 | * parse request fails. |
||
23 | */ |
||
24 | public $strict = true; |
||
25 | |||
26 | /** |
||
27 | * @var UrlNormalizer|null |
||
28 | */ |
||
29 | public $normalizer = null; |
||
30 | |||
31 | /** |
||
32 | * @var string message used to create the `NotFoundHttpException` when |
||
33 | * `$strict` equals `true` and no children rules could parse the request. |
||
34 | */ |
||
35 | public $notFoundMessage = 'Unknown route.'; |
||
36 | |||
37 | /** |
||
38 | * @inheritdoc |
||
39 | */ |
||
40 | public function init() |
||
56 | |||
57 | /** |
||
58 | * Determines if this rule must parse the request using the children rules |
||
59 | * or return `false` inmediately. |
||
60 | * |
||
61 | * @param string $route |
||
62 | * @return bool |
||
63 | */ |
||
64 | abstract protected function isApplicable(string $route): bool; |
||
65 | |||
66 | /** |
||
67 | * Ensures that `$rules` property is set |
||
68 | */ |
||
69 | private function ensureRules() |
||
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | public function parseRequest($manager, $request) |
||
104 | |||
105 | /** |
||
106 | * @inheritdoc |
||
107 | */ |
||
108 | public function createUrl($manager, $route, $params) |
||
118 | |||
119 | /** |
||
120 | * @param UrlManager $manager the URL manager |
||
121 | * @return bool |
||
122 | */ |
||
123 | protected function hasNormalizer($manager): bool |
||
127 | |||
128 | /** |
||
129 | * @param UrlManager $manager the URL manager |
||
130 | * @return ?UrlNormalizer |
||
131 | */ |
||
132 | protected function getNormalizer(UrlManager $manager): ?UrlNormalizer |
||
142 | |||
143 | /** |
||
144 | * @return NotFoundHttpException |
||
145 | */ |
||
146 | protected function createNotFoundException(): NotFoundHttpException |
||
150 | } |
||
151 |
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: