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

Fix issue with ReflectionParameter (fixes #14) #15

Merged
merged 1 commit into from
Nov 12, 2018
Merged

Fix issue with ReflectionParameter (fixes #14) #15

merged 1 commit into from
Nov 12, 2018

Conversation

starvsion
Copy link
Contributor

The original code

$constructorParameters[] = $parameter->getType()->getName() == 'int' ? 'integer' : $parameter->getType()->getName();

has error because not all $parameter has a getType method (which are PHP's native types, such as int, bool etc.); this fixes it, by looping it thru, and it does not have getType, it will just take it from givenParameters; this is fine, because native PHP types are very flexible, and it will not cause error ( passing 3 as int, string or bool doesn't cause error )

@introwit introwit merged commit a457145 into JoggApp:master Nov 12, 2018
@introwit
Copy link
Member

Thank you so much for the contribution @starvsion 🙂 I have added credits to you in the changelog and the release 😄

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.

2 participants