Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Please also have a look at our

### Changed

- `RuleSet\RuleContainer` is renamed to `RuleSet\DeclarationList` (#1530)
- `RuleSet\RuleContainer` is renamed to `RuleSet\DeclarationList` (#1530, #1539)
- Methods like `setRule()` in `RuleSet` and `DeclarationBlock` have been renamed
to `setDeclaration()`, etc. (#1521)
- `Rule\Rule` class is renamed to `Property\Declaration`
Expand Down
4 changes: 2 additions & 2 deletions src/CSSList/CSSBlockList.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Sabberworm\CSS\Property\Declaration;
use Sabberworm\CSS\Property\Selector;
use Sabberworm\CSS\RuleSet\DeclarationBlock;
use Sabberworm\CSS\RuleSet\RuleContainer;
use Sabberworm\CSS\RuleSet\DeclarationList;
use Sabberworm\CSS\RuleSet\RuleSet;
use Sabberworm\CSS\Value\CSSFunction;
use Sabberworm\CSS\Value\Value;
Expand Down Expand Up @@ -98,7 +98,7 @@ public function getAllValues(
);
}
}
} elseif ($element instanceof RuleContainer) {
} elseif ($element instanceof DeclarationList) {
foreach ($element->getRules($ruleSearchPattern) as $rule) {
$result = \array_merge(
$result,
Expand Down
4 changes: 2 additions & 2 deletions src/RuleSet/DeclarationBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
*
* Note that `CSSListItem` extends both `Commentable` and `Renderable`, so those interfaces must also be implemented.
*/
class DeclarationBlock implements CSSElement, CSSListItem, Positionable, RuleContainer
class DeclarationBlock implements CSSElement, CSSListItem, Positionable, DeclarationList
{
use CommentContainer;
use LegacyRuleContainerMethods;
use LegacyDeclarationListMethods;
use Position;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use Sabberworm\CSS\Property\Declaration;

/**
* Provides a mapping of the deprecated methods in a `RuleContainer` to their renamed replacements.
* Provides a mapping of the deprecated methods in a `DeclarationList` to their renamed replacements.
*/
trait LegacyRuleContainerMethods
trait LegacyDeclarationListMethods
{
/**
* @deprecated in v9.2, will be removed in v10.0; use `addDeclaration()` instead.
Expand Down
4 changes: 2 additions & 2 deletions src/RuleSet/RuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
*
* Note that `CSSListItem` extends both `Commentable` and `Renderable`, so those interfaces must also be implemented.
*/
class RuleSet implements CSSElement, CSSListItem, Positionable, RuleContainer
class RuleSet implements CSSElement, CSSListItem, Positionable, DeclarationList
{
use CommentContainer;
use LegacyRuleContainerMethods;
use LegacyDeclarationListMethods;
use Position;

/**
Expand Down