From 12dd7a7280a5f92268ae975e25e0fa2dec0f28d4 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Thu, 2 Aug 2018 23:24:39 -0700 Subject: [PATCH] Fixed and suppressed issues found by PHPStan on develop --- lib/Doctrine/DBAL/Driver/ResultStatement.php | 10 +++++----- phpstan.neon.dist | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/DBAL/Driver/ResultStatement.php b/lib/Doctrine/DBAL/Driver/ResultStatement.php index 34f40600fbb..71dfbe70f5d 100644 --- a/lib/Doctrine/DBAL/Driver/ResultStatement.php +++ b/lib/Doctrine/DBAL/Driver/ResultStatement.php @@ -28,9 +28,9 @@ public function columnCount(); /** * Sets the fetch mode to use while iterating this statement. * - * @param int $fetchMode Controls how the next row will be returned to the caller. - * The value must be one of the {@link \Doctrine\DBAL\FetchMode} constants. - * @param array $args Optional mode-specific arguments (see {@link self::fetchAll()}). + * @param int $fetchMode Controls how the next row will be returned to the caller. + * The value must be one of the {@link \Doctrine\DBAL\FetchMode} constants. + * @param mixed[] ...$args Optional mode-specific arguments (see {@link self::fetchAll()}). * * @return bool */ @@ -42,7 +42,7 @@ public function setFetchMode($fetchMode, ...$args); * @param int|null $fetchMode Controls how the next row will be returned to the caller. * The value must be one of the {@link \Doctrine\DBAL\FetchMode} constants, * defaulting to {@link \Doctrine\DBAL\FetchMode::MIXED}. - * @param array $args Optional mode-specific arguments (see {@link self::fetchAll()}). + * @param mixed[] ...$args Optional mode-specific arguments (see {@link self::fetchAll()}). * * @return mixed The return value of this method on success depends on the fetch mode. In all cases, FALSE is * returned on failure. @@ -55,7 +55,7 @@ public function fetch($fetchMode = null, ...$args); * @param int|null $fetchMode Controls how the next row will be returned to the caller. * The value must be one of the {@link \Doctrine\DBAL\FetchMode} constants, * defaulting to {@link \Doctrine\DBAL\FetchMode::MIXED}. - * @param array $args Optional mode-specific arguments. Supported modes: + * @param mixed[] ...$args Optional mode-specific arguments. Supported modes: * * {@link \Doctrine\DBAL\FetchMode::COLUMN} * 1. The 0-indexed column to be returned. * * {@link \Doctrine\DBAL\FetchMode::CUSTOM_OBJECT} diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 406cc2a530e..f0cad16f38d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -24,7 +24,7 @@ parameters: - '~^Method Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvConnection::errorCode\(\) should return string\|null but returns false\.\z~' # http://php.net/manual/en/pdo.sqlitecreatefunction.php - - '~^Call to an undefined method Doctrine\\DBAL\\Driver\\PDOConnection::sqliteCreateFunction\(\)\.\z~' + - '~^Call to an undefined method PDO::sqliteCreateFunction\(\)\.\z~' # legacy variadic-like signature - '~^Method Doctrine\\DBAL\\Driver\\Connection::query\(\) invoked with \d+ parameters?, 0 required\.\z~' @@ -44,3 +44,9 @@ parameters: # weird class name, doesn't exist in stubs either - '~unknown class OCI-(Lob|Collection)~' + + # https://github.com/doctrine/dbal/issues/3236 + - '~^Call to an undefined method Doctrine\\DBAL\\Schema\\UniqueConstraint::getLocalColumns\(\)~' + + # https://github.com/doctrine/dbal/issues/3237 + - '~^Call to an undefined method Doctrine\\DBAL\\Driver\\PDOStatement::nextRowset\(\)~'