Code Duplication    Length = 11-13 lines in 2 locations

src/Tidal/WampWatch/Stub/ClientSessionStub.php 2 locations

@@ 76-88 (lines=13) @@
73
     * @param $sessionId
74
     * @throws \RuntimeException if the topic is unknown.
75
     */
76
    public function completeSubscription($topicName, $requestId = 1, $sessionId = 1)
77
    {
78
        if (!isset($this->subscriptions[$topicName])) {
79
            throw new \RuntimeException("No subscription to topic '$topicName' initiated.");
80
        }
81
82
        /* @var $futureResult Deferred */
83
        $futureResult = $this->subscriptions[$topicName];
84
        $result = new SubscribedMessage($requestId, $sessionId);
85
86
        $futureResult->resolve($result);
87
88
    }
89
90
91
    /**
@@ 117-127 (lines=11) @@
114
     * @param int    $publicationId
115
     * @throws \RuntimeException if the topic is unknown.
116
     */
117
    public function confirmPublication($topicName, $requestId = 1, $publicationId = 1)
118
    {
119
        if (!isset($this->publications[$topicName])) {
120
            throw new \RuntimeException("No publication to topic '$topicName' initiated.");
121
        }
122
123
        $futureResult = $this->publications[$topicName];
124
        $result = new PublishedMessage($requestId, $publicationId);
125
126
        $futureResult->resolve($result);
127
    }
128
129
130
    /**