Code Duplication    Length = 11-13 lines in 2 locations

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

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