From c77dd80bd774fb7f547ac1d932b0c2a776132e44 Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Mon, 20 Jan 2020 10:24:18 +0100 Subject: [PATCH] Fix phpstan error --- lib/Doctrine/DBAL/Query/QueryBuilder.php | 2 +- phpstan.neon.dist | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 00eba6b5531..f20e466d98a 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -1298,8 +1298,8 @@ private function getSQLForJoins(string $fromAlias, array &$knownAliases) : strin $sql = ''; if (isset($this->sqlParts['join'][$fromAlias])) { + /** @var Join $join */ foreach ($this->sqlParts['join'][$fromAlias] as $join) { - /** @var Join $join */ if (array_key_exists($join->alias, $knownAliases)) { throw NonUniqueAlias::new($join->alias, array_keys($knownAliases)); } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e387eb25652..246f6ae4ede 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -16,9 +16,6 @@ parameters: # https://bugs.php.net/bug.php?id=78126 - '~^Call to an undefined method PDO::sqliteCreateFunction\(\)\.\z~' - # https://github.com/phpstan/phpstan/issues/2857 - - '~^Parameter #2 \$registeredAliases of static method Doctrine\\DBAL\\Query\\Exception\\NonUniqueAlias::new\(\) expects array, array given\.\z~' - # legacy remnants from doctrine/common - '~^Class Doctrine\\Common\\(Collections\\Collection|Persistence\\Proxy) not found\.\z~' - '~^.+ on an unknown class Doctrine\\Common\\(Collections\\Collection|Persistence\\Proxy)\.\z~'