Skip to content

Commit

Permalink
[automated] Re-Generate Nodes/Rectors Documentation (#5705)
Browse files Browse the repository at this point in the history
Co-authored-by: TomasVotruba <924196+TomasVotruba@users.noreply.github.com>
  • Loading branch information
TomasVotruba and TomasVotruba committed Mar 10, 2024
1 parent 3d02e3e commit 569b919
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 363 Rules Overview
# 364 Rules Overview

<br>

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

- [Transform](#transform) (24)

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

- [Visibility](#visibility) (3)

Expand Down Expand Up @@ -6647,6 +6647,32 @@ Change return type based on strict returns type operations

<br>

### ChildDoctrineRepositoryClassTypeRector

Add return type to classes that extend `Doctrine\ORM\EntityRepository`

- class: [`Rector\TypeDeclaration\Rector\Class_\ChildDoctrineRepositoryClassTypeRector`](../rules/TypeDeclaration/Rector/Class_/ChildDoctrineRepositoryClassTypeRector.php)

```diff
use Doctrine\ORM\EntityRepository;

/**
* @extends EntityRepository<SomeType>
*/
final class SomeRepository extends EntityRepository
{
- public function getActiveItem()
+ public function getActiveItem(): ?SomeType
{
return $this->findOneBy([
'something'
]);
}
}
```

<br>

### DeclareStrictTypesRector

Add declare(strict_types=1) if missing
Expand Down

0 comments on commit 569b919

Please sign in to comment.