Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 8, 2024
1 parent b452867 commit 14c74b5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Framework/MockObject/Generator/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1053,12 +1053,7 @@ private function instantiateProxyTarget(?object $proxyTarget, object $object, st
}
}

/**
* @psalm-suppress MissingThrowsDocblock
*
* @noinspection PhpUnhandledExceptionInspection
*/
(new ReflectionObject($object))->getProperty('__phpunit_state')->getValue($object)->setProxyTarget($proxyTarget);
$object->__phpunit_state()->setProxyTarget($proxyTarget);
}

/**
Expand Down

0 comments on commit 14c74b5

Please sign in to comment.