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

Issue with is_compound on index 0

Open krlnwll opened this issue 7 years ago • 2 comments

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']); }

krlnwll avatar Mar 01 '17 11:03 krlnwll

Mind sending this as a pull request?

joshfraser avatar Mar 01 '17 18:03 joshfraser

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.

krlnwll avatar Mar 01 '17 20:03 krlnwll