Skip to content

Commit 29f1010

Browse files
committed
More renaming
1 parent 76753c6 commit 29f1010

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/RuleSet/RuleSet.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
abstract class RuleSet implements Renderable, Commentable
2626
{
2727
/**
28-
* the rules in this rule set, using the property name as the key
28+
* the rules in this rule set, using the property or rule name as the key
2929
*
3030
* @var array<string, Rule>
3131
*/
@@ -155,15 +155,15 @@ public function getRules($searchPattern = null)
155155
}
156156
/** @var array<int, Rule> $result */
157157
$result = [];
158-
foreach ($this->rules as $propertyName => $rule) {
158+
foreach ($this->rules as $propertyOrRuleName => $rule) {
159159
// Either no search rule is given or the search rule matches the found rule exactly
160160
// or the search rule ends in “-” and the found rule starts with the search rule.
161161
if (
162-
!$searchPattern || $propertyName === $searchPattern
162+
!$searchPattern || $propertyOrRuleName === $searchPattern
163163
|| (
164164
\strrpos($searchPattern, '-') === \strlen($searchPattern) - \strlen('-')
165-
&& (\strpos($propertyName, $searchPattern) === 0
166-
|| $propertyName === \substr($searchPattern, 0, -1))
165+
&& (\strpos($propertyOrRuleName, $searchPattern) === 0
166+
|| $propertyOrRuleName === \substr($searchPattern, 0, -1))
167167
)
168168
) {
169169
$result = \array_merge($result, $rule);

0 commit comments

Comments
 (0)