ReturnArgumentPromise
in package
implements
PromiseInterface
Return argument promise.
Tags
Interfaces, Classes, Traits and Enums
- PromiseInterface
- Promise interface.
Table of Contents
- $index : int
- __construct() : mixed
- Initializes callback promise.
- execute() : null|mixed
- Returns nth argument if has one, null otherwise.
Properties
$index
private
int
$index
Methods
__construct()
Initializes callback promise.
public
__construct([int $index = 0 ]) : mixed
Parameters
- $index : int = 0
-
The zero-indexed number of the argument to return
Tags
Return values
mixed —execute()
Returns nth argument if has one, null otherwise.
public
execute(array<string|int, mixed> $args, ObjectProphecy $object, MethodProphecy $method) : null|mixed
Parameters
- $args : array<string|int, mixed>
- $object : ObjectProphecy
- $method : MethodProphecy