Skip to content

Commit

Permalink
fix(ObjectDescriptionFactory): swap function_exists with enum_exists
Browse files Browse the repository at this point in the history
The function_exists() function should be used first, so that the composer autoloader doesn't try to include an already included file
  • Loading branch information
MirAlexSky authored Nov 17, 2024
1 parent 090877a commit 20c07e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factories/ObjectDescriptionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ private static function isUserDefined(string $use): bool
}

return match (true) {
enum_exists($use) => (new \ReflectionEnum($use))->isUserDefined(),
function_exists($use) => (new ReflectionFunction($use))->isUserDefined(),
enum_exists($use) => (new \ReflectionEnum($use))->isUserDefined(),
class_exists($use) => (new ReflectionClass($use))->isUserDefined(),
interface_exists($use) => (new ReflectionClass($use))->isUserDefined(),
// ...
Expand Down

0 comments on commit 20c07e1

Please sign in to comment.