Skip to content

Commit

Permalink
[automated] Re-Generate Nodes/Rectors Documentation (#2812)
Browse files Browse the repository at this point in the history
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
  • Loading branch information
TomasVotruba and TomasVotruba committed Aug 21, 2022
1 parent 790ca8c commit 6df313e
Showing 1 changed file with 50 additions and 2 deletions.
52 changes: 50 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 @@
# 410 Rules Overview
# 411 Rules Overview

<br>

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

- [Php74](#php74) (13)

- [Php80](#php80) (18)
- [Php80](#php80) (19)

- [Php81](#php81) (11)

Expand Down Expand Up @@ -6079,6 +6079,54 @@ Change mixed docs type to mixed typed

<br>

### NestedAnnotationToAttributeRector

Changed nested annotations to attributes

:wrench: **configure it!**

- class: [`Rector\Php80\Rector\Property\NestedAnnotationToAttributeRector`](../rules/Php80/Rector/Property/NestedAnnotationToAttributeRector.php)

```php
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Property\NestedAnnotationToAttributeRector;
use Rector\Php80\ValueObject\NestedAnnotationToAttribute;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(
NestedAnnotationToAttributeRector::class,
[[
new NestedAnnotationToAttribute('Doctrine\ORM\Mapping\JoinTable', [
'Doctrine\ORM\Mapping\JoinColumn',
'Doctrine\ORM\Mapping\InverseJoinColumn',
], false),
]]
);
};
```


```diff
use Doctrine\ORM\Mapping as ORM;

class SomeEntity
{
- /**
- * @ORM\JoinTable(name="join_table_name",
- * joinColumns={@ORM\JoinColumn(name="origin_id")},
- * inverseJoinColumns={@ORM\JoinColumn(name="target_id")}
- * )
- */
+ #[ORM\JoinTable(name: 'join_table_name')]
+ #[ORM\JoinColumn(name: 'origin_id')]
+ #[ORM\InverseJoinColumn(name: 'target_id')]
private $collection;
}
```

<br>

### Php8ResourceReturnToObjectRector

Change `is_resource()` to instanceof Object
Expand Down

0 comments on commit 6df313e

Please sign in to comment.