Code Duplication    Length = 9-9 lines in 2 locations

src/RequestExecutor/Metadata/SocketBag.php 2 locations

@@ 142-150 (lines=9) @@
139
    }
140
141
    /** {@inheritdoc} */
142
    public function postponeSocket(SocketInterface $socket)
143
    {
144
        $key = $this->getOperationStorageKey($socket);
145
        if (!isset($this->items[$key])) {
146
            return;
147
        }
148
149
        $this->items[$key]->postpone();
150
    }
151
152
    /** {@inheritdoc} */
153
    public function getSocketMetaData(SocketInterface $socket)
@@ 197-205 (lines=9) @@
194
     * @return OperationMetadata
195
     * @throws \OutOfBoundsException
196
     */
197
    private function requireOperation(SocketInterface $socket)
198
    {
199
        $hash = $this->getOperationStorageKey($socket);
200
        if (!isset($this->items[$hash])) {
201
            throw new \OutOfBoundsException('Trying to perform operation on not added socket.');
202
        }
203
204
        return $this->items[$hash];
205
    }
206
207
    /**
208
     * Return metadata items