-
Notifications
You must be signed in to change notification settings - Fork 446
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
Use ReturnTypeExtension for mb_str_split #379
Conversation
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.
And a test. See where str_split is already tested.
@@ -21,7 +21,8 @@ final class StrSplitFunctionReturnTypeExtension implements DynamicFunctionReturn | |||
|
|||
public function isFunctionSupported(FunctionReflection $functionReflection): bool | |||
{ | |||
return $functionReflection->getName() === 'str_split'; | |||
return $functionReflection->getName() === 'str_split' | |||
|| $functionReflection->getName() === 'mb_str_split'; |
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.
Use in_array please.
95660e6
to
da9c97e
Compare
da9c97e
to
dd0d4fa
Compare
@ondrejmirtes The PR seems fine to me now. But all the test are failing weirdly. |
Thank you! |
I fixed the CI with: ef6ca4a Something weird is going on with latest version of nette/di... |
Thanks you too. |
Shouldn't
mb_str_split
work asstr_split
? @ondrejmirtesI can add tests if you think it's right.