mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 18:48:03 +01:00
085e8f6fb2
- `Throwable` can only be implemented when classes extend one of `Exception` or `Error` - `UnitEnum` and `BackedEnum` cannot be implemented by user-defined classes Refs vimeo/psalm#7722
16 lines
277 B
Markdown
16 lines
277 B
Markdown
# InvalidInterfaceImplementation
|
|
|
|
Emitted when trying to implement interface that cannot be implemented (e.g. `Throwable`, `UnitEnum`, `BackedEnum`).
|
|
|
|
```php
|
|
<?php
|
|
|
|
class E implements UnitEnum
|
|
{
|
|
public static function cases(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|
|
```
|