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

Breadcrumb

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

function CallbackPrediction::__construct

Parameters

callable $callback Custom callback:

Throws

\Prophecy\Exception\InvalidArgumentException

File

vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php, line 35

Class

CallbackPrediction
Executes preset callback.

Namespace

Prophecy\Prediction

Code

public function __construct($callback) {
    if (!is_callable($callback)) {
        throw new InvalidArgumentException(sprintf('Callable expected as an argument to CallbackPrediction, but got %s.', gettype($callback)));
    }
    $this->callback = $callback;
}
RSS feed
Powered by Drupal