Skip to content

Commit c5c5e1d

Browse files
committed
[TASK] Use Property\Declaration in CSSBlockList
This replaces `Rule\Rule`, following #1508.
1 parent 7941744 commit c5c5e1d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Please also have a look at our
1818

1919
### Changed
2020

21-
- `Rule\Rule` class is renamed to `Property\Declaration` (#1508)
21+
- `Rule\Rule` class is renamed to `Property\Declaration` (#1508, #1512)
2222
- `Rule::setRule()` and `getRule()` are replaced with `setPropertyName()` and
2323
`getPropertyName()` (#1506)
2424
- `Selector` is now represented as a sequence of `Selector\Component` objects

src/CSSList/CSSBlockList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
namespace Sabberworm\CSS\CSSList;
66

77
use Sabberworm\CSS\CSSElement;
8+
use Sabberworm\CSS\Property\Declaration;
89
use Sabberworm\CSS\Property\Selector;
9-
use Sabberworm\CSS\Rule\Rule;
1010
use Sabberworm\CSS\RuleSet\DeclarationBlock;
1111
use Sabberworm\CSS\RuleSet\RuleContainer;
1212
use Sabberworm\CSS\RuleSet\RuleSet;
@@ -65,7 +65,7 @@ public function getAllRuleSets(): array
6565
}
6666

6767
/**
68-
* Returns all `Value` objects found recursively in `Rule`s in the tree.
68+
* Returns all `Value` objects found recursively in `Declaration`s in the tree.
6969
*
7070
* @param CSSElement|null $element
7171
* This is the `CSSList` or `RuleSet` to start the search from (defaults to the whole document).
@@ -105,7 +105,7 @@ public function getAllValues(
105105
$this->getAllValues($rule, $ruleSearchPattern, $searchInFunctionArguments)
106106
);
107107
}
108-
} elseif ($element instanceof Rule) {
108+
} elseif ($element instanceof Declaration) {
109109
$value = $element->getValue();
110110
// `string` values are discarded.
111111
if ($value instanceof CSSElement) {

0 commit comments

Comments
 (0)