lib/Benchmark/BaselineManager.php
public function addBaselineCallable($name, $callable)
    {
        if (isset($this->callables[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Baseline callable "%s" has already been registered.',
                $name
            ));
        }

        if (!is_callable($callable)) {
            throw new \InvalidArgumentException(sprintf(
                'Given baseline "%s" callable "%s" is not callable.',
                $name, is_string($callable) ? $callable : gettype($callable)
            ));
        }

        $this->callables[$name] = $callable;
    }
public function addBaselineCallable($name, $callable)
    {
        if (isset($this->callables[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Baseline callable "%s" has already been registered.',
                $name
            ));
        }

        if (!is_callable($callable)) {
            throw new \InvalidArgumentException(sprintf(
                'Given baseline "%s" callable "%s" is not callable.',
                $name, is_string($callable) ? $callable : gettype($callable)
            ));
        }

        $this->callables[$name] = $callable;
    }
public function addBaselineCallable ( $ name , $ callable ) { if ( isset ( $ this -> callables [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Baseline callable "%s" has already been registered.' , $ name ) ) ; } if ( ! is_callable ( $ callable ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Given baseline "%s" callable "%s" is not callable.' , $ name , is_string ( $ callable ) ? $ callable : gettype ( $ callable ) ) ) ; } $ this -> callables [ $ name ] = $ callable ; }
Add a baseline callable. The callable can be any
callable accepted by call_user_func.

Throws an invalid argument exception if the name has
already been registered.

@param string $name
@param mixed $callable

@throws \InvalidArgumentException
Add a baseline callable . The callable can be any callable accepted by call_user_func .