File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2525abstract 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 );
You can’t perform that action at this time.
0 commit comments