chore: major code cleanup and type safety using phpstan

This commit is contained in:
Björn Fromme committed 2026-04-16 17:11:16 +02:00
1 parent 060cbea9da
commit 3da73d626b
103 files changed
+976 -1192

No files matched your search

@@ -154,7 +154,7 @@ abstract class AbstractFieldStateProvider implements FieldStateProviderInterface
}
}
if (false === empty($attributes)) {
if ([] !== $attributes) {
$stateModifications['attr'] = $attributes;
}
@@ -170,7 +170,7 @@ abstract class AbstractFieldStateProvider implements FieldStateProviderInterface
*/
public function hasStateConditions(string $fieldName): bool
{
return isset($this->fieldStateConditions[$fieldName]) && !empty($this->fieldStateConditions[$fieldName]);
return isset($this->fieldStateConditions[$fieldName]) && [] !== $this->fieldStateConditions[$fieldName];
}
/**
@@ -210,7 +210,7 @@ abstract class AbstractFieldStateProvider implements FieldStateProviderInterface
foreach (array_keys($this->fieldStateConditions) as $fieldName) {
$fieldState = $this->getFieldState($fieldName, $bookingDto, $participantIndex, $formData);
if (!empty($fieldState)) {
if ([] !== $fieldState) {
$allStates[$fieldName] = $fieldState;
}
}