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

[RFC] Add SlevomatCodingStandard.PHP.TypeCast #29

Merged
merged 1 commit into from
Mar 2, 2018
Merged

Conversation

carusogabriel
Copy link
Contributor

@carusogabriel carusogabriel commented Feb 13, 2018

Ref: slevomat/coding-standard#284

Found 10 cases of integer cases in ORM, 13 cases of boolean in DBAL and 20 cases of boolean and 17 of integer in mongodb-odm

Copy link
Member

@lcobucci lcobucci left a 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

@Majkl578 Majkl578 added the WIP label Feb 13, 2018
Copy link
Contributor

@Majkl578 Majkl578 left a 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.

Copy link
Member

@alcaeus alcaeus left a 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"
Copy link
Member

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.
@Majkl578 Majkl578 merged commit b111f4d into master Mar 2, 2018
@Majkl578 Majkl578 deleted the typecast branch March 2, 2018 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants