Case can only be used in enums¶
Description¶
case is a keyword which is reserved for enumerations enum. It cannot be used in other structures, such as traits, interfaces or classes.
Example¶
<?php
class X {
case A = 1;
}
?>
Solutions¶
Make the class an enumeration.
Remove the case from the class.