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

Camel case properties is not working as expected #880

Closed
bop10 opened this issue Jan 20, 2020 · 0 comments · Fixed by #881
Closed

Camel case properties is not working as expected #880

bop10 opened this issue Jan 20, 2020 · 0 comments · Fixed by #881

Comments

@bop10
Copy link
Contributor

bop10 commented Jan 20, 2020

Hi, currently there is a problem in the implementation of camel cased properties implemented in #326 (the bug is present since 2016).

If you use the command php artisan ide-helper:models, you will generate the docblocks.
If you don't change anything and run the command again, some properties will duplicate (for example, if you have:
* @property-read int|null $modelsCount
Every time you run the command it will append to the docblock the same property.

This happens because the method checks if the property is present BEFORE the property is camelCased, therefore, the $name is never in the $properties array, appending the property each time the command is run

I will create a pull request fixing this ;)

#881 Fixes the problem

@bop10 bop10 changed the title Camel case properties is bugged Camel case properties is not working as expected Jan 20, 2020
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 a pull request may close this issue.

1 participant