Skip to content

Commit 5c40fe4

Browse files
Khartirderrabus
andauthored
Apply suggestions from code review
Co-authored-by: Alexander M. Turek <[email protected]>
1 parent 0a847f9 commit 5c40fe4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Driver/AbstractMySQLDriver.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,15 @@ public function createDatabasePlatformForVersion($version)
3636
{
3737
$mariadb = stripos($version, 'mariadb') !== false;
3838
if ($mariadb) {
39-
if (version_compare($this->getMariaDbMysqlVersionNumber($version), '10.5.2', '>=')) {
39+
$mariaDbVersion = $this->getMariaDbMysqlVersionNumber($version);
40+
if (version_compare($mariaDbVersion, '10.5.2', '>=')) {
4041
return new MariaDb1052Platform();
4142
}
4243

43-
if (version_compare($this->getMariaDbMysqlVersionNumber($version), '10.2.7', '>=')) {
44+
if (version_compare($mariaDbVersion, '10.2.7', '>=')) {
4445
return new MariaDb1027Platform();
4546
}
46-
}
47-
48-
if (! $mariadb) {
47+
} else {
4948
$oracleMysqlVersion = $this->getOracleMysqlVersionNumber($version);
5049
if (version_compare($oracleMysqlVersion, '8', '>=')) {
5150
if (! version_compare($version, '8.0.0', '>=')) {

0 commit comments

Comments
 (0)