@@ -131,20 +131,15 @@ public function addRule(Rule $ruleToAdd, ?Rule $sibling = null): void
131
131
* @example $ruleSet->getRules('font-')
132
132
* //returns an array of all rules either beginning with font- or matching font.
133
133
*
134
- * @param Rule| string|null $searchPattern
134
+ * @param string|null $searchPattern
135
135
* Pattern to search for. If null, returns all rules.
136
136
* If the pattern ends with a dash, all rules starting with the pattern are returned
137
137
* as well as one matching the pattern with the dash excluded.
138
- * Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0.
139
- * Call `getRules($rule->getRule())` instead.
140
138
*
141
139
* @return array<int<0, max>, Rule>
142
140
*/
143
- public function getRules ($ searchPattern = null ): array
141
+ public function getRules (? string $ searchPattern = null ): array
144
142
{
145
- if ($ searchPattern instanceof Rule) {
146
- $ searchPattern = $ searchPattern ->getRule ();
147
- }
148
143
$ result = [];
149
144
foreach ($ this ->rules as $ propertyName => $ rules ) {
150
145
// Either no search rule is given or the search rule matches the found rule exactly
@@ -191,16 +186,14 @@ public function setRules(array $rules): void
191
186
* like `{ background-color: green; background-color; rgba(0, 127, 0, 0.7); }` will only yield an associative array
192
187
* containing the rgba-valued rule while `getRules()` would yield an indexed array containing both.
193
188
*
194
- * @param Rule| string|null $searchPattern
189
+ * @param string|null $searchPattern
195
190
* Pattern to search for. If null, returns all rules. If the pattern ends with a dash,
196
191
* all rules starting with the pattern are returned as well as one matching the pattern with the dash
197
192
* excluded.
198
- * Passing a `Rule` for this parameter is deprecated in version 8.9.0, and will not work from v9.0.
199
- * Call `getRulesAssoc($rule->getRule())` instead.
200
193
*
201
194
* @return array<string, Rule>
202
195
*/
203
- public function getRulesAssoc ($ searchPattern = null ): array
196
+ public function getRulesAssoc (? string $ searchPattern = null ): array
204
197
{
205
198
/** @var array<string, Rule> $result */
206
199
$ result = [];
0 commit comments