-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
added .styleci.yml #652
added .styleci.yml #652
Conversation
seems like StyleCI defaults to PHP 5.4 syntax:
see https://styleci.io/commits/7a4131e72504091b7d8e2cf203d03dc185331699 |
Not if the present is set to psr2 it doesn't. |
Oh, I see. That's what this PR is for. :) |
You could just disable the short array synax fixer and enable the long array syntax fixer? |
@GrahamCampbell well imho StyleCI should examine the composer.json to determine what PHP version specific fixers to enable .. |
We don't do that because we don't want to make it easy for people to use PHP 5.3 because it's EOL. |
That said, it's pretty easy to just disable the fixer if you don't want it. :) |
@@ -131,7 +130,8 @@ protected function validateAlias($alias) | |||
protected function getPhpcrProperty($originalAlias, $odmField) | |||
{ | |||
$this->validateAlias($originalAlias); | |||
$meta = $this->aliasMetadata[$originalAlias];; | |||
$meta = $this->aliasMetadata[$originalAlias]; | |||
; |
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.
@GrahamCampbell this one is an interesting typo and a suboptimal fix
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.
That's because you haven't got out semi colon fixers turned on.
@@ -471,7 +471,7 @@ class ChildTestObj | |||
*/ | |||
class ChildReferrerTestObj | |||
{ | |||
/** @PHPCRODM\Id */ | |||
/** @PHPCRODM\Id */ |
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.
@GrahamCampbell this looks strange as well
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.
This change is correct. Your indentation was wrong.
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.
You must indent with 4 spaces.
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.
sure .. but it doesn't fix everything:
https://github.com/doctrine/phpcr-odm/blob/styleci/tests/Doctrine/Tests/ODM/PHPCR/Functional/Hierarchy/ChildTest.php#L472
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.
Yeh, the indentation fixers are a bit limited, sorry.
@dbu ready for review |
- duplicate_semicolon | ||
|
||
disabled: | ||
- short_array_syntax |
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.
You don't need to disable this when using the psr2 present. It's already disabled.
awesome. this tool looks really useful! |
We've got some major improvements coming up in a few days too. :) |
No description provided.