mirror of
https://github.com/danog/psalm.git
synced 2024-12-15 10:57:08 +01:00
23 lines
445 B
Markdown
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;
|
||
|
}
|
||
|
```
|