Code Duplication    Length = 3-3 lines in 2 locations

lib/Alcaeus/MongoDbAdapter/ExceptionConverter.php 2 locations

@@ 51-53 (lines=3) @@
48
                $class = 'MongoException';
49
        }
50
51
        if (strpos($e->getMessage(), 'No suitable servers found') !== false) {
52
            return new \MongoConnectionException($e->getMessage(), $e->getCode(), $e);
53
        }
54
55
        return new $class($e->getMessage(), $e->getCode(), $e);
56
    }
@@ 69-71 (lines=3) @@
66
67
    public static function isNoServerAvailable(Exception\Exception $e)
68
    {
69
        if (strpos($e->getMessage(), 'No suitable servers found') !== false) {
70
            throw new \MongoConnectionException($e->getMessage(), $e->getCode(), $e);
71
        }
72
    }
73
}
74