Skip to content

Commit 464efa2

Browse files
TiiFuchsnoplanman
andauthored
Make use of early returns
Co-authored-by: Armando Lüscher <armando@noplanman.ch>
1 parent af09462 commit 464efa2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Entities/Factory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ public static function resolveEntityClass(string $class, mixed $property, string
1010
{
1111
if (is_a($property, $class)) {
1212
return $property;
13-
} elseif (is_subclass_of($class, Factory::class)) {
13+
}
14+
15+
if (is_subclass_of($class, Factory::class)) {
1416
return $class::make($property, $bot_username);
1517
}
1618

0 commit comments

Comments
 (0)