Skip to content

Commit

Permalink
Bleeding edge - check instanceof *Type that have better alternative…
Browse files Browse the repository at this point in the history
… as method on Type
  • Loading branch information
ondrejmirtes committed Jan 31, 2023
1 parent e799fc2 commit 436e6d3
Show file tree
Hide file tree
Showing 8 changed files with 866 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/bleedingEdge.neon
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ parameters:
varTagType: true
closureDefaultParameterTypeRule: true
newRuleLevelHelper: true
instanceofType: true
4 changes: 4 additions & 0 deletions conf/config.level0.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ conditionalTags:
phpstan.rules.rule: %featureToggles.runtimeReflectionRules%
PHPStan\Rules\Api\ApiInstanceofRule:
phpstan.rules.rule: %featureToggles.runtimeReflectionRules%
PHPStan\Rules\Api\ApiInstanceofTypeRule:
phpstan.rules.rule: %featureToggles.instanceofType%
PHPStan\Rules\Api\RuntimeReflectionFunctionRule:
phpstan.rules.rule: %featureToggles.runtimeReflectionRules%
PHPStan\Rules\Api\RuntimeReflectionInstantiationRule:
Expand Down Expand Up @@ -92,6 +94,8 @@ services:
class: PHPStan\Rules\Api\ApiClassConstFetchRule
-
class: PHPStan\Rules\Api\ApiInstanceofRule
-
class: PHPStan\Rules\Api\ApiInstanceofTypeRule
-
class: PHPStan\Rules\Api\NodeConnectingVisitorAttributesRule
-
Expand Down
7 changes: 7 additions & 0 deletions conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ parameters:
varTagType: false
closureDefaultParameterTypeRule: false
newRuleLevelHelper: false
instanceofType: false
fileExtensions:
- php
checkAdvancedIsset: false
Expand Down Expand Up @@ -286,6 +287,7 @@ parametersSchema:
varTagType: bool()
closureDefaultParameterTypeRule: bool()
newRuleLevelHelper: bool()
instanceofType: bool()
])
fileExtensions: listOf(string())
checkAdvancedIsset: bool()
Expand Down Expand Up @@ -443,6 +445,8 @@ conditionalTags:
phpstan.parser.richParserNodeVisitor: %featureToggles.nodeConnectingVisitorCompatibility%
PHPStan\Parser\CurlSetOptArgVisitor:
phpstan.parser.richParserNodeVisitor: %featureToggles.curlSetOptTypes%
PHPStan\Parser\TypeTraverserInstanceofVisitor:
phpstan.parser.richParserNodeVisitor: %featureToggles.instanceofType%

services:
-
Expand Down Expand Up @@ -480,6 +484,9 @@ services:
-
class: PHPStan\Parser\CurlSetOptArgVisitor

-
class: PHPStan\Parser\TypeTraverserInstanceofVisitor

-
class: PHPStan\Parser\ArrowFunctionArgVisitor
tags:
Expand Down
Loading

0 comments on commit 436e6d3

Please sign in to comment.