Code Duplication    Length = 5-5 lines in 2 locations

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

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

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

@@ 117-121 (lines=5) @@
114
115
            // support arbitrary \PDO::MYSQL_ATTR_* driver options and pass them to PDO
116
            // http://php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants
117
            foreach ($options as $key => $option) {
118
                if (strpos($key, 'mysql_attr_') === 0) {
119
                    $driverOptions[constant('\PDO::' . strtoupper($key))] = $option;
120
                }
121
            }
122
123
            try {
124
                $db = new \PDO($dsn, $options['user'], $options['pass'], $driverOptions);