Skip to content

Commit

Permalink
Change incorrect DBAL return types
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Apr 19, 2021
1 parent 51ffcb4 commit 9061d68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
9 changes: 5 additions & 4 deletions lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Doctrine\Common\Collections\Expr\Comparison;
use Doctrine\Common\Util\ClassUtils;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver\ResultStatement as DriverStatement;
use Doctrine\DBAL\LockMode;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Statement;
Expand Down Expand Up @@ -920,7 +921,7 @@ public function getManyToManyCollection(array $assoc, $sourceEntity, $offset = n
* Loads an array of entities from a given DBAL statement.
*
* @param mixed[] $assoc
* @param Statement $stmt
* @param DriverStatement $stmt
*
* @return mixed[]
*/
Expand All @@ -941,7 +942,7 @@ private function loadArrayFromStatement($assoc, $stmt)
* Hydrates a collection from a given DBAL statement.
*
* @param mixed[] $assoc
* @param Statement $stmt
* @param DriverStatement $stmt
* @param PersistentCollection $coll
*
* @return mixed[]
Expand Down Expand Up @@ -975,7 +976,7 @@ public function loadManyToManyCollection(array $assoc, $sourceEntity, Persistent
/**
* @psalm-param array<string, mixed> $assoc
*
* @return \Doctrine\DBAL\Driver\Statement
* @return DriverStatement
*
* @throws MappingException
*/
Expand Down Expand Up @@ -1770,7 +1771,7 @@ public function loadOneToManyCollection(array $assoc, $sourceEntity, PersistentC
* @param int|null $limit
* @psalm-param array<string, mixed> $assoc
*
* @return Statement
* @return DriverStatement
*/
private function getOneToManyStatement(array $assoc, $sourceEntity, $offset = null, $limit = null)
{
Expand Down
20 changes: 0 additions & 20 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1150,31 +1150,11 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php

-
message: "#^Method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\BasicEntityPersister\\:\\:getManyToManyStatement\\(\\) should return Doctrine\\\\DBAL\\\\Driver\\\\Statement but returns Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement&Doctrine\\\\DBAL\\\\Result\\.$#"
count: 1
path: lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php

-
message: "#^Method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\BasicEntityPersister\\:\\:getOneToManyStatement\\(\\) should return Doctrine\\\\DBAL\\\\Statement but returns Doctrine\\\\DBAL\\\\Driver\\\\ResultStatement&Doctrine\\\\DBAL\\\\Result\\.$#"
count: 1
path: lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php

-
message: "#^Parameter \\#1 \\$em of method Doctrine\\\\ORM\\\\Id\\\\AbstractIdGenerator\\:\\:generate\\(\\) expects Doctrine\\\\ORM\\\\EntityManager, Doctrine\\\\ORM\\\\EntityManagerInterface given\\.$#"
count: 1
path: lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php

-
message: "#^Parameter \\#2 \\$stmt of method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\BasicEntityPersister\\:\\:loadArrayFromStatement\\(\\) expects Doctrine\\\\DBAL\\\\Statement, Doctrine\\\\DBAL\\\\Driver\\\\Statement given\\.$#"
count: 1
path: lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php

-
message: "#^Parameter \\#2 \\$stmt of method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\BasicEntityPersister\\:\\:loadCollectionFromStatement\\(\\) expects Doctrine\\\\DBAL\\\\Statement, Doctrine\\\\DBAL\\\\Driver\\\\Statement given\\.$#"
count: 1
path: lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php

-
message: "#^Parameter \\#3 \\$hints of method Doctrine\\\\ORM\\\\Internal\\\\Hydration\\\\AbstractHydrator\\:\\:hydrateAll\\(\\) expects array\\<string, string\\>, array\\<string, Doctrine\\\\ORM\\\\PersistentCollection\\|true\\> given\\.$#"
count: 1
Expand Down

0 comments on commit 9061d68

Please sign in to comment.