public function execute(array $args, FunctionProphecy $function)
    {
        $value = array_shift($this->returnValues);

        if (!count($this->returnValues)) {
            $this->returnValues[] = $value;
        }

        return $value;
    }
public function execute(array $args, FunctionProphecy $function)
    {
        $value = array_shift($this->returnValues);

        if (!count($this->returnValues)) {
            $this->returnValues[] = $value;
        }

        return $value;
    }
public function execute ( array $ args , FunctionProphecy $ function ) { $ value = array_shift ( $ this -> returnValues ) ; if ( ! count ( $ this -> returnValues ) ) { $ this -> returnValues [ ] = $ value ; } return $ value ; }
Returns saved values one by one until last one, then continuously returns last value.

@param array          $args
@param FunctionProphecy $function

@return mixed
Returns saved values one by one until last one then continuously returns last value .