Skip to content

Commit

Permalink
Fixing class check
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Oct 25, 2022
1 parent 3877e87 commit 11b42c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static function autowireArguments(ReflectionMethod $method, array $argume
if ($class !== null && (class_exists($class) || interface_exists($class))) {
foreach ($arguments as $key => $argument) {
/** @phpstan-ignore-next-line */
if (is_object($argument) && is_subclass_of($argument, $class)) {
if (is_object($argument) && (is_subclass_of($argument, $class) || get_class($argument) === $class)) {
$res[$subNum] = $argument;
unset($arguments[$key]);
$optCount = 0;
Expand Down

0 comments on commit 11b42c8

Please sign in to comment.