function Assert::notInstanceOf
@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
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 434
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function notInstanceOf($value, $class, $message = '') {
if ($value instanceof $class) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance other than %2$s. Got: %s', static::typeToString($value), $class));
}
}