File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,6 @@ parameters:
5454 count : 1
5555 path : ../src/RuleSet/DeclarationBlock.php
5656
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-
6357 -
6458 message : ' #^Parameters should have "string" types as the only types passed to this method$#'
6559 identifier : typePerfect.narrowPublicClassMethodParamType
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ public function getRules($searchPattern = null): array
149149 // Either no search rule is given or the search rule matches the found rule exactly
150150 // or the search rule ends in “-” and the found rule starts with the search rule.
151151 if (
152- ! $ searchPattern || $ propertyName === $ searchPattern
152+ $ searchPattern === null || $ propertyName === $ searchPattern
153153 || (
154154 \strrpos ($ searchPattern , '- ' ) === \strlen ($ searchPattern ) - \strlen ('- ' )
155155 && (\strpos ($ propertyName , $ searchPattern ) === 0
@@ -240,7 +240,7 @@ public function removeRule($searchPattern): void
240240 // or the search rule ends in “-” and the found rule starts with the search rule or equals it
241241 // (without the trailing dash).
242242 if (
243- ! $ searchPattern || $ propertyName === $ searchPattern
243+ $ searchPattern === null || $ propertyName === $ searchPattern
244244 || (\strrpos ($ searchPattern , '- ' ) === \strlen ($ searchPattern ) - \strlen ('- ' )
245245 && (\strpos ($ propertyName , $ searchPattern ) === 0
246246 || $ propertyName === \substr ($ searchPattern , 0 , -1 )))
You can’t perform that action at this time.
0 commit comments