You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Rule/data/providers/reflection.php
+28
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,34 @@ public function test() // error: Unused Reflection\TransitiveHolder::test
68
68
}
69
69
}
70
70
71
+
72
+
abstractclass GetAllConstantsParent {
73
+
publicstaticfunctiongetConstants()
74
+
{
75
+
// this is not yet supported as we are unaware of children in collectors (and thus in ReflectionUsageProvider)
76
+
// it might be solvable by making ClassConstantRef::$constantName nullable
77
+
// - calling getConstants() should mark all constants as used (on all children as the generic class might be just phpdoc based, not string-literal based)
78
+
return (new \ReflectionClass(static::class))->getConstants();
0 commit comments