function Assert::isNotA
@psalm-pure @psalm-template UnexpectedType of object @psalm-param class-string<UnexpectedType> $class @psalm-assert !UnexpectedType $value @psalm-assert !class-string<UnexpectedType> $value
Parameters
object|string $value:
string $class:
string $message:
Throws
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 508
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function isNotA($value, $class, $message = '') {
static::string($class, 'Expected class as a string. Got: %s');
if (\is_a($value, $class, \is_string($value))) {
static::reportInvalidArgument(sprintf($message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s', static::valueToString($value), $class));
}
}