File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,13 @@ abstract class CSSBlockList extends CSSList
2727 */
2828 public function getAllDeclarationBlocks (): array
2929 {
30- /** @var list<DeclarationBlock> $result */
3130 $ result = [];
3231
33- foreach ($ this ->contents as $ directSibling ) {
34- if ($ directSibling instanceof DeclarationBlock) {
35- $ result [] = $ directSibling ;
36- } elseif ($ directSibling instanceof CSSBlockList) {
37- foreach ($ directSibling ->getAllDeclarationBlocks () as $ grandchild ) {
38- $ result [] = $ grandchild ;
39- }
32+ foreach ($ this ->contents as $ item ) {
33+ if ($ item instanceof DeclarationBlock) {
34+ $ result [] = $ item ;
35+ } elseif ($ item instanceof CSSBlockList) {
36+ $ result = \array_merge ($ result , $ item ->getAllDeclarationBlocks ());
4037 }
4138 }
4239
You can’t perform that action at this time.
0 commit comments