Skip to content

Commit

Permalink
Remove workaround for PHPStan
Browse files Browse the repository at this point in the history
Since PHPStan 1.6.0, conditional return types are supported, and 1.6.1
fixes a bug that affected one such return type we use on
DriverManager::getConnection().
  • Loading branch information
greg0ire committed Apr 26, 2022
1 parent d299d58 commit edea17d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"require-dev": {
"doctrine/coding-standard": "9.0.0",
"jetbrains/phpstorm-stubs": "2022.1",
"phpstan/phpstan": "1.6.0",
"phpstan/phpstan": "1.6.1",
"phpstan/phpstan-strict-rules": "^1.2",
"phpunit/phpunit": "9.5.20",
"psalm/plugin-phpunit": "0.16.1",
Expand Down
6 changes: 2 additions & 4 deletions src/DriverManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ private function __construct()
* <b>driverClass</b>:
* The driver class to use.
*
* @param array<string,mixed> $params
* @param Configuration|null $config The configuration to use.
* @param EventManager|null $eventManager The event manager to use.
* @param Configuration|null $config The configuration to use.
* @param EventManager|null $eventManager The event manager to use.
* @psalm-param array{
* charset?: string,
* dbname?: string,
Expand All @@ -172,7 +171,6 @@ private function __construct()
* user?: string,
* wrapperClass?: class-string<T>,
* } $params
* @phpstan-param array<string,mixed> $params
*
* @psalm-return ($params is array{wrapperClass:mixed} ? T : Connection)
*
Expand Down

0 comments on commit edea17d

Please sign in to comment.