public static function that($condition, $message = null)
    {
        if ($condition === true) {
            return;
        }
        if (isset($message)) {
            throw new InvalidArgumentException($message);
        }
        $bt = debug_backtrace();
        $call = $bt[0];
        $lines = file($call['file']);
        preg_match('/' . $call['function'] . '\((.+)\)/', $lines[$call['line'] - 1], $matches);
        throw new InvalidArgumentException('Assumption failed: ' . $matches[1]);
    }
public static function that($condition, $message = null)
    {
        if ($condition === true) {
            return;
        }
        if (isset($message)) {
            throw new InvalidArgumentException($message);
        }
        $bt = debug_backtrace();
        $call = $bt[0];
        $lines = file($call['file']);
        preg_match('/' . $call['function'] . '\((.+)\)/', $lines[$call['line'] - 1], $matches);
        throw new InvalidArgumentException('Assumption failed: ' . $matches[1]);
    }
public static function that ( $ condition , $ message = null ) { if ( $ condition === true ) { return ; } if ( isset ( $ message ) ) { throw new InvalidArgumentException ( $ message ) ; } $ bt = debug_backtrace ( ) ; $ call = $ bt [ 0 ] ; $ lines = file ( $ call [ 'file' ] ) ; preg_match ( '/' . $ call [ 'function' ] . '\((.+)\)/' , $ lines [ $ call [ 'line' ] - 1 ] , $ matches ) ; throw new InvalidArgumentException ( 'Assumption failed: ' . $ matches [ 1 ] ) ; }
Precondition function that can be used to add additional constraints to
function parameters.

@param bool $condition
Condition.
@param string $message
Failure message.
@throws InvalidArgumentException If condition is false.
Precondition function that can be used to add additional constraints to function parameters .