File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -57,28 +57,21 @@ protected function allDeclarationBlocks(array &$result): void
5757 /**
5858 * Returns all `RuleSet` objects recursively found in the tree, no matter how deeply nested the rule sets are.
5959 *
60- * @return array<int, RuleSet>
60+ * @return list< RuleSet>
6161 */
6262 public function getAllRuleSets (): array
6363 {
64- /** @var array<int, RuleSet> $result */
6564 $ result = [];
66- $ this ->allRuleSets ($ result );
67- return $ result ;
68- }
6965
70- /**
71- * @param array<int, RuleSet> $result
72- */
73- protected function allRuleSets (array &$ result ): void
74- {
7566 foreach ($ this ->contents as $ item ) {
7667 if ($ item instanceof RuleSet) {
7768 $ result [] = $ item ;
7869 } elseif ($ item instanceof CSSBlockList) {
79- $ item ->allRuleSets ( $ result );
70+ $ result = \array_merge ( $ result , $ item ->getAllRuleSets () );
8071 }
8172 }
73+
74+ return $ result ;
8275 }
8376
8477 /**
You can’t perform that action at this time.
0 commit comments