Skip to content

Commit 3b2fd6e

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

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/system/Filters/FiltersTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@ 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+
81+
continue;
8482
}
83+
84+
throw new LogicException(
85+
'No such property: ' . $classname . '::$' . $key
86+
);
8587
}
8688

8789
return $configObj;

0 commit comments

Comments
 (0)