It seems like $countryCode can also be of type null; however, parameter $code of Ibericode\Vat\Countries::isCountryCodeInEU() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
31
if (!$this->countries->isCountryCodeInEU(/** @scrutinizer ignore-type */ $countryCode)) {
Loading history...
32
continue;
33
}
34
35
$euCountries[$countryCode] = $countryName;
36
}
37
38
return $euCountries;
39
}
40
41
public function getCountryRate(string $countryCode, string $level = self::RATE_STANDARD): float