Skip to content

Commit

Permalink
Remove redundant phpstan param from DriverManager::getConnection()
Browse files Browse the repository at this point in the history
This effectively prevented phpstan from inferring type of `T` template.

> Unable to resolve the template type T in call to method static method Doctrine\DBAL\DriverManager::getConnection()
  • Loading branch information
simPod committed Nov 6, 2020
1 parent 3622d6d commit 7322944
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/Doctrine/DBAL/DriverManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ private function __construct()
*
* @throws Exception
*
* @phpstan-param mixed[] $params
* @psalm-return ($params is array{wrapperClass:mixed} ? T : Connection)
* @template T of Connection
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/DBAL/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ConnectionTest extends DbalTestCase
/** @var Connection */
private $connection;

/** @var string[] */
/** @var array{wrapperClass?: class-string<Connection>} */
protected $params = [
'driver' => 'pdo_mysql',
'host' => 'localhost',
Expand Down

0 comments on commit 7322944

Please sign in to comment.