function Assert::implementsInterface
@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $interface @psalm-assert class-string<ExpectedType> $value
Parameters
mixed $value:
mixed $interface:
string $message:
Throws
1 call to Assert::implementsInterface()
- StandardTagFactory::registerTagHandler in vendor/
phpdocumentor/ reflection-docblock/ src/ DocBlock/ StandardTagFactory.php - Registers a handler for tags.
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 1578
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function implementsInterface($value, $interface, $message = '') {
if (!\in_array($interface, \class_implements($value))) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected an implementation of %2$s. Got: %s', static::valueToString($value), static::valueToString($interface)));
}
}