Skip to content
Permalink
Browse files

Merge pull request #137 from kubawerlos/fix-defaults-in-readme

Fix defaults in README.md
  • Loading branch information...
kubawerlos committed Sep 23, 2019
2 parents 6527ed6 + 606a419 commit 97adfabf1bbc0809103ac933564d743543b96190
Showing with 4 additions and 3 deletions.
  1. +2 −2 README.md
  2. +2 −1 src-dev/Readme/ReadmeCommand.php
@@ -288,7 +288,7 @@ Function `sprintf` without parameters should not be used.
#### NullableParamStyleFixer
Nullable parameters must be written in the consistent style.
Configuration options:
- `style` (`'with_question_mark'`, `'without_question_mark'`): whether nullable parameter type should be prefixed or not with question mark; defaults to `with_question_mark`
- `style` (`'with_question_mark'`, `'without_question_mark'`): whether nullable parameter type should be prefixed or not with question mark; defaults to `'with_question_mark'`
```diff
<?php
-function foo(int $x = null) {
@@ -301,7 +301,7 @@ Operators must always be at the beginning or at the end of the line.
*To be deprecated after [this](https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4021) is merged and released.*
Configuration options:
- `only_booleans` (`bool`): whether to limit operators to only boolean ones; defaults to `false`
- `position` (`'beginning'`, `'end'`): whether to place operators at the beginning or at the end of the line; defaults to `beginning`
- `position` (`'beginning'`, `'end'`): whether to place operators at the beginning or at the end of the line; defaults to `'beginning'`
```diff
<?php
function foo() {
@@ -4,6 +4,7 @@
namespace PhpCsFixerCustomFixersDev\Readme;
use PhpCsFixer\Console\Command\HelpCommand;
use PhpCsFixer\Fixer\ConfigurationDefinitionFixerInterface;
use PhpCsFixer\Fixer\DeprecatedFixerInterface;
use PhpCsFixer\StdinFileInfo;
@@ -199,7 +200,7 @@ private function fixers(): string
$option->getName(),
\implode('`, `', $allowed),
$option->getDescription(),
\is_bool($option->getDefault()) ? ($option->getDefault() ? 'true' : 'false') : $option->getDefault()
HelpCommand::toString($option->getDefault())
);
}
}

0 comments on commit 97adfab

Please sign in to comment.
You can’t perform that action at this time.