Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 27 additions & 61 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 361 Rules Overview
# 360 Rules Overview

<br>

## Categories

- [Arguments](#arguments) (6)

- [CodeQuality](#codequality) (71)
- [CodeQuality](#codequality) (70)

- [CodingStyle](#codingstyle) (30)

Expand Down Expand Up @@ -46,15 +46,15 @@

- [Privatization](#privatization) (4)

- [Removing](#removing) (6)
- [Removing](#removing) (5)

- [Renaming](#renaming) (10)

- [Strict](#strict) (5)

- [Transform](#transform) (22)

- [TypeDeclaration](#typedeclaration) (43)
- [TypeDeclaration](#typedeclaration) (44)

- [Visibility](#visibility) (3)

Expand Down Expand Up @@ -1072,29 +1072,6 @@ Replace the Double not operator (!!) by type-casting to boolean

<br>

### ReturnTypeFromStrictScalarReturnExprRector

Change return type based on strict scalar returns - string, int, float or bool

- class: [`Rector\CodeQuality\Rector\ClassMethod\ReturnTypeFromStrictScalarReturnExprRector`](../rules/CodeQuality/Rector/ClassMethod/ReturnTypeFromStrictScalarReturnExprRector.php)

```diff
final class SomeClass
{
- public function run($value)
+ public function run($value): string
{
if ($value) {
return 'yes';
}

return 'no';
}
}
```

<br>

### SetTypeToCastRector

Changes `settype()` to (type) where possible
Expand Down Expand Up @@ -5841,40 +5818,6 @@ return static function (RectorConfig $rectorConfig): void {

<br>

### RemoveParentRector

Removes extends class by name

:wrench: **configure it!**

- class: [`Rector\Removing\Rector\Class_\RemoveParentRector`](../rules/Removing/Rector/Class_/RemoveParentRector.php)

```php
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Removing\Rector\Class_\RemoveParentRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(RemoveParentRector::class, [
'SomeParentClass',
]);
};
```


```diff
-final class SomeClass extends SomeParentClass
+final class SomeClass
{
}
```

<br>

### RemoveTraitUseRector

Remove specific traits from code
Expand Down Expand Up @@ -8064,6 +8007,29 @@ Add return type based on strict parameter type

<br>

### ReturnTypeFromStrictScalarReturnExprRector

Change return type based on strict scalar returns - string, int, float or bool

- class: [`Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictScalarReturnExprRector`](../rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictScalarReturnExprRector.php)

```diff
final class SomeClass
{
- public function run($value)
+ public function run($value): string
{
if ($value) {
return 'yes';
}

return 'no';
}
}
```

<br>

### ReturnTypeFromStrictTernaryRector

Add method return type based on strict ternary values
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

95 changes: 0 additions & 95 deletions rules/Removing/Rector/Class_/RemoveParentRector.php

This file was deleted.