| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\DependencyInjection; |
| 4: | |
| 5: | use Attribute; |
| 6: | |
| 7: | /** |
| 8: | * Registers a collector in the DI container on the set rule level. |
| 9: | * |
| 10: | * Works thanks to https://github.com/ondrejmirtes/composer-attribute-collector |
| 11: | * and AutowiredAttributeServicesExtension. |
| 12: | * |
| 13: | * @api |
| 14: | */ |
| 15: | #[Attribute(flags: Attribute::TARGET_CLASS)] |
| 16: | final class RegisteredCollector |
| 17: | { |
| 18: | |
| 19: | /** @api */ |
| 20: | public function __construct(public int $level) |
| 21: | { |
| 22: | } |
| 23: | |
| 24: | } |
| 25: |