Closed equinoxmatt closed 5 years ago
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: