1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
psalm/docs/running_psalm/issues/ImplementationRequirementViolation.md
Niclas van Eyk 0261024aa6
Initial proposal for psalm-require-{extends, implements} (#4361)
* initial implementation of psalm-require-extends

* Added @psalm-require-implements

* Added shortcode for ExtensionRequirementViolation

* Docs & cofig entries for @pasalm-require-{implements,extends}

* Added requirement violations to issues.md
2020-10-19 15:08:18 -04:00

23 lines
445 B
Markdown

# ImplementationRequirementViolation
Emitted when a using class of a trait does not implement all interfaces specified using `@psalm-require-implements`.
```php
<?php
interface A { }
interface B { }
/**
* @psalm-require-implements A
* @psalm-require-implements B
*/
trait T { }
class C {
// ImplementationRequirementViolation is emitted, as T requires
// the using class C to implement A and B, which is not the case
use T;
}
```