php-parser/test/code/prettyPrinter/stmt/enum.test

39 lines
394 B
Plaintext
Raw Normal View History

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';
}