Skip to content

Commit

Permalink
Allow toggling union to intersection type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudk authored and ondrejmirtes committed Mar 6, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 58e52ad commit ab44aec
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions extension.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
parameters:
phpunit:
convertUnionToIntersectionType: true
additionalConstructors:
- PHPUnit\Framework\TestCase::setUp
earlyTerminatingMethodCalls:
@@ -12,11 +14,14 @@ parameters:
- stubs/MockObject.stub
- stubs/TestCase.stub

parametersSchema:
phpunit: structure([
convertUnionToIntersectionType: bool()
])

services:
-
class: PHPStan\PhpDoc\PHPUnit\MockObjectTypeNodeResolverExtension
tags:
- phpstan.phpDoc.typeNodeResolverExtension
-
class: PHPStan\Type\PHPUnit\Assert\AssertFunctionTypeSpecifyingExtension
tags:
@@ -41,3 +46,7 @@ services:
class: PHPStan\Type\PHPUnit\MockObjectDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

conditionalTags:
PHPStan\PhpDoc\PHPUnit\MockObjectTypeNodeResolverExtension:
phpstan.phpDoc.typeNodeResolverExtension: %phpunit.convertUnionToIntersectionType%

0 comments on commit ab44aec

Please sign in to comment.