diff --git a/src/Support/Reflection.php b/src/Support/Reflection.php index e06b0280..819ad4a5 100644 --- a/src/Support/Reflection.php +++ b/src/Support/Reflection.php @@ -109,10 +109,6 @@ final class Reflection } } - if ($reflectionProperty === null) { - throw ShouldNotHappen::fromMessage('Reflection property not found.'); - } - $reflectionProperty->setAccessible(true); return $reflectionProperty->getValue($object); @@ -143,10 +139,6 @@ final class Reflection } } - if ($reflectionProperty === null) { - throw ShouldNotHappen::fromMessage('Reflection property not found.'); - } - $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($object, $value); }