1 | <?php |
||
26 | final class AllowedSecondFactorList implements JsonSerializable, IteratorAggregate |
||
27 | { |
||
28 | /** |
||
29 | * @var SecondFactorType[] |
||
30 | */ |
||
31 | private $allowedSecondFactors = []; |
||
32 | |||
33 | private function __construct(array $allowedSecondFactors) |
||
39 | |||
40 | /** |
||
41 | * @return AllowedSecondFactorList |
||
42 | */ |
||
43 | public static function blank() |
||
47 | |||
48 | /** |
||
49 | * @param $allowedSecondFactors |
||
50 | * @return AllowedSecondFactorList |
||
51 | */ |
||
52 | public static function ofTypes($allowedSecondFactors) |
||
56 | |||
57 | /** |
||
58 | * @param SecondFactorType $secondFactor |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function allows(SecondFactorType $secondFactor) |
||
65 | |||
66 | /** |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function isBlank() |
||
73 | |||
74 | /** |
||
75 | * @param SecondFactorType $secondFactor |
||
76 | * @return bool |
||
77 | */ |
||
78 | public function contains(SecondFactorType $secondFactor) |
||
88 | |||
89 | public function getIterator() |
||
93 | |||
94 | public function jsonSerialize() |
||
100 | |||
101 | private function initializeWith(SecondFactorType $allowedSecondFactor) |
||
107 | } |
||
108 |
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: