Skip to content

Commit

Permalink
Remove UnSpreadOperatorRector as not clear value and spread used on p…
Browse files Browse the repository at this point in the history
…urpose (#4949)
  • Loading branch information
TomasVotruba committed Sep 9, 2023
1 parent 048effd commit 672df31
Show file tree
Hide file tree
Showing 18 changed files with 3 additions and 628 deletions.
48 changes: 3 additions & 45 deletions build/target-repository/docs/rector_rules_overview.md
@@ -1,4 +1,4 @@
# 355 Rules Overview
# 353 Rules Overview

<br>

Expand All @@ -8,7 +8,7 @@

- [CodeQuality](#codequality) (71)

- [CodingStyle](#codingstyle) (30)
- [CodingStyle](#codingstyle) (29)

- [DeadCode](#deadcode) (41)

Expand Down Expand Up @@ -48,7 +48,7 @@

- [Removing](#removing) (5)

- [Renaming](#renaming) (10)
- [Renaming](#renaming) (9)

- [Strict](#strict) (5)

Expand Down Expand Up @@ -2047,30 +2047,6 @@ Assign outcome of ternary condition to variable, where applicable

<br>

### UnSpreadOperatorRector

Remove spread operator

- class: [`Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector`](../rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php)

```diff
class SomeClass
{
- public function run(...$array)
+ public function run(array $array)
{
}

public function execute(array $data)
{
- $this->run(...$data);
+ $this->run($data);
}
}
```

<br>

### UseClassKeywordForClassNameResolutionRector

Use `class` keyword for class name resolution in string instead of hardcoded string reference
Expand Down Expand Up @@ -5456,24 +5432,6 @@ Remove specific traits from code

## Renaming

### PseudoNamespaceToNamespaceRector

Replaces defined Pseudo_Namespaces by Namespace\Ones.

:wrench: **configure it!**

- class: [`Rector\Renaming\Rector\FileWithoutNamespace\PseudoNamespaceToNamespaceRector`](../rules/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector.php)

```diff
-/** @var Some_Chicken $someService */
-$someService = new Some_Chicken;
+/** @var Some\Chicken $someService */
+$someService = new Some\Chicken;
$someClassToKeep = new Some_Class_To_Keep;
```

<br>

### RenameAnnotationRector

Turns defined annotations above properties and methods to their new values.
Expand Down
2 changes: 0 additions & 2 deletions config/set/coding-style.php
Expand Up @@ -11,7 +11,6 @@
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector;
use Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
Expand Down Expand Up @@ -46,7 +45,6 @@
$rectorConfig->rules([
SeparateMultiUseImportsRector::class,
PostIncDecToPreIncDecRector::class,
UnSpreadOperatorRector::class,
NewlineAfterStatementRector::class,
RemoveFinalFromConstRector::class,
NullableCompareToNullRector::class,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 672df31

Please sign in to comment.