Code Duplication    Length = 3-3 lines in 2 locations

src/BuilderFactory.php 1 location

@@ 40-42 (lines=3) @@
37
            throw new InvalidArgumentException("Undefined driver");
38
        }
39
40
        if (!in_array($config["driver"], ["sqlsrv", "mysql", "pgsql", "sqlite"])) {
41
            throw new InvalidArgumentException("Unrecognised driver");
42
        }
43
44
        return $config;
45
    }

src/ConnectorFactory.php 1 location

@@ 48-50 (lines=3) @@
45
            throw new InvalidArgumentException("Undefined driver");
46
        }
47
48
        if (!in_array($config["driver"], ["sqlsrv", "mysql", "pgsql", "sqlite"])) {
49
            throw new InvalidArgumentException("Unrecognised driver");
50
        }
51
52
        if (!isset($config["connector"])) {
53
            throw new InvalidArgumentException("Undefined connector");