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

Empty string check when setting a property. #153

Merged
merged 3 commits into from
Oct 22, 2020
Merged

Empty string check when setting a property. #153

merged 3 commits into from
Oct 22, 2020

Conversation

jose-gomez-evinex
Copy link
Contributor

Update BaseType.php
Added empty string check when setting a property.
Fixes issue #151

Added empty string check when setting a property.
Copy link
Collaborator

@Gummibeer Gummibeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR!
The changes should be done in the generator template as they will otherwise be reverted the next time we generate the source code.

src/BaseType.php Outdated Show resolved Hide resolved
Update generator\templates\static\BaseType.php

Moved the piece of code that checks for empty strings #151 to Generator Template file.
@jose-gomez-evinex
Copy link
Contributor Author

Thanks and sorry about that. I should have be more familiar with the project before submiting any request. Also, I'm still learning how Github works 😅.

@Gummibeer
Copy link
Collaborator

Everything fine! 😉 That's why we review PRs before merging. 😊

Thanks for the quick fix. I'm on the road right now - but seems good.
Will check in detail, merge and release later. 🎉

@Gummibeer Gummibeer merged commit f4c459b into spatie:master Oct 22, 2020
@Gummibeer Gummibeer linked an issue Oct 22, 2020 that may be closed by this pull request
@Gummibeer
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Hacktoberfest https://hacktoberfest.digitalocean.com hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Avoid empty strings in properties
2 participants