Code Duplication    Length = 5-5 lines in 2 locations

src/Phinx/Db/Adapter/SqlServerAdapter.php 1 location

@@ 81-85 (lines=5) @@
78
79
            // support arbitrary \PDO::SQLSRV_ATTR_* driver options and pass them to PDO
80
            // http://php.net/manual/en/ref.pdo-sqlsrv.php#pdo-sqlsrv.constants
81
            foreach ($options as $key => $option) {
82
                if (strpos($key, 'sqlsrv_attr_') === 0) {
83
                    $driverOptions[constant('\PDO::' . strtoupper($key))] = $option;
84
                }
85
            }
86
87
            try {
88
                $db = new \PDO($dsn, $options['user'], $options['pass'], $driverOptions);

src/Phinx/Db/Adapter/MysqlAdapter.php 1 location

@@ 109-113 (lines=5) @@
106
107
            // support arbitrary \PDO::MYSQL_ATTR_* driver options and pass them to PDO
108
            // http://php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants
109
            foreach ($options as $key => $option) {
110
                if (strpos($key, 'mysql_attr_') === 0) {
111
                    $driverOptions[constant('\PDO::' . strtoupper($key))] = $option;
112
                }
113
            }
114
115
            try {
116
                $db = new \PDO($dsn, $options['user'], $options['pass'], $driverOptions);