1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 18:48:03 +01:00
psalm/docs/running_psalm/issues/InvalidEnumMethod.md

16 lines
274 B
Markdown
Raw Normal View History

# InvalidEnumMethod
Enums may not define most of the magic methods like `__get`, `__toString`, etc.
```php
<?php
enum Status: string {
case Open = 'open';
case Closed = 'closed';
public function __toString(): string {
return "SomeStatus";
}
}
```