File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99use function Safe \class_alias ;
1010
1111if (!\class_exists (Rule::class, false ) && !\interface_exists (Rule::class, false )) {
12- /**
13- * @deprecated in v9.2, will be removed in v10.0. Use `Property\Declaration` instead, which is a direct
14- * replacement.
15- */
1612 class_alias (Declaration::class, Rule::class);
13+ // The test is expected to evaluate to false,
14+ // but allows for the deprecation notice to be picked up by IDEs like PHPStorm.
15+ // @phpstan-ignore-next-line booleanAnd.alwaysTrue
16+ if (!\class_exists (Rule::class, false ) && !\interface_exists (Rule::class, false )) {
17+ /**
18+ * @deprecated in v9.2, will be removed in v10.0. Use `Property\Declaration` instead, which is a direct
19+ * replacement.
20+ */
21+ class Rule {}
22+ }
1723}
Original file line number Diff line number Diff line change 77use function Safe \class_alias ;
88
99if (!\class_exists (RuleContainer::class, false ) && !\interface_exists (RuleContainer::class, false )) {
10- /**
11- * @deprecated in v9.2, will be removed in v10.0. Use `DeclarationList` instead, which is a direct replacement.
12- */
1310 class_alias (DeclarationList::class, RuleContainer::class);
11+ // The test is expected to evaluate to false,
12+ // but allows for the deprecation notice to be picked up by IDEs like PHPStorm.
13+ // @phpstan-ignore-next-line booleanAnd.alwaysTrue
14+ if (!\class_exists (RuleContainer::class, false ) && !\interface_exists (RuleContainer::class, false )) {
15+ /**
16+ * @deprecated in v9.2, will be removed in v10.0. Use `DeclarationList` instead, which is a direct replacement.
17+ */
18+ interface RuleContainer {}
19+ }
1420}
You can’t perform that action at this time.
0 commit comments