Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code in CSSList #994

Open
5 of 9 tasks
oliverklee opened this issue Feb 25, 2025 · 0 comments
Open
5 of 9 tasks

Refactor code in CSSList #994

oliverklee opened this issue Feb 25, 2025 · 0 comments
Assignees

Comments

@oliverklee
Copy link
Contributor

oliverklee commented Feb 25, 2025

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
@oliverklee oliverklee self-assigned this Feb 25, 2025
oliverklee added a commit that referenced this issue Feb 25, 2025
This is a pre-patch to moving `getAllDeclarationBlocks()` up
to `CSSBlockList`.

Part of #994.
oliverklee added a commit that referenced this issue Feb 25, 2025
This is a pre-patch to moving `getAllDeclarationBlocks()` up
to `CSSBlockList`.

Part of #994.
oliverklee added a commit that referenced this issue Feb 25, 2025
Move this method up without any changes to the method or its
callers.

We'll clean this up in later changes.

Part of #994.
oliverklee added a commit that referenced this issue Feb 25, 2025
Move this method up without any changes to the method or its
callers.

We'll clean this up in later changes.

Part of #994.
oliverklee added a commit that referenced this issue Feb 26, 2025
Move this method up without any changes to the method or its
callers.

We'll clean this up in later changes.

Part of #994.
oliverklee added a commit that referenced this issue Feb 26, 2025
oliverklee added a commit that referenced this issue Feb 26, 2025
Move this method up without any changes to the method or its
callers.

We'll clean this up in later changes.

Part of #994.
JakeQZ pushed a commit that referenced this issue Feb 26, 2025
Move this method up without any changes to the method or its
callers.

We'll clean this up in later changes.

Part of #994.
oliverklee added a commit that referenced this issue Feb 26, 2025
oliverklee added a commit that referenced this issue Feb 27, 2025
JakeQZ pushed a commit that referenced this issue Feb 27, 2025
oliverklee added a commit that referenced this issue Mar 1, 2025
Move this method up without any changes to the method or its callers.

We'll clean this up in later changes.

Part of #994.
JakeQZ pushed a commit that referenced this issue Mar 2, 2025
Move this method up without any changes to the method or its callers.

We'll clean this up in later changes.

Part of #994.
oliverklee added a commit that referenced this issue Mar 2, 2025
Also remove the now-unused method `allRuleSets()`.

Part of #994.
JakeQZ pushed a commit that referenced this issue Mar 2, 2025
Also remove the now-unused method `allRuleSets()`.

Part of #994.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant