Skip to content

Commit b9192ca

Browse files
authored
[TASK] Disable some rules from Rector Type Perfect (#1575)
The two type-narrowing rules tend to have too many false positives at the moment.
1 parent 6b3888d commit b9192ca

2 files changed

Lines changed: 2 additions & 26 deletions

File tree

Build/phpstan/phpstan-baseline.neon

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,12 @@ parameters:
66
count: 1
77
path: ../../src/CSSList/CSSList.php
88

9-
-
10-
message: '#^Parameters should have "Sabberworm\\CSS\\CSSList\\CSSListItem\|array" types as the only types passed to this method$#'
11-
identifier: typePerfect.narrowPublicClassMethodParamType
12-
count: 1
13-
path: ../../src/CSSList/CSSList.php
14-
159
-
1610
message: '#^Negated boolean expression is always true\.$#'
1711
identifier: booleanNot.alwaysTrue
1812
count: 1
1913
path: ../../src/Parsing/ParserState.php
2014

21-
-
22-
message: '#^Parameters should have "string\|int\|null" types as the only types passed to this method$#'
23-
identifier: typePerfect.narrowPublicClassMethodParamType
24-
count: 1
25-
path: ../../src/Parsing/ParserState.php
26-
27-
-
28-
message: '#^Parameters should have "string" types as the only types passed to this method$#'
29-
identifier: typePerfect.narrowPublicClassMethodParamType
30-
count: 1
31-
path: ../../src/RuleSet/DeclarationBlock.php
32-
3315
-
3416
message: '#^Parameter \#2 \$arguments of class Sabberworm\\CSS\\Value\\CSSFunction constructor expects array\<Sabberworm\\CSS\\Value\\Value\|string\>\|Sabberworm\\CSS\\Value\\RuleValueList, Sabberworm\\CSS\\Value\\Value\|string given\.$#'
3517
identifier: argument.type
@@ -48,12 +30,6 @@ parameters:
4830
count: 3
4931
path: ../../src/Value/Color.php
5032

51-
-
52-
message: '#^Parameters should have "float" types as the only types passed to this method$#'
53-
identifier: typePerfect.narrowPublicClassMethodParamType
54-
count: 1
55-
path: ../../src/Value/Size.php
56-
5733
-
5834
message: '#^Strict comparison using \!\=\= between non\-empty\-string and null will always evaluate to true\.$#'
5935
identifier: notIdentical.alwaysTrue

Build/phpstan/phpstan.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ parameters:
1515
no_mixed_property: true
1616
no_mixed_caller: true
1717
null_over_false: true
18-
narrow_param: true
19-
narrow_return: true
18+
narrow_param: false
19+
narrow_return: false
2020

2121
ignoreErrors:
2222
-

0 commit comments

Comments
 (0)