src/Expectation/Expectation.php
private function invokeCustomMatcher($name)
    {
        $class = self::$customMatchers[$name];
        $args = array_slice(func_get_args(), 1);

        $matcher = call_user_func_array(
            [new \ReflectionClass($class), 'newInstance'],
            $args
        );
        $this->test($matcher);

        return $this;
    }
private function invokeCustomMatcher($name)
    {
        $class = self::$customMatchers[$name];
        $args = array_slice(func_get_args(), 1);

        $matcher = call_user_func_array(
            [new \ReflectionClass($class), 'newInstance'],
            $args
        );
        $this->test($matcher);

        return $this;
    }
private function invokeCustomMatcher ( $ name ) { $ class = self :: $ customMatchers [ $ name ] ; $ args = array_slice ( func_get_args ( ) , 1 ) ; $ matcher = call_user_func_array ( [ new \ ReflectionClass ( $ class ) , 'newInstance' ] , $ args ) ; $ this -> test ( $ matcher ) ; return $ this ; }
Calls a custom matcher. The matcher is expected to implement
pho\Expectation\Matcher\MatcherInterface. A new instance is created,
and its match method is called with a variable number of arguments. If
match returns false, getFailureMessage is passed as the description to
an ExpectationException.

@param   string               $name   The name of the custom matcher
@param   mixed                $arg,.. Arguments to be passed
@returns Expectation          The current expectation
@throws  ExpectationException If the positive or negative match fails
Calls a custom matcher . The matcher is expected to implement pho \ Expectation \ Matcher \ MatcherInterface . A new instance is created and its match method is called with a variable number of arguments . If match returns false getFailureMessage is passed as the description to an ExpectationException .