Fixed phpstan issues

This commit is contained in:
Jan Böhmer 2023-07-17 00:43:35 +02:00
parent afcbbe0f43
commit 3a8c5a788f
11 changed files with 25 additions and 124 deletions

View file

@ -243,9 +243,9 @@ class Element14Provider implements InfoProviderInterface
/**
* @param array|null $attributes
* @return ParameterDTO[]|null
* @return ParameterDTO[]
*/
private function attributesToParameters(?array $attributes): ?array
private function attributesToParameters(?array $attributes): array
{
$result = [];
@ -258,7 +258,7 @@ class Element14Provider implements InfoProviderInterface
}
//tariffCode is a special case, we prepend a # to prevent conversion to float
if (in_array($attribute['attributeLabel'], ['tariffCode', 'hazardCode'])) {
if (in_array($attribute['attributeLabel'], ['tariffCode', 'hazardCode'], true)) {
$attribute['attributeValue'] = '#' . $attribute['attributeValue'];
}