Skip to content

Refactor code in CSSList #994

Closed
@oliverklee

Description

@oliverklee

The goal is to get rid of redundant code and to reduce functions that have return parameters (which are both hard to understand as well as hard analyze with PHPStan).

  • move getAllDeclarationBlocks from Document to the parent class CSSBlockList
  • refactor getAllDeclarationBlocks
  • replace usages of CSSBlockList::allDeclarationBlocks with calls to ::getAllDeclarationBlocks and drop allDeclarationBlocks
  • move getAllRuleSets from Document to the parent class CSSBlockList
  • refactor getAllRuleSets
  • replace usages of CSSBlockList::allRuleSets with calls to ::getAllRuleSets and drop allRuleSets
  • move getAllValues from Document to the parent class CSSBlockList
  • refactor getAllValues
  • replace usages of CSSBlockList::allValues with calls to ::getAllValues and drop allValues
  • rename CSSBlockList::allSelectors to ::getAllSelectors and change its interface to return the result

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions