1 | <?php |
||
9 | class RBF implements Kernel |
||
10 | { |
||
11 | /** |
||
12 | * @var float |
||
13 | */ |
||
14 | private $gamma; |
||
15 | |||
16 | /** |
||
17 | * @param float $gamma |
||
18 | */ |
||
19 | public function __construct(float $gamma) |
||
23 | |||
24 | /** |
||
25 | * @param float $a |
||
26 | * @param float $b |
||
27 | * |
||
28 | * @return float |
||
29 | */ |
||
30 | public function compute($a, $b) |
||
38 | |||
39 | } |
||
40 |
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: