php-parser/test/code/prettyPrinter/stmt/enum.test
2021-07-03 15:09:11 +02:00

39 lines
394 B
Plaintext

Enum
-----
<?php
enum A implements B
{
case X;
case Y;
public function foo() {}
}
enum B: int {
case X = 1;
case Y = 2;
}
enum C: string implements D {
case Z = 'A';
}
-----
!!php7
enum A implements B
{
case X;
case Y;
public function foo()
{
}
}
enum B : int
{
case X = 1;
case Y = 2;
}
enum C : string implements D
{
case Z = 'A';
}