Code Duplication    Length = 5-5 lines in 2 locations

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

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

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);