lib/Promise.php
public function reject(Throwable $reason)
    {
        if (self::PENDING !== $this->state) {
            throw new PromiseAlreadyResolvedException('This promise is already resolved, and you\'re not allowed to resolve a promise more than once');
        }
        $this->state = self::REJECTED;
        $this->value = $reason;
        foreach ($this->subscribers as $subscriber) {
            $this->invokeCallback($subscriber[0], $subscriber[2]);
        }
    }
public function reject(Throwable $reason)
    {
        if (self::PENDING !== $this->state) {
            throw new PromiseAlreadyResolvedException('This promise is already resolved, and you\'re not allowed to resolve a promise more than once');
        }
        $this->state = self::REJECTED;
        $this->value = $reason;
        foreach ($this->subscribers as $subscriber) {
            $this->invokeCallback($subscriber[0], $subscriber[2]);
        }
    }
public function reject ( Throwable $ reason ) { if ( self :: PENDING !== $ this -> state ) { throw new PromiseAlreadyResolvedException ( 'This promise is already resolved, and you\'re not allowed to resolve a promise more than once' ) ; } $ this -> state = self :: REJECTED ; $ this -> value = $ reason ; foreach ( $ this -> subscribers as $ subscriber ) { $ this -> invokeCallback ( $ subscriber [ 0 ] , $ subscriber [ 2 ] ) ; } }
Marks this promise as rejected, and set it's rejection reason.
Marks this promise as rejected and set it s rejection reason .