public function ReturnPromise::execute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php \Prophecy\Promise\ReturnPromise::execute()
Returns saved values one by one until last one, then continuously returns last value.
Parameters
array $args:
ObjectProphecy $object:
MethodProphecy $method:
Return value
mixed
Overrides PromiseInterface::execute
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Promise/ ReturnPromise.php, line 45
Class
- ReturnPromise
- Return promise.
Namespace
Prophecy\PromiseCode
public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) {
$value = array_shift($this->returnValues);
if (!count($this->returnValues)) {
$this->returnValues[] = $value;
}
return $value;
}