Skip to content

Commit

Permalink
Upgrade Psalm, fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Oct 10, 2022
1 parent abb0c75 commit d5f928c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"doctrine/data-fixtures": "^1.0",
"phpunit/phpunit": "^9.0",
"php-coveralls/php-coveralls": "^2.0",
"vimeo/psalm": "4.3.1"
"vimeo/psalm": "4.28.0"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions src/Types/GeometryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Brick\Geo\IO\WKBReader;
use Brick\Geo\Proxy\GeometryProxy;
use Brick\Geo\Proxy\ProxyInterface;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Types\Type;

/**
Expand Down Expand Up @@ -57,7 +57,7 @@ public function getName() : string

public function getSQLDeclaration(array $column, AbstractPlatform $platform) : string
{
if ($platform->getName() === 'postgresql') {
if ($platform instanceof PostgreSQLPlatform) {
return 'GEOMETRY';
}

Expand Down Expand Up @@ -106,7 +106,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) : ?st

public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) : string
{
if ($platform->getName() === 'mysql') {
if ($platform instanceof AbstractMySQLPlatform) {
$sqlExpr = sprintf('BINARY %s', $sqlExpr);
}

Expand Down

0 comments on commit d5f928c

Please sign in to comment.