Code Duplication    Length = 11-13 lines in 2 locations

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

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