Skip to content

Commit

Permalink
Fix README whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Oct 11, 2019
1 parent 3a4ce00 commit d001e04
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
56 changes: 28 additions & 28 deletions README.md
Expand Up @@ -46,8 +46,8 @@ Comment must be surrounded by spaces.
```

#### DataProviderNameFixer
Name of data provider that is used only once must match name of test.
*Risky: when relying on name of data provider function.*
Name of data provider that is used only once must match name of test.
*Risky: when relying on name of data provider function.*
```diff
<?php
class FooTest extends TestCase {
Expand All @@ -62,8 +62,8 @@ Name of data provider that is used only once must match name of test.
```

#### DataProviderReturnTypeFixer
Return type of data provider must be `iterable`.
*Risky: when relying on signature of data provider.*
Return type of data provider must be `iterable`.
*Risky: when relying on signature of data provider.*
```diff
<?php
class FooTest extends TestCase {
Expand All @@ -77,9 +77,9 @@ Return type of data provider must be `iterable`.
```

#### ImplodeCallFixer
Function `implode` must be called with 2 arguments in the documented order.
DEPRECATED: use `implode_call` instead.
*Risky: when the function `implode` is overridden.*
Function `implode` must be called with 2 arguments in the documented order.
DEPRECATED: use `implode_call` instead.
*Risky: when the function `implode` is overridden.*
```diff
<?php
-implode($foo, "") . implode($bar);
Expand Down Expand Up @@ -170,8 +170,8 @@ When in global namespace there must be no leading slash for class.
```

#### NoNullableBooleanTypeFixer
There must be no nullable boolean type.
*Risky: when the null is used.*
There must be no nullable boolean type.
*Risky: when the null is used.*
```diff
<?php
-function foo(?bool $bar) : ?bool
Expand All @@ -195,21 +195,21 @@ There must be no comment generated by PhpStorm.
```

#### NoReferenceInFunctionDefinitionFixer
There must be no reference in function definition.
*Risky: when rely on reference.*
There must be no reference in function definition.
*Risky: when rely on reference.*
```diff
<?php
-function foo(&$x) {}
+function foo($x) {}
```

#### NoTwoConsecutiveEmptyLinesFixer
There must be no two consecutive empty lines in code.
DEPRECATED: use `no_extra_blank_lines` instead.
There must be no two consecutive empty lines in code.
DEPRECATED: use `no_extra_blank_lines` instead.
```diff
<?php
namespace Foo;

-
class Bar {};
```
Expand All @@ -223,8 +223,8 @@ There should not be inline concatenation of strings.
```

#### NoUselessClassCommentFixer
There must be no comment like: "Class FooBar".
DEPRECATED: use `NoUselessCommentFixer` instead.
There must be no comment like: "Class FooBar".
DEPRECATED: use `NoUselessCommentFixer` instead.
```diff
<?php
/**
Expand All @@ -251,8 +251,8 @@ There must be no comment like "Class Foo".
```

#### NoUselessConstructorCommentFixer
There must be no comment like: "Foo constructor".
DEPRECATED: use `NoUselessCommentFixer` instead.
There must be no comment like: "Foo constructor".
DEPRECATED: use `NoUselessCommentFixer` instead.
```diff
<?php
class Foo {
Expand All @@ -277,8 +277,8 @@ There must be no comment generated by the Doctrine ORM.
```

#### NoUselessSprintfFixer
Function `sprintf` without parameters should not be used.
*Risky: when the function `sprintf` is overridden.*
Function `sprintf` without parameters should not be used.
*Risky: when the function `sprintf` is overridden.*
```diff
<?php
-$foo = sprintf('Foo');
Expand All @@ -297,8 +297,8 @@ Configuration options:
```

#### OperatorLinebreakFixer
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.*
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'`
Expand All @@ -313,8 +313,8 @@ Configuration options:
```

#### PhpUnitNoUselessReturnFixer
PHPUnit's functions `fail`, `markTestIncomplete` and `markTestSkipped` should not be followed directly by return.
*Risky: when PHPUnit's native methods are overridden.*
PHPUnit's functions `fail`, `markTestIncomplete` and `markTestSkipped` should not be followed directly by return.
*Risky: when PHPUnit's native methods are overridden.*
```diff
<?php
class FooTest extends TestCase {
Expand Down Expand Up @@ -413,8 +413,8 @@ In PHPDoc inside class or interface element `self` should be preferred over the
```

#### PhpdocVarAnnotationCorrectOrderFixer
`@var` and `@type` annotations must have type and name in the correct order.
DEPRECATED: use `phpdoc_var_annotation_correct_order` instead.
`@var` and `@type` annotations must have type and name in the correct order.
DEPRECATED: use `phpdoc_var_annotation_correct_order` instead.
```diff
<?php
-/** @var $foo int */
Expand All @@ -423,8 +423,8 @@ DEPRECATED: use `phpdoc_var_annotation_correct_order` instead.
```

#### SingleLineThrowFixer
`throw` must be single line.
*To be deprecated after [this](https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4452) is merged and released.*
`throw` must be single line.
*To be deprecated after [this](https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4452) is merged and released.*
```diff
<?php
-throw new Exception(
Expand Down
8 changes: 4 additions & 4 deletions dev-tools/src/Readme/ReadmeCommand.php
Expand Up @@ -167,21 +167,21 @@ private function fixers(): string

if ($fixer instanceof DeprecatingFixerInterface) {
$output .= \sprintf(
" \n*To be deprecated after [this](https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/%d) is merged and released.*",
"\n *To be deprecated after [this](https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/%d) is merged and released.*",
$fixer->getPullRequestId()
);
}

if ($fixer instanceof DeprecatedFixerInterface) {
$output .= \sprintf(
" \nDEPRECATED: use `%s` instead.",
"\n DEPRECATED: use `%s` instead.",
\implode('`, `', $fixer->getSuccessorsNames())
);
}

if ($fixer->isRisky()) {
$output .= \sprintf(
" \n*Risky: %s.*",
"\n *Risky: %s.*",
$fixer->getDefinition()->getRiskyDescription()
);
}
Expand Down Expand Up @@ -244,7 +244,7 @@ private function diff(string $from, string $to): string
/** @var int $start */
$start = \strpos($diff, "\n", 10);

return \trim(\substr($diff, $start), "\n");
return \preg_replace('/\h+(?=\R)/', '', \substr($diff, $start + 1, -1));
}

private function contributing(): string
Expand Down

0 comments on commit d001e04

Please sign in to comment.