private function setupStateHandlerRegistration(SubscriptionGroup $subscriptionGroup)
    {
        /** @var StateHandlerRegistration $stateHandlerRegistration */
        foreach ($this->stateHandlerRegistrations as $stateHandlerRegistration) {
            if ($stateHandlerRegistration->handlesStateFor($subscriptionGroup)) {
                $this->stateHandlerMap->attach($subscriptionGroup, $stateHandlerRegistration);
                return;
            }
        }
        $this->stateHandlerMap->attach($subscriptionGroup, null);
    }
private function setupStateHandlerRegistration(SubscriptionGroup $subscriptionGroup)
    {
        /** @var StateHandlerRegistration $stateHandlerRegistration */
        foreach ($this->stateHandlerRegistrations as $stateHandlerRegistration) {
            if ($stateHandlerRegistration->handlesStateFor($subscriptionGroup)) {
                $this->stateHandlerMap->attach($subscriptionGroup, $stateHandlerRegistration);
                return;
            }
        }
        $this->stateHandlerMap->attach($subscriptionGroup, null);
    }
private function setupStateHandlerRegistration ( SubscriptionGroup $ subscriptionGroup ) { /** @var StateHandlerRegistration $stateHandlerRegistration */ foreach ( $ this -> stateHandlerRegistrations as $ stateHandlerRegistration ) { if ( $ stateHandlerRegistration -> handlesStateFor ( $ subscriptionGroup ) ) { $ this -> stateHandlerMap -> attach ( $ subscriptionGroup , $ stateHandlerRegistration ) ; return ; } } $ this -> stateHandlerMap -> attach ( $ subscriptionGroup , null ) ; }
Called when we need to setup a registration
If there is a registration that works - then we set the handler
Otherwise, we set it to null

@param SubscriptionGroup $subscriptionGroup
Called when we need to setup a registration If there is a registration that works - then we set the handler Otherwise we set it to null