PHP-Name-Parser
PHP-Name-Parser copied to clipboard
Issue with is_compound on index 0
array_search will return 0 if the match is the first word, should be changed to in_array
Before: protected function is_compound($word) { return array_search(mb_strtolower($word), $this->dict['compound']); }
After: protected function is_compound($word) { return in_array(mb_strtolower($word), $this->dict['compound']); }
Mind sending this as a pull request?
I could, I would need to create a new fork and rename my original, as I made a bunch of specific changes for my use case.