-
Notifications
You must be signed in to change notification settings - Fork 16
Phpstan level 1 issues #176
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
Phpstan level 1 issues #176
Conversation
27da9dd to
5e5780d
Compare
I think we have a blank option for browser compatibility. At the time it was written, it's likely that a select with no elements did not render properly. The code in SwatFlydown will only render a select if there are >= 1 options. |
|
Then I'd suggest we do the same thing as we do when we want a blank option, and just do |
Phpstan level 1 issues
Fixes all level 1 issues and those that are caught with
checkFunctionArgumentTypes: true... with one exception that I'm sure how best to fix:
Instead of doing$options = [new SwatOption(null, null)];could we just do$options = [];? If not, then we would need to change the constructor ofSwatOptionto allow a null title.✅ Switched to use
SwatOption(null, '')now as it matches other places in the code.❓ My guess is that somewhere in
SwatTableViewInputRow::displayEnterAnotherRow()we should return early (and not output anything?) if$columnsis empty.