public function call(Arguments $values)
    {
        ++$this->called;
        if ($this->times > -1 && $this->called > $this->times) {
            throw new ExpectationException("Function {$this->name}({$this->arguments}) should be called {$this->times} times but called at least {$this->called} times");
        }

        $matchers = $this->arguments->getValues();

        if ($matchers === null) {
            return $this->return;
        }

        foreach ($matchers as $index => $matcher) {
            if ($matcher instanceof MatcherAbstract) {
                $value = $values->getValues()[$index];
                $matcher->match($value);
                $values->setValue($index, $value);
            }
        }

        return $this->return;
    }
public function call(Arguments $values)
    {
        ++$this->called;
        if ($this->times > -1 && $this->called > $this->times) {
            throw new ExpectationException("Function {$this->name}({$this->arguments}) should be called {$this->times} times but called at least {$this->called} times");
        }

        $matchers = $this->arguments->getValues();

        if ($matchers === null) {
            return $this->return;
        }

        foreach ($matchers as $index => $matcher) {
            if ($matcher instanceof MatcherAbstract) {
                $value = $values->getValues()[$index];
                $matcher->match($value);
                $values->setValue($index, $value);
            }
        }

        return $this->return;
    }
public function call ( Arguments $ values ) { ++ $ this -> called ; if ( $ this -> times > - 1 && $ this -> called > $ this -> times ) { throw new ExpectationException ( "Function {$this->name}({$this->arguments}) should be called {$this->times} times but called at least {$this->called} times" ) ; } $ matchers = $ this -> arguments -> getValues ( ) ; if ( $ matchers === null ) { return $ this -> return ; } foreach ( $ matchers as $ index => $ matcher ) { if ( $ matcher instanceof MatcherAbstract ) { $ value = $ values -> getValues ( ) [ $ index ] ; $ matcher -> match ( $ value ) ; $ values -> setValue ( $ index , $ value ) ; } } return $ this -> return ; }
Call this function and get its return value.

@return mixed
Call this function and get its return value .