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

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