Code Duplication    Length = 12-12 lines in 2 locations

src/Tidal/WampWatch/SubscriptionMonitor.php 1 location

@@ 84-95 (lines=12) @@
81
    /**
82
     * Initializes the subscription to the meta-events.
83
     */
84
    protected function initSetupCalls()
85
    {
86
        // @var \Tidal\WampWatch\Subscription\Collection
87
        $collection = $this->getMetaSubscriptionCollection();
88
89
        $collection->addSubscription(self::SUBSCRIPTION_CREATE_TOPIC, $this->getSubscriptionHandler('create'));
90
        $collection->addSubscription(self::SUBSCRIPTION_DELETE_TOPIC, $this->getSubscriptionHandler('delete'));
91
        $collection->addSubscription(self::SUBSCRIPTION_SUB_TOPIC, $this->getSubscriptionHandler('subscribe'));
92
        $collection->addSubscription(self::SUBSCRIPTION_UNSUB_TOPIC, $this->getSubscriptionHandler('unsubscribe'));
93
94
        $this->setInitialCall(self::SUBSCRIPTION_LIST_TOPIC, $this->getSubscriptionIdRetrievalCallback());
95
    }
96
97
    protected function retrieveSubscriptionIds()
98
    {

src/Tidal/WampWatch/RegistrationMonitor.php 1 location

@@ 54-65 (lines=12) @@
51
    /**
52
     * Initializes the subscription to the meta-events.
53
     */
54
    protected function initSetupCalls()
55
    {
56
        // @var \Tidal\WampWatch\Subscription\Collection
57
        $collection = $this->getMetaSubscriptionCollection();
58
59
        $collection->addSubscription(self::REGISTRATION_CREATE_TOPIC, $this->getSubscriptionHandler('create'));
60
        $collection->addSubscription(self::REGISTRATION_DELETE_TOPIC, $this->getSubscriptionHandler('delete'));
61
        $collection->addSubscription(self::REGISTRATION_REG_TOPIC, $this->getSubscriptionHandler('register'));
62
        $collection->addSubscription(self::REGISTRATION_UNREG_TOPIC, $this->getSubscriptionHandler('unregister'));
63
64
        $this->setInitialCall(self::REGISTRATION_LIST_TOPIC, $this->getSubscriptionIdRetrievalCallback());
65
    }
66
67
    protected function setList($list)
68
    {