src/PubSub/AbstractConsumer.php
public function valid()
    {
        $isValid = $this->isFlagSet(self::STATUS_VALID);
        $subscriptionFlags = self::STATUS_SUBSCRIBED | self::STATUS_PSUBSCRIBED;
        $hasSubscriptions = ($this->statusFlags & $subscriptionFlags) > 0;

        return $isValid && $hasSubscriptions;
    }
public function valid()
    {
        $isValid = $this->isFlagSet(self::STATUS_VALID);
        $subscriptionFlags = self::STATUS_SUBSCRIBED | self::STATUS_PSUBSCRIBED;
        $hasSubscriptions = ($this->statusFlags & $subscriptionFlags) > 0;

        return $isValid && $hasSubscriptions;
    }
public function valid ( ) { $ isValid = $ this -> isFlagSet ( self :: STATUS_VALID ) ; $ subscriptionFlags = self :: STATUS_SUBSCRIBED | self :: STATUS_PSUBSCRIBED ; $ hasSubscriptions = ( $ this -> statusFlags & $ subscriptionFlags ) > 0 ; return $ isValid && $ hasSubscriptions ; }
Checks if the the consumer is still in a valid state to continue.

@return bool
Checks if the the consumer is still in a valid state to continue .