function Assert::methodExists
@psalm-pure @psalm-param class-string|object $classOrObject
Parameters
string|object $classOrObject:
mixed $method:
string $message:
Throws
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 1639
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function methodExists($classOrObject, $method, $message = '') {
if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected the method %s to exist.', static::valueToString($method)));
}
}