Skip to content

Commit

Permalink
Fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Apr 30, 2024
1 parent 15b741d commit 793f09e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Platforms/MariaDBPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,16 @@ protected function createReservedKeywordsList(): KeywordList
* {@inheritDoc}
*
* @link https://mariadb.com/kb/en/unicode/
* @link https://mariadb.com/kb/en/old-mode/
*/
public function informationSchemaUsesUtf8mb3(Connection $connection): bool

Check warning on line 174 in src/Platforms/MariaDBPlatform.php

View check run for this annotation

Codecov / codecov/patch

src/Platforms/MariaDBPlatform.php#L174

Added line #L174 was not covered by tests
{
if (version_compare($connection->getServerVersion(), '10.6.0') < 0) {
return false;

Check warning on line 177 in src/Platforms/MariaDBPlatform.php

View check run for this annotation

Codecov / codecov/patch

src/Platforms/MariaDBPlatform.php#L176-L177

Added lines #L176 - L177 were not covered by tests
}

return ! $connection->fetchOne('SELECT @old_mode');
$old_mode = (string) $connection->fetchOne('SELECT @old_mode');

Check failure on line 180 in src/Platforms/MariaDBPlatform.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Variable "old_mode" is not in valid camel caps format

Check warning on line 180 in src/Platforms/MariaDBPlatform.php

View check run for this annotation

Codecov / codecov/patch

src/Platforms/MariaDBPlatform.php#L180

Added line #L180 was not covered by tests

return ! str_contains($old_mode, 'UTF8_IS_UTF8MB3');

Check failure on line 182 in src/Platforms/MariaDBPlatform.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Function str_contains() should not be referenced via a fallback global name, but via a use statement.

Check failure on line 182 in src/Platforms/MariaDBPlatform.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Variable "old_mode" is not in valid camel caps format

Check warning on line 182 in src/Platforms/MariaDBPlatform.php

View check run for this annotation

Codecov / codecov/patch

src/Platforms/MariaDBPlatform.php#L182

Added line #L182 was not covered by tests
}
}
2 changes: 1 addition & 1 deletion tests/Platforms/MySQL/ComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function testUtf8AndUtf8mb3Mismatches(bool $useUtf8mb3, string $defaultCh
self::assertNotEmpty($utf8Comparator->compareTables($table6, $table5)->getModifiedColumns());
}

/** @return array{bool,string}[] */
/** @return iterable<array{bool,string}> */
public static function utf8AndUtf8mb3MismatchesProvider(): iterable
{
yield [false, 'utf8'];
Expand Down

0 comments on commit 793f09e

Please sign in to comment.