Skip to content

Rework logic between CSSList:: parseList() and parseListItem() #1211

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

Open
JakeQZ opened this issue Mar 23, 2025 · 0 comments
Open

Rework logic between CSSList:: parseList() and parseListItem() #1211

JakeQZ opened this issue Mar 23, 2025 · 0 comments

Comments

@JakeQZ
Copy link
Collaborator

JakeQZ commented Mar 23, 2025

Currently parseListItem() returns null to indicate that the end of the list has been reached, and false to indicate that an invalid item was found but parsing of the remaining items should continue.

This is confusing, and the mixed type return value does not work well with static analysis tools like PHPStan.

Perhaps instead parseList() should have the responsibility for checking for the end of the list itself.

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

No branches or pull requests

1 participant