Conditions | 5 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
28 | 18 | public function passes($attribute, $value): bool |
|
29 | { |
||
30 | 18 | $this->attribute = $attribute; |
|
31 | |||
32 | 18 | if (! $this->required && ($value === '0' || $value === 0 || $value === null)) { |
|
33 | 6 | return true; |
|
34 | } |
||
35 | |||
36 | 18 | $countries = array_pluck((new ISO3166())->all(), ISO3166::KEY_ALPHA2); |
|
|
|||
37 | |||
38 | 18 | return in_array($value, $countries, true); |
|
39 | } |
||
40 | |||
48 |
This function has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.