|
35 | 35 | class DeclarationBlock implements CSSElement, CSSListItem, Positionable, RuleContainer |
36 | 36 | { |
37 | 37 | use CommentContainer; |
| 38 | + use LegacyRuleContainerMethods; |
38 | 39 | use Position; |
39 | 40 |
|
40 | 41 | /** |
@@ -180,65 +181,65 @@ public function getRuleSet(): RuleSet |
180 | 181 | } |
181 | 182 |
|
182 | 183 | /** |
183 | | - * @see RuleSet::addRule() |
| 184 | + * @see RuleSet::addDeclaration() |
184 | 185 | */ |
185 | | - public function addRule(Declaration $declarationToAdd, ?Declaration $sibling = null): void |
| 186 | + public function addDeclaration(Declaration $declarationToAdd, ?Declaration $sibling = null): void |
186 | 187 | { |
187 | | - $this->ruleSet->addRule($declarationToAdd, $sibling); |
| 188 | + $this->ruleSet->addDeclaration($declarationToAdd, $sibling); |
188 | 189 | } |
189 | 190 |
|
190 | 191 | /** |
191 | 192 | * @return array<int<0, max>, Declaration> |
192 | 193 | * |
193 | | - * @see RuleSet::getRules() |
| 194 | + * @see RuleSet::getDeclarations() |
194 | 195 | */ |
195 | | - public function getRules(?string $searchPattern = null): array |
| 196 | + public function getDeclarations(?string $searchPattern = null): array |
196 | 197 | { |
197 | | - return $this->ruleSet->getRules($searchPattern); |
| 198 | + return $this->ruleSet->getDeclarations($searchPattern); |
198 | 199 | } |
199 | 200 |
|
200 | 201 | /** |
201 | 202 | * @param array<Declaration> $declarations |
202 | 203 | * |
203 | | - * @see RuleSet::setRules() |
| 204 | + * @see RuleSet::setDeclarations() |
204 | 205 | */ |
205 | | - public function setRules(array $declarations): void |
| 206 | + public function setDeclarations(array $declarations): void |
206 | 207 | { |
207 | | - $this->ruleSet->setRules($declarations); |
| 208 | + $this->ruleSet->setDeclarations($declarations); |
208 | 209 | } |
209 | 210 |
|
210 | 211 | /** |
211 | 212 | * @return array<string, Declaration> |
212 | 213 | * |
213 | | - * @see RuleSet::getRulesAssoc() |
| 214 | + * @see RuleSet::getDeclarationsAssociative() |
214 | 215 | */ |
215 | | - public function getRulesAssoc(?string $searchPattern = null): array |
| 216 | + public function getDeclarationsAssociative(?string $searchPattern = null): array |
216 | 217 | { |
217 | | - return $this->ruleSet->getRulesAssoc($searchPattern); |
| 218 | + return $this->ruleSet->getDeclarationsAssociative($searchPattern); |
218 | 219 | } |
219 | 220 |
|
220 | 221 | /** |
221 | | - * @see RuleSet::removeRule() |
| 222 | + * @see RuleSet::removeDeclaration() |
222 | 223 | */ |
223 | | - public function removeRule(Declaration $declarationToRemove): void |
| 224 | + public function removeDeclaration(Declaration $declarationToRemove): void |
224 | 225 | { |
225 | | - $this->ruleSet->removeRule($declarationToRemove); |
| 226 | + $this->ruleSet->removeDeclaration($declarationToRemove); |
226 | 227 | } |
227 | 228 |
|
228 | 229 | /** |
229 | | - * @see RuleSet::removeMatchingRules() |
| 230 | + * @see RuleSet::removeMatchingDeclarations() |
230 | 231 | */ |
231 | | - public function removeMatchingRules(string $searchPattern): void |
| 232 | + public function removeMatchingDeclarations(string $searchPattern): void |
232 | 233 | { |
233 | | - $this->ruleSet->removeMatchingRules($searchPattern); |
| 234 | + $this->ruleSet->removeMatchingDeclarations($searchPattern); |
234 | 235 | } |
235 | 236 |
|
236 | 237 | /** |
237 | | - * @see RuleSet::removeAllRules() |
| 238 | + * @see RuleSet::removeAllDeclarations() |
238 | 239 | */ |
239 | | - public function removeAllRules(): void |
| 240 | + public function removeAllDeclarations(): void |
240 | 241 | { |
241 | | - $this->ruleSet->removeAllRules(); |
| 242 | + $this->ruleSet->removeAllDeclarations(); |
242 | 243 | } |
243 | 244 |
|
244 | 245 | /** |
|
0 commit comments