Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Assert.php

function Assert::isCallable

@psalm-pure @psalm-assert callable $value

Parameters

mixed $value:

string $message:

Throws

InvalidArgumentException

1 call to Assert::isCallable()
StandardTagFactory::createTag in vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php
Creates a new tag object with the given name and body or returns null if the tag name was recognized but the body was invalid.

File

vendor/webmozart/assert/src/Assert.php, line 279

Class

Assert
Efficient assertions to validate the input/output of your methods.

Namespace

Webmozart\Assert

Code

public static function isCallable($value, $message = '') {
    if (!\is_callable($value)) {
        static::reportInvalidArgument(\sprintf($message ?: 'Expected a callable. Got: %s', static::typeToString($value)));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal