-
Notifications
You must be signed in to change notification settings - Fork 0
Add get all css functions method #2
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
Conversation
* | ||
* @return array<int, CSSFunction> | ||
*/ | ||
public function getAllFunctions($mElement = null) |
There was a problem hiding this comment.
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()
?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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)
No description provided.