Code Duplication    Length = 5-5 lines in 2 locations

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

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

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

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