File tree 2 files changed +2
-8
lines changed
2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,6 @@ parameters:
54
54
count : 1
55
55
path : ../src/RuleSet/DeclarationBlock.php
56
56
57
- -
58
- message : ' #^Only booleans are allowed in a negated boolean, string\|null given\.$#'
59
- identifier : booleanNot.exprNotBoolean
60
- count : 2
61
- path : ../src/RuleSet/RuleSet.php
62
-
63
57
-
64
58
message : ' #^Parameters should have "string" types as the only types passed to this method$#'
65
59
identifier : typePerfect.narrowPublicClassMethodParamType
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ public function getRules($searchPattern = null): array
149
149
// Either no search rule is given or the search rule matches the found rule exactly
150
150
// or the search rule ends in “-” and the found rule starts with the search rule.
151
151
if (
152
- ! $ searchPattern || $ propertyName === $ searchPattern
152
+ $ searchPattern === null || $ propertyName === $ searchPattern
153
153
|| (
154
154
\strrpos ($ searchPattern , '- ' ) === \strlen ($ searchPattern ) - \strlen ('- ' )
155
155
&& (\strpos ($ propertyName , $ searchPattern ) === 0
@@ -240,7 +240,7 @@ public function removeRule($searchPattern): void
240
240
// or the search rule ends in “-” and the found rule starts with the search rule or equals it
241
241
// (without the trailing dash).
242
242
if (
243
- ! $ searchPattern || $ propertyName === $ searchPattern
243
+ $ searchPattern === null || $ propertyName === $ searchPattern
244
244
|| (\strrpos ($ searchPattern , '- ' ) === \strlen ($ searchPattern ) - \strlen ('- ' )
245
245
&& (\strpos ($ propertyName , $ searchPattern ) === 0
246
246
|| $ propertyName === \substr ($ searchPattern , 0 , -1 )))
You can’t perform that action at this time.
0 commit comments