mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-19 23:55:32 +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?
|
## How it helps you?
|
||||||
|
|
||||||
You can get `class`
|
### 1. You can get `class`
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$class = (string) $node->getAttribute(Attribute::CLASS_NAME);
|
$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
|
```php
|
||||||
/** @var string $type */
|
/** @var string $type */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user