function Assert::isInstanceOf
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/Framework/Assert.php \PHPUnit\Framework\Assert::isInstanceOf()
@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert ExpectedType $value
Parameters
mixed $value:
string|object $class:
string $message:
Throws
12 calls to Assert::isInstanceOf()
- ExtendsFactory::create in vendor/
phpdocumentor/ reflection-docblock/ src/ DocBlock/ Tags/ Factory/ ExtendsFactory.php - ImplementsFactory::create in vendor/
phpdocumentor/ reflection-docblock/ src/ DocBlock/ Tags/ Factory/ ImplementsFactory.php - MethodFactory::create in vendor/
phpdocumentor/ reflection-docblock/ src/ DocBlock/ Tags/ Factory/ MethodFactory.php - PropertyFactory::create in vendor/
phpdocumentor/ reflection-docblock/ src/ DocBlock/ Tags/ Factory/ PropertyFactory.php - PropertyReadFactory::create in vendor/
phpdocumentor/ reflection-docblock/ src/ DocBlock/ Tags/ Factory/ PropertyReadFactory.php
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 411
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function isInstanceOf($value, $class, $message = '') {
if (!$value instanceof $class) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of %2$s. Got: %s', static::typeToString($value), $class));
}
}