Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Adding .php_cs file as proposed by enebe-nb in #20 discussion #33

Merged
merged 13 commits into from
Oct 1, 2015

Conversation

svpernova09
Copy link
Member

Please discuss any changes here (if we need any before this is merged)

Phergie (http://phergie.org)

@link http://github.com/phergie/phergie-irc-bot-react for the canonical source repository
@copyright Copyright (c) 2008-2015 Phergie Development Team (http://phergie.org)
Copy link
Member

Choose a reason for hiding this comment

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

Should the ending year be dynamic?

…e at start of doc block, and unable to verify header_comment is working.
@svpernova09
Copy link
Member Author

Not sure header_comment is working. I ran it a few times and it never seemed to change anything. Also unable to find any docs. Left Disabled for now

@enebe-nb
Copy link
Contributor

enebe-nb commented Sep 4, 2015

I left the header_comment commented because it is a sugestion. The command php-cs-fixer fix --dry-run --diff will display the diffs without change any file, that will help to debug.

Now that i'm checking this, it only uses normal comment blocks to avoid conflict with doc blocks, but this way annotations won't work. Probably it won't help (although, the year is working).

@enebe-nb
Copy link
Contributor

enebe-nb commented Sep 4, 2015

related to this: PHP-CS-Fixer/PHP-CS-Fixer#1297

@svpernova09
Copy link
Member Author

Removed header. Once we finalize the Code Standards from #20 I'll update the .php_cs as needed and commit the changes files.

@svpernova09
Copy link
Member Author

@enebe-nb Having some issues with this command on travis:

output=$(php php-cs-fixer.phar fix -v --dry-run); if [[ $output ]]; then while read -r line; do echo -e "$line"; done <<< "$output"; false; fi;

There's always output even if there are no changes. We need to grep for "begin diff" or something similar when there is something to fix.

I poked at it a couple times, couldn't get what would work locally to work with Travis. Possible option is not use this via travis if it's going to be a pain.

…more than 2 lines, exit with non 0 status code."

This reverts commit 6b03986.
@enebe-nb
Copy link
Contributor

enebe-nb commented Oct 1, 2015

this command comes from my testing with that older version, it seem the exit code from cs-fixer changed many times. Probably using only php php-cs-fixer.phar fix -v --dry-run will work fine.

I'll test it correctly.

@enebe-nb
Copy link
Contributor

enebe-nb commented Oct 1, 2015

Using the command directly works, but it gets a "Undefined Class" error on hhvm

@svpernova09
Copy link
Member Author

Yeah I see, I'm not terribly worried about HHVM right now since we're still waiting for another issue with it to be resolved.

Looks good, thanks for the work on this!

svpernova09 added a commit that referenced this pull request Oct 1, 2015
Adding .php_cs file as proposed by enebe-nb in #20 discussion
@svpernova09 svpernova09 merged commit 3651ce9 into master Oct 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants