Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef7e059

Browse files
committed
add return types to driver wrapper
1 parent 2fa2d4f commit ef7e059

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

.github/patch-types.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
case false !== strpos($file = realpath($file), '/vendor/'):
2626
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
2727
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
28-
case false !== strpos($file, '/src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php'):
2928
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadFileName.php'):
3029
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadParent.php'):
3130
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/ParseError.php'):

src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Doctrine\DBAL\Connection;
1515
use Doctrine\DBAL\Driver;
1616
use Doctrine\DBAL\Platforms\AbstractPlatform;
17+
use Doctrine\DBAL\Schema\AbstractSchemaManager;
1718

1819
class DriverWrapper implements Driver
1920
{
@@ -25,26 +26,17 @@ public function __construct(Driver $driver)
2526
$this->driver = $driver;
2627
}
2728

28-
/**
29-
* @return Driver\Connection
30-
*/
31-
public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
29+
public function connect(array $params, $username = null, $password = null, array $driverOptions = []): Driver\Connection
3230
{
3331
return $this->driver->connect($params, $username, $password, $driverOptions);
3432
}
3533

36-
/**
37-
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
38-
*/
39-
public function getDatabasePlatform()
34+
public function getDatabasePlatform(): AbstractPlatform
4035
{
4136
return $this->driver->getDatabasePlatform();
4237
}
4338

44-
/**
45-
* @return \Doctrine\DBAL\Schema\AbstractSchemaManager
46-
*/
47-
public function getSchemaManager(Connection $conn, AbstractPlatform $platform)
39+
public function getSchemaManager(Connection $conn, AbstractPlatform $platform): AbstractSchemaManager
4840
{
4941
return $this->driver->getSchemaManager($conn, $platform);
5042
}

0 commit comments

Comments
 (0)