1 | <?php |
||
23 | class ReturnArgumentPromise implements PromiseInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | private $index; |
||
29 | |||
30 | /** |
||
31 | * Initializes callback promise. |
||
32 | * |
||
33 | * @param int $index The zero-indexed number of the argument to return |
||
34 | * |
||
35 | * @throws \Prophecy\Exception\InvalidArgumentException |
||
36 | */ |
||
37 | public function __construct($index = 0) |
||
47 | |||
48 | /** |
||
49 | * Returns nth argument if has one, null otherwise. |
||
50 | * |
||
51 | * @param array $args |
||
52 | * @param ObjectProphecy $object |
||
53 | * @param MethodProphecy $method |
||
54 | * |
||
55 | * @return null|mixed |
||
56 | */ |
||
57 | public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) |
||
61 | } |
||
62 |