You are here

public function ReturnArgumentPromise::execute in Zircon Profile 8

Same name and namespace in other branches
  1. 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\Promise

Code

public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) {
  return count($args) > $this->index ? $args[$this->index] : null;
}