Skip to content

Commit

Permalink
Remove redundant PHP version check for enums
Browse files Browse the repository at this point in the history
This update simplifies the code by removing the PHP version check before calling the isEnum method. Since the project now requires a PHP version that supports enums, the conditional check is unnecessary. This change enhances readability and maintainability of the code.
  • Loading branch information
koriym committed Oct 22, 2024
1 parent 9d90024 commit 46267e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ClassParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __invoke(string $varName, array $query, InjectorInterface $injec
assert(class_exists($this->type));
$refClass = (new ReflectionClass($this->type));

if (PHP_VERSION_ID >= 80100 && $refClass->isEnum()) {
if ($refClass->isEnum()) {
return $this->enum($this->type, $props, $varName);
}

Expand Down

0 comments on commit 46267e0

Please sign in to comment.