[NodeTypeResolver] improve README

This commit is contained in:
TomasVotruba 2017-09-07 15:56:20 +02:00
parent 68109ace87
commit acb27015fa

View File

@ -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.