Skip to content

Conversation

@npghub
Copy link
Collaborator

@npghub npghub commented Oct 8, 2024

No description provided.

@npghub npghub marked this pull request as ready for review October 8, 2024 14:04
*
* @return array<int, CSSFunction>
*/
public function getAllFunctions($mElement = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Could we think of a better name for this? Maybe getFunctionsRecursively()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Could we think of a better name for this? Maybe getFunctionsRecursively()?

I'm following the naming scheme of the file eg. getAllValues, getAllRulesets, etc.

} elseif ($oElement instanceof Rule) {
$this->allFunctions($oElement->getValue(), $aResult);
} elseif ($oElement instanceof CSSFunction) {
$aResult[] = $oElement;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider using generators to reduce memory usage? Would it be worthy 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider using generators to reduce memory usage? Would it be worthy 🤔

Nice. Yet I don't think this would go well with upstream if this change makes it there :) (very conservative. Maybe with good reason)

@npghub npghub merged commit ac01e86 into patched-2024 Oct 9, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants