PHP-CSS-Parser icon indicating copy to clipboard operation
PHP-CSS-Parser copied to clipboard

Rework logic between `CSSList::` `parseList()` and `parseListItem()`

Open JakeQZ opened this issue 11 months ago • 0 comments

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.

JakeQZ avatar Mar 23 '25 23:03 JakeQZ