diff --git a/analyzer-baseline.toml b/analyzer-baseline.toml index 0ab2d502..6264b00f 100644 --- a/analyzer-baseline.toml +++ b/analyzer-baseline.toml @@ -156,18 +156,6 @@ code = "imprecise-type" message = "Type `array` in return type of `getConnectionParameters` is imprecise, equivalent to `array`." count = 1 -[[issues]] -file = "src/Adapter/Driver/AbstractConnection.php" -code = "incompatible-return-type" -message = 'Return type `null|resource` of `PhpDb\Adapter\Driver\AbstractConnection::getresource()` is incompatible with parent return type `resource` of `PhpDb\Adapter\Driver\ConnectionInterface::getresource()`' -count = 1 - -[[issues]] -file = "src/Adapter/Driver/AbstractConnection.php" -code = "incompatible-return-type" -message = 'Return type `null|resource` of `PhpDb\Adapter\Driver\Pdo\AbstractPdoConnection::getresource()` is incompatible with parent return type `resource` of `PhpDb\Adapter\Driver\ConnectionInterface::getresource()`' -count = 1 - [[issues]] file = "src/Adapter/Driver/AbstractConnection.php" code = "missing-api-or-internal" @@ -363,19 +351,19 @@ count = 1 [[issues]] file = "src/Adapter/Driver/Pdo/AbstractPdo.php" code = "non-existent-method" -message = "Method `getlastgeneratedvalue` does not exist on type `PDO`." +message = "Method `getLastGeneratedValue` does not exist on type `PDO`." count = 1 [[issues]] file = "src/Adapter/Driver/Pdo/AbstractPdo.php" code = "non-existent-method" -message = "Method `getresource` does not exist on type `PDO`." +message = "Method `getResource` does not exist on type `PDO`." count = 1 [[issues]] file = "src/Adapter/Driver/Pdo/AbstractPdo.php" code = "non-existent-method" -message = "Method `isconnected` does not exist on type `PDO`." +message = "Method `isConnected` does not exist on type `PDO`." count = 1 [[issues]] @@ -426,12 +414,6 @@ code = "imprecise-type" message = "Type `array` in parameter `$connectionParameters` is imprecise, equivalent to `array`." count = 1 -[[issues]] -file = "src/Adapter/Driver/Pdo/AbstractPdoConnection.php" -code = "incompatible-property-type" -message = 'Property `PhpDb\Adapter\Driver\Pdo\AbstractPdoConnection::$resource` has an incompatible type declaration from docblock.' -count = 1 - [[issues]] file = "src/Adapter/Driver/Pdo/AbstractPdoConnection.php" code = "missing-api-or-internal" @@ -2895,25 +2877,25 @@ count = 1 [[issues]] file = "src/Sql/Platform/AbstractPlatform.php" code = "non-existent-method" -message = 'Method `getsqlstring` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' +message = 'Method `getSqlString` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' count = 1 [[issues]] file = "src/Sql/Platform/AbstractPlatform.php" code = "non-existent-method" -message = 'Method `getsqlstring` does not exist on type `PhpDb\Sql\PreparableSqlInterface`.' +message = 'Method `getSqlString` does not exist on type `PhpDb\Sql\PreparableSqlInterface`.' count = 1 [[issues]] file = "src/Sql/Platform/AbstractPlatform.php" code = "non-existent-method" -message = 'Method `preparestatement` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' +message = 'Method `prepareStatement` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' count = 1 [[issues]] file = "src/Sql/Platform/AbstractPlatform.php" code = "non-existent-method" -message = 'Method `preparestatement` does not exist on type `PhpDb\Sql\SqlInterface`.' +message = 'Method `prepareStatement` does not exist on type `PhpDb\Sql\SqlInterface`.' count = 1 [[issues]] @@ -2943,25 +2925,25 @@ count = 1 [[issues]] file = "src/Sql/Platform/Platform.php" code = "non-existent-method" -message = 'Method `getsqlstring` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' +message = 'Method `getSqlString` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' count = 1 [[issues]] file = "src/Sql/Platform/Platform.php" code = "non-existent-method" -message = 'Method `getsqlstring` does not exist on type `PhpDb\Sql\PreparableSqlInterface`.' +message = 'Method `getSqlString` does not exist on type `PhpDb\Sql\PreparableSqlInterface`.' count = 1 [[issues]] file = "src/Sql/Platform/Platform.php" code = "non-existent-method" -message = 'Method `preparestatement` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' +message = 'Method `prepareStatement` does not exist on type `PhpDb\Sql\Platform\PlatformDecoratorInterface`.' count = 1 [[issues]] file = "src/Sql/Platform/Platform.php" code = "non-existent-method" -message = 'Method `preparestatement` does not exist on type `PhpDb\Sql\SqlInterface`.' +message = 'Method `prepareStatement` does not exist on type `PhpDb\Sql\SqlInterface`.' count = 1 [[issues]] diff --git a/src/Adapter/Driver/AbstractConnection.php b/src/Adapter/Driver/AbstractConnection.php index c76498a8..ac50195f 100644 --- a/src/Adapter/Driver/AbstractConnection.php +++ b/src/Adapter/Driver/AbstractConnection.php @@ -21,11 +21,7 @@ abstract class AbstractConnection implements ConnectionInterface, ProfilerAwareI protected ?ProfilerInterface $profiler = null; - /** - * Extending classes must be covariant - * - * @var mixed - */ + /** Extending classes must be covariant. */ protected $resource; #[Override] diff --git a/src/Adapter/Driver/ConnectionInterface.php b/src/Adapter/Driver/ConnectionInterface.php index 77ca4380..51511428 100644 --- a/src/Adapter/Driver/ConnectionInterface.php +++ b/src/Adapter/Driver/ConnectionInterface.php @@ -30,7 +30,7 @@ public function getLastGeneratedValue(?string $name = null): string|int|false|nu /** * Get resource * - * @return resource + * @return resource|object|null */ public function getResource();