mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 11:33:33 +01:00
[NodeTypeResolver] improve README
This commit is contained in:
parent
68109ace87
commit
acb27015fa
@ -17,7 +17,7 @@ Anonymous classes are skipped.
|
||||
|
||||
## How it helps you?
|
||||
|
||||
You can get `class`
|
||||
### 1. You can get `class`
|
||||
|
||||
```php
|
||||
$class = (string) $node->getAttribute(Attribute::CLASS_NAME);
|
||||
@ -38,7 +38,7 @@ if ($fqnName->toString() === 'Symfony\Component\Console\Command') {
|
||||
}
|
||||
```
|
||||
|
||||
or `type` attribute:
|
||||
### 2. Or `type` attribute:
|
||||
|
||||
```php
|
||||
/** @var string $type */
|
||||
@ -49,4 +49,4 @@ if ($type === 'Nette\Application\UI\Form') {
|
||||
}
|
||||
```
|
||||
|
||||
...in any Rector you create.
|
||||
...in any Rector you create.
|
||||
|
Loading…
x
Reference in New Issue
Block a user