Skip to content

Commit

Permalink
Merge pull request #3238 from morozov/phpstan-develop
Browse files Browse the repository at this point in the history
Fixed and suppressed issues found by PHPStan on develop
  • Loading branch information
Ocramius authored and morozov committed Aug 7, 2018
2 parents 89fbe15 + 12dd7a7 commit 9f9d347
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/Doctrine/DBAL/Driver/ResultStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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.
Expand All @@ -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}
Expand Down
8 changes: 7 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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~'
Expand All @@ -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\(\)~'

0 comments on commit 9f9d347

Please sign in to comment.