1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection\Deprecation;
4:
5: use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase;
6: use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase;
7: use PHPStan\DependencyInjection\ExtensionInterface;
8:
9: /**
10: * This interface allows you to provide custom deprecation information
11: *
12: * To register it in the configuration file use the following tag:
13: *
14: * ```
15: * services:
16: * -
17: * class: App\PHPStan\MyProvider
18: * tags:
19: * - phpstan.enumCaseDeprecationExtension
20: * ```
21: *
22: * @api
23: */
24: #[ExtensionInterface(tag: self::ENUM_CASE_EXTENSION_TAG)]
25: interface EnumCaseDeprecationExtension
26: {
27:
28: public const ENUM_CASE_EXTENSION_TAG = 'phpstan.enumCaseDeprecationExtension';
29:
30: public function getEnumCaseDeprecation(ReflectionEnumUnitCase|ReflectionEnumBackedCase $reflection): ?Deprecation;
31:
32: }
33: