@@ -131,20 +131,15 @@ public function addRule(Rule $ruleToAdd, ?Rule $sibling = null): void
131131 * @example $ruleSet->getRules('font-')
132132 * //returns an array of all rules either beginning with font- or matching font.
133133 *
134- * @param Rule| string|null $searchPattern
134+ * @param string|null $searchPattern
135135 * Pattern to search for. If null, returns all rules.
136136 * If the pattern ends with a dash, all rules starting with the pattern are returned
137137 * 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.
140138 *
141139 * @return array<int<0, max>, Rule>
142140 */
143- public function getRules ($ searchPattern = null ): array
141+ public function getRules (? string $ searchPattern = null ): array
144142 {
145- if ($ searchPattern instanceof Rule) {
146- $ searchPattern = $ searchPattern ->getRule ();
147- }
148143 $ result = [];
149144 foreach ($ this ->rules as $ propertyName => $ rules ) {
150145 // 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
191186 * like `{ background-color: green; background-color; rgba(0, 127, 0, 0.7); }` will only yield an associative array
192187 * containing the rgba-valued rule while `getRules()` would yield an indexed array containing both.
193188 *
194- * @param Rule| string|null $searchPattern
189+ * @param string|null $searchPattern
195190 * Pattern to search for. If null, returns all rules. If the pattern ends with a dash,
196191 * all rules starting with the pattern are returned as well as one matching the pattern with the dash
197192 * 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.
200193 *
201194 * @return array<string, Rule>
202195 */
203- public function getRulesAssoc ($ searchPattern = null ): array
196+ public function getRulesAssoc (? string $ searchPattern = null ): array
204197 {
205198 /** @var array<string, Rule> $result */
206199 $ result = [];
0 commit comments