Changed phpcsfixer2 default options#471
Merged
Landerstraeten merged 1 commit intophpro:masterfrom Feb 26, 2018
vyshkant:phpcsfixer2_defaults
Merged
Changed phpcsfixer2 default options#471Landerstraeten merged 1 commit intophpro:masterfrom vyshkant:phpcsfixer2_defaults
Landerstraeten merged 1 commit intophpro:masterfrom
vyshkant:phpcsfixer2_defaults
Conversation
veewee
reviewed
Feb 25, 2018
src/Task/PhpCsFixerV2.php
Outdated
| $arguments->add('--dry-run'); | ||
| $arguments->addOptionalArgument('--allow-risky=%s', $config['allow_risky'] ? 'yes' : 'no'); | ||
|
|
||
| if (null !== $config['allow_risky']) { |
Contributor
There was a problem hiding this comment.
We try to avoid these if statements inside the tasks. Can you move this nullable argument to a new $arguments->add* method?
Contributor
Author
There was a problem hiding this comment.
We try to avoid these if statements inside the tasks. Can you move this nullable argument to a new $arguments->add* method?
@veewee Done!
| $this->getValues()->shouldBe(['--argument=file1.txt,file2.txt']); | ||
| } | ||
|
|
||
| function it_should_be_able_to_add_boolean_nullable_argument() |
Contributor
There was a problem hiding this comment.
I would make three separate tests. Now you need to take the previous result into account.
Contributor
Author
There was a problem hiding this comment.
@Landerstraeten sure! Don't go anywhere, I'll fix it right now :)
Existed non-null default values of "allow_risky" and "using_cache" options were overriding the values from .php_cs config. Closes #469
Landerstraeten
approved these changes
Feb 26, 2018
veewee
approved these changes
Feb 26, 2018
Contributor
|
@vyshkant thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existed non-null default values of "allow_risky" and "using_cache" options were overriding the values from .php_cs config.
The current behavior is that if these options are not specified, the values will be taken from the .php_cs config.