Skip to content
Permalink
Browse files

Merge pull request #152 from kubawerlos/fix-readme-whitespaces

Fix README whitespaces
  • Loading branch information...
kubawerlos committed Oct 11, 2019
2 parents 3a4ce00 + d001e04 commit ceebae852fac155484480a91598f272ea9864530
Showing with 32 additions and 32 deletions.
  1. +28 −28 README.md
  2. +4 −4 dev-tools/src/Readme/ReadmeCommand.php
@@ -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 {
@@ -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 {
@@ -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);
@@ -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
@@ -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 {};
```
@@ -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
/**
@@ -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 {
@@ -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');
@@ -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'`
@@ -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 {
@@ -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 */
@@ -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(
@@ -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()
);
}
@@ -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

0 comments on commit ceebae8

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