Skip to content

Commit

Permalink
Remove obsolete method_exists(ReflectionClass::class, 'isEnum') call (#…
Browse files Browse the repository at this point in the history
…46445)

Co-authored-by: Valodia <v.khurshudyan@digitalpome.com>
  • Loading branch information
xurshudyan and Valodia committed Mar 13, 2023
1 parent ec7fc9b commit b4e7fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/RouteDependencyResolverTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function transformDependency(ReflectionParameter $parameter, $paramete
// the list of parameters. If it is we will just skip it as it is probably a model
// binding and we do not want to mess with those; otherwise, we resolve it here.
if ($className && ! $this->alreadyInParameters($className, $parameters)) {
$isEnum = method_exists(ReflectionClass::class, 'isEnum') && (new ReflectionClass($className))->isEnum();
$isEnum = (new ReflectionClass($className))->isEnum();

return $parameter->isDefaultValueAvailable()
? ($isEnum ? $parameter->getDefaultValue() : null)
Expand Down

0 comments on commit b4e7fdf

Please sign in to comment.