-
Notifications
You must be signed in to change notification settings - Fork 137
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
Fix ParserInterface implementations #120
Fix ParserInterface implementations #120
Conversation
Also do some clean up (unused params, docblocks, typos)
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.
It would probably be better to use array casting instead of ternary operators in all parsers. It would be cleaner and only one line instead of two.
So code will be:
return (array) $this->parse($data, $filename);
@filips123 I have addressed your comments now 👍 |
Thanks! |
All the parsers (except ini) were not compliant with the ParserInterface. Most of them returned array|null, rather than array defined in the interface. Rather than fixing the parsers, (array) casts were being used in the consuming code (Config).
This PR: