src/PromiseWithSD.php
public function always(callable $onFulfilledOrRejected)
    {
        return $this->then(function ($value) use ($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected($this->sharedData))->then(function () use ($value) {
                return $value;
            });
        }, function ($reason) use ($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected($this->sharedData))->then(function () use ($reason) {
                return new RejectedPromiseWithSD($reason, $this->sharedData);
            });
        });
    }
public function always(callable $onFulfilledOrRejected)
    {
        return $this->then(function ($value) use ($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected($this->sharedData))->then(function () use ($value) {
                return $value;
            });
        }, function ($reason) use ($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected($this->sharedData))->then(function () use ($reason) {
                return new RejectedPromiseWithSD($reason, $this->sharedData);
            });
        });
    }
public function always ( callable $ onFulfilledOrRejected ) { return $ this -> then ( function ( $ value ) use ( $ onFulfilledOrRejected ) { return resolve ( $ onFulfilledOrRejected ( $ this -> sharedData ) ) -> then ( function ( ) use ( $ value ) { return $ value ; } ) ; } , function ( $ reason ) use ( $ onFulfilledOrRejected ) { return resolve ( $ onFulfilledOrRejected ( $ this -> sharedData ) ) -> then ( function ( ) use ( $ reason ) { return new RejectedPromiseWithSD ( $ reason , $ this -> sharedData ) ; } ) ; } ) ; }
Always callable after resolving or rejecting
@param callable $onFulfilledOrRejected
@return ExtendedPromiseInterface
Always callable after resolving or rejecting