Skip to content

Commit

Permalink
Fix copy-paste errors in rule docs (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
Androbin committed Jun 2, 2021
1 parent d519a19 commit d88e3a3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Expand Up @@ -53,7 +53,7 @@ public function __construct(

public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Add extra space before new assign set', [
return new RuleDefinition('Convert manual JSON string to JSON::encode array', [
new CodeSample(
<<<'CODE_SAMPLE'
final class SomeClass
Expand Down
Expand Up @@ -25,7 +25,7 @@ final class DowngradeFlexibleHeredocSyntaxRector extends AbstractRector
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Changes heredoc/nowdoc that contains closing word to safe wrapper name',
'Remove indentation from heredoc/nowdoc',
[
new CodeSample(
<<<'CODE_SAMPLE'
Expand Down
Expand Up @@ -26,7 +26,7 @@ public function __construct(

public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Changes if && to early return', [
return new RuleDefinition('Changes if || to early return', [
new CodeSample(
<<<'CODE_SAMPLE'
class SomeClass
Expand Down
Expand Up @@ -36,7 +36,7 @@ public function __construct(

public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Rename variable to match new ClassType', [
return new RuleDefinition('Rename param to match ClassType', [
new CodeSample(
<<<'CODE_SAMPLE'
final class SomeClass
Expand Down
2 changes: 1 addition & 1 deletion rules/Php52/Rector/Property/VarToPublicPropertyRector.php
Expand Up @@ -17,7 +17,7 @@ final class VarToPublicPropertyRector extends AbstractRector
{
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Remove unused private method', [
return new RuleDefinition('Change property modifier from `var` to `public`', [
new CodeSample(
<<<'CODE_SAMPLE'
final class SomeController
Expand Down
Expand Up @@ -31,7 +31,7 @@ final class ExceptionHandlerTypehintRector extends AbstractRector
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Changes property `@var` annotations from annotation to type.',
'Change typehint from `Exception` to `Throwable`.',
[
new CodeSample(
<<<'CODE_SAMPLE'
Expand Down
2 changes: 1 addition & 1 deletion rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php
Expand Up @@ -35,7 +35,7 @@ public function __construct(
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Complete missing constructor dependency instance by type',
'Convert `token_get_all` to `PhpToken::getAll`',
[
new CodeSample(
<<<'CODE_SAMPLE'
Expand Down
Expand Up @@ -28,7 +28,7 @@ public function __construct(

public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Add return type void to function like without any return', [
return new RuleDefinition('Add return type to function like with return new', [
new CodeSample(
<<<'CODE_SAMPLE'
final class SomeClass
Expand Down

0 comments on commit d88e3a3

Please sign in to comment.