diff --git a/src/Framework/MockObject/Runtime/ReturnValueGenerator.php b/src/Framework/MockObject/Runtime/ReturnValueGenerator.php index 3854190879..7cf1cd6a00 100644 --- a/src/Framework/MockObject/Runtime/ReturnValueGenerator.php +++ b/src/Framework/MockObject/Runtime/ReturnValueGenerator.php @@ -184,6 +184,7 @@ private function newInstanceOf(string $stubClassName, string $className, string { try { return (new ReflectionClass($stubClassName))->newInstanceWithoutConstructor(); + // @codeCoverageIgnoreStart } catch (Throwable $t) { throw new RuntimeException( sprintf( @@ -193,6 +194,7 @@ private function newInstanceOf(string $stubClassName, string $className, string $t->getMessage(), ), ); + // @codeCoverageIgnoreEnd } } @@ -207,6 +209,7 @@ private function testDoubleFor(string $type, string $className, string $methodNa { try { return (new Generator)->testDouble($type, false, [], [], '', false); + // @codeCoverageIgnoreStart } catch (Throwable $t) { throw new RuntimeException( sprintf( @@ -216,6 +219,7 @@ private function testDoubleFor(string $type, string $className, string $methodNa $t->getMessage(), ), ); + // @codeCoverageIgnoreEnd } } @@ -230,6 +234,7 @@ private function testDoubleForIntersectionOfInterfaces(array $types, string $cla { try { return (new Generator)->testDoubleForInterfaceIntersection($types, false); + // @codeCoverageIgnoreStart } catch (Throwable $t) { throw new RuntimeException( sprintf( @@ -239,6 +244,7 @@ private function testDoubleForIntersectionOfInterfaces(array $types, string $cla $t->getMessage(), ), ); + // @codeCoverageIgnoreEnd } } }