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
57
57
/**
58
58
* Returns all `RuleSet` objects recursively found in the tree, no matter how deeply nested the rule sets are.
59
59
*
60
- * @return array<int, RuleSet>
60
+ * @return list< RuleSet>
61
61
*/
62
62
public function getAllRuleSets (): array
63
63
{
64
- /** @var array<int, RuleSet> $result */
65
64
$ result = [];
66
- $ this ->allRuleSets ($ result );
67
- return $ result ;
68
- }
69
65
70
- /**
71
- * @param array<int, RuleSet> $result
72
- */
73
- protected function allRuleSets (array &$ result ): void
74
- {
75
66
foreach ($ this ->contents as $ item ) {
76
67
if ($ item instanceof RuleSet) {
77
68
$ result [] = $ item ;
78
69
} elseif ($ item instanceof CSSBlockList) {
79
- $ item ->allRuleSets ( $ result );
70
+ $ result = \array_merge ( $ result , $ item ->getAllRuleSets () );
80
71
}
81
72
}
73
+
74
+ return $ result ;
82
75
}
83
76
84
77
/**
You can’t perform that action at this time.
0 commit comments