-
Notifications
You must be signed in to change notification settings - Fork 56
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
[RFC] Add SlevomatCodingStandard.PHP.TypeCast #29
Conversation
07db6a9
to
e91b2fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just wait for it to be released and it LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to wait for 4.5.0 which is few weeks away (that's why I didn't propose it here right after being merged...). Good otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once it has been released.
composer.json
Outdated
@@ -18,7 +18,7 @@ | |||
"php": "^7.1", | |||
"squizlabs/php_codesniffer": "^3.2", | |||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.2", | |||
"slevomat/coding-standard": "^4.4.0" | |||
"slevomat/coding-standard": "dev-master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires release before merging
Enforces using shorthand cast operators, forbids usage of unset and binary cast operators: `(bool)` instead of `(boolean)`, `(int)` instead of `(integer)`, `(float)` instead of `(double)` or `(real)`. `(binary)` and `(unset)` are forbidden.
Ref: slevomat/coding-standard#284
Found 10 cases of
integer
cases in ORM, 13 cases ofboolean
in DBAL and 20 cases ofboolean
and 17 ofinteger
in mongodb-odm