Skip to content

Commit f72c694

Browse files
committed
refactor: remove else
1 parent 24713d4 commit f72c694

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/system/Filters/FiltersTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ private function createConfigFromArray(string $classname, array $config)
7777
foreach ($config as $key => $value) {
7878
if (property_exists($configObj, $key)) {
7979
$configObj->{$key} = $value;
80-
} else {
81-
throw new LogicException(
82-
'No such property: ' . $classname . '::$' . $key
83-
);
80+
continue;
8481
}
82+
83+
throw new LogicException(
84+
'No such property: ' . $classname . '::$' . $key
85+
);
8586
}
8687

8788
return $configObj;

0 commit comments

Comments
 (0)