-
Notifications
You must be signed in to change notification settings - Fork 144
Refactor code in CSSList
#994
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
Milestone
Comments
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.
JakeQZ
added a commit
that referenced
this issue
Apr 11, 2025
The `$element` parameter was overloaded with a dual purpose. A second separate parameter has been added for rule filtering, which is not actually mutually exclusive with CSS subtree selection. Since `getAllValues()` is part of the public API, the method now supports being called with the old or new signatures, with the old signature being deprecated. Once the deprecation has been included in the 8.x release branch, the messiness of supporting the previous API can be removed. Part of #994. Also relates to #1230.
oliverklee
pushed a commit
that referenced
this issue
Apr 11, 2025
The `$element` parameter was overloaded with a dual purpose. A second separate parameter has been added for rule filtering, which is not actually mutually exclusive with CSS subtree selection. Since `getAllValues()` is part of the public API, the method now supports being called with the old or new signatures, with the old signature being deprecated. Once the deprecation has been included in the 8.x release branch, the messiness of supporting the previous API can be removed. Part of #994. Also relates to #1230.
JakeQZ
added a commit
that referenced
this issue
Apr 13, 2025
Move functionality from `allValues()` directly into to `getAllValues()`, so as to avoid passing array by reference, removing `allValues()`. Avoid making the recursive call for nested items that are not `CSSElement`s. Part of #994.
JakeQZ
added a commit
that referenced
this issue
Apr 13, 2025
The renamed (internal) method now returns the result, instead of having a reference parameter for it. Closes #994.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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).
getAllDeclarationBlocks
fromDocument
to the parent classCSSBlockList
getAllDeclarationBlocks
CSSBlockList::allDeclarationBlocks
with calls to::getAllDeclarationBlocks
and dropallDeclarationBlocks
getAllRuleSets
fromDocument
to the parent classCSSBlockList
getAllRuleSets
CSSBlockList::allRuleSets
with calls to::getAllRuleSets
and dropallRuleSets
getAllValues
fromDocument
to the parent classCSSBlockList
getAllValues
CSSBlockList::allValues
with calls to::getAllValues
and dropallValues
CSSBlockList::allSelectors
to::getAllSelectors
and change its interface to return the resultThe text was updated successfully, but these errors were encountered: