public function ReturnArgumentPromise::execute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php \Prophecy\Promise\ReturnArgumentPromise::execute()
Returns nth argument if has one, null otherwise.
Parameters
array $args:
ObjectProphecy $object:
MethodProphecy $method:
Return value
null|mixed
Overrides PromiseInterface::execute
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Promise/ ReturnArgumentPromise.php, line 57
Class
- ReturnArgumentPromise
- Return argument promise.
Namespace
Prophecy\PromiseCode
public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) {
return count($args) > $this->index ? $args[$this->index] : null;
}