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 custom values and int cast #871

Merged
merged 1 commit into from
Jan 28, 2020
Merged

Conversation

paxal
Copy link
Contributor

@paxal paxal commented Jan 28, 2020

When specifying custom value, it's not casted as a string.
Thus we ensure we compare integers together with other integers and fix issue with bad addError() call with string param instead of int.

Fixed error :
PHP Fatal error: Uncaught TypeError: Argument 4 passed to SlevomatCodingStandard\Sniffs\Classes\PropertySpacingSniff::addError() must be of the type int, string given, called in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Classes/AbstractPropertyAndConstantSpacing.php on line 83 and defined in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Classes/PropertySpacingSniff.php:25

Copy link
Contributor

@kukulich kukulich left a comment

Choose a reason for hiding this comment

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

@kukulich kukulich added the Bug label Jan 28, 2020
When specifying custom value, it's not casted as a string.
Thus we ensure we compare integers together with other integers and fix issue with bad addError() call with string param instead of int.
@kukulich kukulich merged commit 9350d3c into slevomat:master Jan 28, 2020
@kukulich
Copy link
Contributor

Thanks.

@paxal
Copy link
Contributor Author

paxal commented Jan 28, 2020

Thanks :)

@paxal paxal deleted the patch-1 branch January 28, 2020 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants