1 | <?php |
||
27 | final class AllowedSecondFactorList implements JsonSerializable, IteratorAggregate, SerializableInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var SecondFactorType[] |
||
31 | */ |
||
32 | private $allowedSecondFactors = []; |
||
33 | |||
34 | private function __construct(array $allowedSecondFactors) |
||
40 | |||
41 | /** |
||
42 | * @return AllowedSecondFactorList |
||
43 | */ |
||
44 | public static function blank() |
||
48 | |||
49 | /** |
||
50 | * @param $allowedSecondFactors |
||
51 | * @return AllowedSecondFactorList |
||
52 | */ |
||
53 | public static function ofTypes($allowedSecondFactors) |
||
57 | |||
58 | /** |
||
59 | * @param SecondFactorType $secondFactor |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function allows(SecondFactorType $secondFactor) |
||
66 | |||
67 | /** |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function isBlank() |
||
74 | |||
75 | /** |
||
76 | * @param SecondFactorType $secondFactor |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function contains(SecondFactorType $secondFactor) |
||
89 | |||
90 | public static function deserialize(array $data) |
||
101 | |||
102 | public function serialize() |
||
115 | |||
116 | public function getIterator() |
||
120 | |||
121 | public function jsonSerialize() |
||
127 | |||
128 | private function initializeWith(SecondFactorType $allowedSecondFactor) |
||
134 | } |
||
135 |
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: