From a45fee47fe86a2a4992953fb7037cb2620c4d7ea Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Fri, 5 Mar 2021 13:31:50 +0100 Subject: [PATCH] Allow toggling union to intersection type conversion --- extension.neon | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/extension.neon b/extension.neon index b825e77..87fb5a5 100644 --- a/extension.neon +++ b/extension.neon @@ -1,7 +1,14 @@ parameters: + mockery: + convertUnionToIntersectionType: true stubFiles: - stubs/MockInterface.stub +parametersSchema: + mockery: structure([ + convertUnionToIntersectionType: bool() + ]) + services: - class: PHPStan\Mockery\Reflection\StubMethodsClassReflectionExtension @@ -59,5 +66,7 @@ services: - class: PHPStan\Mockery\PhpDoc\TypeNodeResolverExtension - tags: - - phpstan.phpDoc.typeNodeResolverExtension + +conditionalTags: + PHPStan\Mockery\PhpDoc\TypeNodeResolverExtension: + phpstan.phpDoc.typeNodeResolverExtension: %mockery.convertUnionToIntersectionType%