Closed
Description
Description
Tested against git master, see https://3v4l.org/hColU/rfc#vgit.master - when outputting a reflection class (or the subclass ReflectionEnum
) for enums, the output be improved a bit (below each suggestion is a snippet from the current output)
- the heading with the basic type information should say that it is an enum, rather than a final class, and remove the interface implementations, instead indicating the backing type if any
Class [ <user> final class Suit implements UnitEnum ] {
Class [ <user> final class MyBool implements UnitEnum, BackedEnum ] {
- the static properties entry can be removed, since it will always be empty (https://www.php.net/manual/en/language.enumerations.object-differences.php)
- Static properties [0] {
}
- the "Constants" block should only include the regular class constants, and the cases be indicated separately, and for backed enums include their values
- Constants [5] {
Constant [ public Suit Hearts ] { Object }
Constant [ public Suit Diamonds ] { Object }
Constant [ public Suit Clubs ] { Object }
Constant [ public Suit Spades ] { Object }
Constant [ public Suit OtherHearts ] { Object }
}
- Constants [3] {
Constant [ public MyBool MyFalse ] { Object }
Constant [ public MyBool MyTrue ] { Object }
Constant [ public MyBool OtherTrue ] { Object }
}
If there is support for these improvements, please assign this task to me