Code Duplication    Length = 13-13 lines in 2 locations

src/Client/ZeroMqClient.php 1 location

@@ 107-119 (lines=13) @@
104
    /**
105
     * @inheritdoc
106
     */
107
    public function disconnect()
108
    {
109
        if ($this->socket) {
110
            try {
111
                $host = $this->location->getHost();
112
                $port = $this->location->getPort();
113
114
                $this->socket->disconnect("tcp://{$host}:{$port}");
115
            } catch (Exception $exception) {
116
                // TODO: find an elegant way to deal with this
117
            }
118
        }
119
    }
120
121
    public function __destruct()
122
    {

src/Server/ZeroMqServer.php 1 location

@@ 176-188 (lines=13) @@
173
    /**
174
     * @inheritdoc
175
     */
176
    public function disconnect()
177
    {
178
        if ($this->socket) {
179
            try {
180
                $host = $this->location->getHost();
181
                $port = $this->location->getPort();
182
183
                $this->socket->disconnect("tcp://{$host}:{$port}");
184
            } catch (Exception $exception) {
185
                // TODO: find an elegant way to deal with this
186
            }
187
        }
188
    }
189
190
    public function __destruct()
191
    {