Skip to content

Commit ad15028

Browse files
committed
[BE] LogicalXorConstantConditionRule
1 parent 99c831c commit ad15028

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

changelog-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Major new features 🚀
1010
* **Enhancements in Handling Parameters Passed by Reference**
1111
* [Learn more on phpstan.org](https://phpstan.org/blog/enhancements-in-handling-parameters-passed-by-reference)
1212
* [#2941](https://github.com/phpstan/phpstan-src/pull/2941), thanks @ljmaskey!
13+
* LogicalXorConstantConditionRule (level 4) (https://github.com/phpstan/phpstan-src/commit/3a12724fd636b1bcf36c22b36e8f765d97150895, https://github.com/phpstan/phpstan-src/commit/3b011f6524254dad0f16840fdcfdbe7421548617), #7539
1314
* Added previously absent type checks (level 0)
1415
* Check existing classes in `@phpstan-self-out` (https://github.com/phpstan/phpstan-src/commit/6838669976bf20232abde36ecdd52b1770fa50c9)
1516
* Check nonexistent classes in local type aliases (https://github.com/phpstan/phpstan-src/commit/2485b2e9c129e789ec3b2d7db81ca30f87c63911)
@@ -69,7 +70,6 @@ Bleeding edge (TODO move to other sections)
6970
* Rule for `call_user_func()` ([#2479](https://github.com/phpstan/phpstan-src/pull/2479)), thanks @staabm!
7071
* MagicConstantContextRule ([#2741](https://github.com/phpstan/phpstan-src/pull/2741)), #10099, thanks @staabm!
7172
* TooWideMethodReturnTypehintRule - always report for final methods (https://github.com/phpstan/phpstan-src/commit/c30e9a484c8245b8126cd63444607ca74d2af761)
72-
* LogicalXorConstantConditionRule (https://github.com/phpstan/phpstan-src/commit/3a12724fd636b1bcf36c22b36e8f765d97150895, https://github.com/phpstan/phpstan-src/commit/3b011f6524254dad0f16840fdcfdbe7421548617), #7539
7373
* NoopRule - report top-level `xor` because that's probably not what the user intended to do (https://github.com/phpstan/phpstan-src/commit/a1fffb3346e09f1e8e8d987d4282263295a55142), #10267
7474
* Report unused results of `and` and `or` (https://github.com/phpstan/phpstan-src/commit/1d8fff637d70a9e9ed3f11dee5d61b9f796cbf1a)
7575
* Report unused result of ternary (https://github.com/phpstan/phpstan-src/commit/9664f7a9d2223c07e750f0dfc949c3accfa6b65e)

conf/bleedingEdge.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ parameters:
2222
nullContextForVoidReturningFunctions: true
2323
unescapeStrings: true
2424
alwaysCheckTooWideReturnTypeFinalMethods: true
25-
logicalXor: true
2625
betterNoop: true
2726
alwaysTrueAlwaysReported: true
2827
disableUnreachableBranchesRules: true

conf/config.level4.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ conditionalTags:
2626
phpstan.collector: %featureToggles.notAnalysedTrait%
2727
PHPStan\Rules\Traits\NotAnalysedTraitRule:
2828
phpstan.rules.rule: %featureToggles.notAnalysedTrait%
29-
PHPStan\Rules\Comparison\LogicalXorConstantConditionRule:
30-
phpstan.rules.rule: %featureToggles.logicalXor%
3129
PHPStan\Rules\DeadCode\BetterNoopRule:
3230
phpstan.rules.rule: %featureToggles.betterNoop%
3331
PHPStan\Rules\DeadCode\CallToConstructorStatementWithoutImpurePointsRule:
@@ -199,6 +197,8 @@ services:
199197
treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
200198
reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%
201199
treatPhpDocTypesAsCertainTip: %tips.treatPhpDocTypesAsCertain%
200+
tags:
201+
- phpstan.rules.rule
202202

203203
-
204204
class: PHPStan\Rules\DeadCode\BetterNoopRule

conf/config.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ parameters:
4343
nullContextForVoidReturningFunctions: false
4444
unescapeStrings: false
4545
alwaysCheckTooWideReturnTypeFinalMethods: false
46-
logicalXor: false
4746
betterNoop: false
4847
alwaysTrueAlwaysReported: false
4948
disableUnreachableBranchesRules: false

conf/parametersSchema.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ parametersSchema:
4949
nullContextForVoidReturningFunctions: bool()
5050
unescapeStrings: bool()
5151
alwaysCheckTooWideReturnTypeFinalMethods: bool()
52-
logicalXor: bool()
5352
betterNoop: bool()
5453
alwaysTrueAlwaysReported: bool()
5554
disableUnreachableBranchesRules: bool()

0 commit comments

Comments
 (0)