Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 138-149 (lines=12) @@
135
     *
136
     * @throws UnknownTopicException if the topic is unknown
137
     */
138
    public function completeSubscription($topicName, $requestId = 1, $subscriptionId = 1)
139
    {
140
        if (!isset($this->subscriptions[$topicName])) {
141
            throw new UnknownTopicException($topicName);
142
        }
143
144
        /* @var $futureResult Deferred */
145
        $futureResult = $this->subscriptions[$topicName];
146
        $result = new SubscribedMessage($requestId, $subscriptionId);
147
148
        $futureResult->resolve($result);
149
    }
150
151
    public function hasSubscription($topicName)
152
    {
@@ 193-203 (lines=11) @@
190
     *
191
     * @throws UnknownTopicException if the topic is unknown
192
     */
193
    public function confirmPublication($topicName, $requestId = 1, $publicationId = 1)
194
    {
195
        if (!isset($this->publications[$topicName])) {
196
            throw new UnknownTopicException($topicName);
197
        }
198
199
        $futureResult = $this->publications[$topicName];
200
        $result = new PublishedMessage($requestId, $publicationId);
201
202
        $futureResult->resolve($result);
203
    }
204
205
    /**
206
     * @param string $topicName