mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
19a1005bc3
Fixes vimeo/psalm#8889 Additionally this fixes case-sensitivity of MethodSignatureMustOmitReturnType issue Fixes vimeo/psalm#8888
16 lines
274 B
Markdown
16 lines
274 B
Markdown
# 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";
|
|
}
|
|
}
|
|
```
|