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

added .styleci.yml #652

Merged
merged 4 commits into from
Jul 22, 2015
Merged

added .styleci.yml #652

merged 4 commits into from
Jul 22, 2015

Conversation

lsmith77
Copy link
Member

No description provided.

@lsmith77
Copy link
Member Author

seems like StyleCI defaults to PHP 5.4 syntax:

-        $childDocuments = array();
+        $childDocuments = [];

see https://styleci.io/commits/7a4131e72504091b7d8e2cf203d03dc185331699

@lsmith77 lsmith77 changed the title added .styleci.yml [WIP] added .styleci.yml Jul 21, 2015
@GrahamCampbell
Copy link

seems like StyleCI defaults to PHP 5.4 syntax:

Not if the present is set to psr2 it doesn't.

@GrahamCampbell
Copy link

Oh, I see. That's what this PR is for. :)

@GrahamCampbell
Copy link

You could just disable the short array synax fixer and enable the long array syntax fixer?

@lsmith77
Copy link
Member Author

@GrahamCampbell well imho StyleCI should examine the composer.json to determine what PHP version specific fixers to enable ..

@GrahamCampbell
Copy link

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.

@GrahamCampbell
Copy link

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];
;
Copy link
Member Author

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

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 */
Copy link
Member Author

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

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.

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

@lsmith77 lsmith77 changed the title [WIP] added .styleci.yml added .styleci.yml Jul 21, 2015
@lsmith77
Copy link
Member Author

@dbu ready for review

@lsmith77 lsmith77 added review and removed wip/poc labels Jul 21, 2015
- duplicate_semicolon

disabled:
- short_array_syntax

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.

dbu added a commit that referenced this pull request Jul 22, 2015
@dbu dbu merged commit 718955a into master Jul 22, 2015
@lsmith77 lsmith77 removed the review label Jul 22, 2015
@dbu dbu deleted the styleci branch July 22, 2015 15:50
@dbu
Copy link
Member

dbu commented Jul 22, 2015

awesome. this tool looks really useful!

@GrahamCampbell
Copy link

We've got some major improvements coming up in a few days too. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants