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

CS: In method arguments and method call, there MUST NOT be a space before each comma and there MUST be one space after each comma. #7029

Closed
wants to merge 4 commits into from

Conversation

keradus
Copy link
Contributor

@keradus keradus commented Dec 13, 2014

No description provided.

@@ -472,7 +472,7 @@ public static function escapeValue($values = array())
foreach ($values as $key => $val) {
// Escaping of filter meta characters
$val = str_replace(
array('\\', ',', '+', '"', '<', '>', ';', '#', '=',),
array('\\', ',', '+', '"', '<', '>', ';', '#', '=', ),
Copy link
Member

Choose a reason for hiding this comment

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

These automated fixes seem wrong: the ending comma should be removed instead, as it's the last item in an in-line defined array: should I report this on the fixer issue tracker?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PHP CS Fixer is build in extra atomic way. One fixer should not do multiple things.
What you are talking about is different CS issue - not done by the fixer we use in this PR.

What are you talking about is done by different fixer - single_array_no_trailing_comma. So no, do not report issue because this isn't one. I just don't want to run all fixers at once to not produce extra large diff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in that one place

Copy link
Member

Choose a reason for hiding this comment

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

Fair enuff on the explanation :-)

@Ocramius Ocramius added this to the 2.4.0 milestone Dec 16, 2014
@Ocramius Ocramius self-assigned this Dec 16, 2014
@Ocramius
Copy link
Member

@keradus merged, thx!

develop: 5e2ac79

@Ocramius Ocramius closed this Dec 16, 2014
@keradus keradus deleted the method_argument_space branch December 16, 2014 13:22
@keradus
Copy link
Contributor Author

keradus commented Dec 16, 2014

@Ocramius
BTW, is ZF2 will keep using PHP CS Fixer or not?
Just wondering about sending PR with next and next fixes and creating a set of fixers for ZF2 in 2.0-dev line (just like the one that is already for Symfony)

@Ocramius
Copy link
Member

@keradus I'd actually defer this to the discussion in #6182

While we had our decent amount of pain with the fixer previously, I must say that the new AST(ish)-based parsing/reassembling fixed the problems it had before, so I'm quite satisfied with what is happening here.

I'd still suggest you to comment there and raise your voice: since you have been this helpful and supportive here I don't see why we should move away from the tool if you keep being like this :-)

@keradus
Copy link
Contributor Author

keradus commented Dec 16, 2014

Tool is great and I want to better integrate it with ZF2. Just don't want to waste time if you choose to stop using it.
Very well, I wrote there.

weierophinney pushed a commit to zendframework/zend-authentication that referenced this pull request May 14, 2015
weierophinney pushed a commit to zendframework/zend-barcode that referenced this pull request May 14, 2015
gianarb pushed a commit to zendframework/zend-modulemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-config that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-test that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-crypt that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-xmlrpc that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-progressbar that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-console that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-ldap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-file that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
weierophinney pushed a commit to zendframework/zend-permissions-acl that referenced this pull request May 15, 2015
weierophinney pushed a commit to zendframework/zend-i18n-resources that referenced this pull request May 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants