mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 18:48:03 +01:00
25 lines
368 B
Markdown
25 lines
368 B
Markdown
# InvalidExtendClass
|
|
|
|
Emitted when attempting to extend a final class, a class annotated with `@final` or a class using @psalm-inheritors and not in the inheritor list
|
|
|
|
```php
|
|
<?php
|
|
|
|
final class A {}
|
|
|
|
class B extends A {}
|
|
|
|
/**
|
|
* @final
|
|
*/
|
|
class DoctrineA {}
|
|
|
|
class DoctrineB extends DoctrineA {}
|
|
|
|
/**
|
|
* @psalm-inheritors A|B
|
|
*/
|
|
class C {}
|
|
|
|
class D extends C {}
|
|
``` |