Skip to content
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

function localeAlternate passing only one value #25

Merged
merged 1 commit into from
Dec 30, 2018
Merged

function localeAlternate passing only one value #25

merged 1 commit into from
Dec 30, 2018

Conversation

FabrizioCafolla
Copy link
Contributor

If the function wants a string array mandatory, make the parameter $locales typed array

If the function wants a string array mandatory, make the parameter $locales typed array
@chriskonnertz chriskonnertz self-assigned this Dec 30, 2018
@chriskonnertz chriskonnertz merged commit 19fe63f into chriskonnertz:master Dec 30, 2018
@chriskonnertz
Copy link
Owner

chriskonnertz commented Dec 30, 2018

Hello,

thaks! I have merged your pull request.

But I consider this only a temporary solution. What if someone passes an integer? Would cause an error. The better way seems to do exactly what you said: "make the parameter $locales typed array"
=> public function localeAlternate(array $locales = array()) I created a new issue as a reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants