Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 82-93 (lines=12) @@
79
     *
80
     * @throws UnknownTopicException 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 UnknownTopicException($topicName);
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
    public function hasSubscription($topicName)
96
    {
@@ 129-139 (lines=11) @@
126
     *
127
     * @throws UnknownTopicException if the topic is unknown.
128
     */
129
    public function confirmPublication($topicName, $requestId = 1, $publicationId = 1)
130
    {
131
        if (!isset($this->publications[$topicName])) {
132
            throw new UnknownTopicException($topicName);
133
        }
134
135
        $futureResult = $this->publications[$topicName];
136
        $result = new PublishedMessage($requestId, $publicationId);
137
138
        $futureResult->resolve($result);
139
    }
140
141
    /**
142
     * Register.