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