Code Duplication    Length = 15-15 lines in 2 locations

src/SSH/Driver/Sftp.php 1 location

@@ 328-342 (lines=15) @@
325
     *
326
     * @param string $prefix
327
     */
328
    private function removeResource($prefix)
329
    {
330
        if (!isset($this->resources[$prefix]))
331
        {
332
            return;
333
        }
334
335
        unset($this->resources[$prefix]);
336
        $this->resourcesCounter--;
337
338
        if ($this->resourcesCounter === 0)
339
        {
340
            $this->pause();
341
        }
342
    }
343
}
344

src/SSH/Driver/Shell.php 1 location

@@ 374-388 (lines=15) @@
371
     *
372
     * @param string $prefix
373
     */
374
    private function removeResource($prefix)
375
    {
376
        if (!isset($this->resources[$prefix]))
377
        {
378
            return;
379
        }
380
381
        unset($this->resources[$prefix]);
382
        $this->resourcesCounter--;
383
384
        if ($this->resourcesCounter === 0)
385
        {
386
            $this->pause();
387
        }
388
    }
389
}
390