@@ 142-153 (lines=12) @@ | ||
139 | * @override |
|
140 | * @inheritDoc |
|
141 | */ |
|
142 | public function always(callable $onFulfilledOrRejected) |
|
143 | { |
|
144 | return $this->then( |
|
145 | null, |
|
146 | null, |
|
147 | function($reason) use($onFulfilledOrRejected) { |
|
148 | return Promise::doResolve($onFulfilledOrRejected())->then(function() use($reason) { |
|
149 | return new static($reason); |
|
150 | }); |
|
151 | } |
|
152 | ); |
|
153 | } |
|
154 | ||
155 | /** |
|
156 | * @override |
@@ 136-146 (lines=11) @@ | ||
133 | * @override |
|
134 | * @inheritDoc |
|
135 | */ |
|
136 | public function always(callable $onFulfilledOrRejected) |
|
137 | { |
|
138 | return $this->then( |
|
139 | null, |
|
140 | function($reason) use($onFulfilledOrRejected) { |
|
141 | return Promise::doResolve($onFulfilledOrRejected())->then(function() use($reason) { |
|
142 | return new static($reason); |
|
143 | }); |
|
144 | } |
|
145 | ); |
|
146 | } |
|
147 | ||
148 | /** |
|
149 | * @override |