1 | <?php |
||
9 | class QualifiedRoute |
||
10 | { |
||
11 | /** |
||
12 | * Name of the qualified route. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | private $name; |
||
17 | |||
18 | /** |
||
19 | * Seconds between the logs of the qualified route. |
||
20 | * |
||
21 | * @var bool|int|null |
||
22 | */ |
||
23 | private $secondsBetweenLogs; |
||
24 | |||
25 | /** |
||
26 | * Setups this instance. |
||
27 | * |
||
28 | * @param \Illuminate\Routing\Route $route |
||
29 | * @param string $name |
||
30 | * @param bool|int|null $secondsBetweenLogs |
||
31 | */ |
||
32 | public function __construct(Route $route, string $name, $secondsBetweenLogs = null) |
||
37 | |||
38 | /** |
||
39 | * Replaces the parameters within the qualified route with |
||
40 | * the actual given parameters (of the route). |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @param array $parameters |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | private function replaceParameters(string $name, array $parameters): string |
||
55 | |||
56 | /** |
||
57 | * Returns a new instance based on the given request. |
||
58 | * |
||
59 | * @param \Illuminate\Http\Request $request |
||
60 | * @return $this |
||
61 | */ |
||
62 | public static function fromRequest(Request $request) |
||
69 | |||
70 | /** |
||
71 | * Getter for the name |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | public function name(): string |
||
79 | |||
80 | /** |
||
81 | * Getter fot the seconds between logs. |
||
82 | * |
||
83 | * @return mixed |
||
84 | */ |
||
85 | public function secondsBetweenLogs() |
||
89 | } |
||
90 |
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: