Improve phpdoc

parent a8c772d8
...@@ -198,6 +198,9 @@ abstract class AbstractDriverTest extends DbalTestCase ...@@ -198,6 +198,9 @@ abstract class AbstractDriverTest extends DbalTestCase
*/ */
abstract protected function createSchemaManager(Connection $connection) : AbstractSchemaManager; abstract protected function createSchemaManager(Connection $connection) : AbstractSchemaManager;
/**
* @return Connection&MockObject
*/
protected function getConnectionMock() : Connection protected function getConnectionMock() : Connection
{ {
return $this->getMockBuilder(Connection::class) return $this->getMockBuilder(Connection::class)
......
...@@ -13,6 +13,12 @@ use Doctrine\DBAL\Types\Type; ...@@ -13,6 +13,12 @@ use Doctrine\DBAL\Types\Type;
class SqlitePlatformTest extends AbstractPlatformTestCase class SqlitePlatformTest extends AbstractPlatformTestCase
{ {
/** @var SqlitePlatform */
protected $platform;
/**
* @return SqlitePlatform
*/
public function createPlatform() : AbstractPlatform public function createPlatform() : AbstractPlatform
{ {
return new SqlitePlatform(); return new SqlitePlatform();
......
...@@ -10,6 +10,7 @@ use Doctrine\DBAL\Platforms\MySqlPlatform; ...@@ -10,6 +10,7 @@ use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\MySqlSchemaManager; use Doctrine\DBAL\Schema\MySqlSchemaManager;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use function array_map; use function array_map;
...@@ -18,7 +19,7 @@ class MySqlSchemaManagerTest extends TestCase ...@@ -18,7 +19,7 @@ class MySqlSchemaManagerTest extends TestCase
/** @var AbstractSchemaManager */ /** @var AbstractSchemaManager */
private $manager; private $manager;
/** @var Connection */ /** @var Connection&MockObject */
private $conn; private $conn;
protected function setUp() : void protected function setUp() : void
......
...@@ -5,6 +5,7 @@ namespace Doctrine\Tests\DBAL\Sharding\SQLAzure; ...@@ -5,6 +5,7 @@ namespace Doctrine\Tests\DBAL\Sharding\SQLAzure;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Sharding\ShardingException; use Doctrine\DBAL\Sharding\ShardingException;
use Doctrine\DBAL\Sharding\SQLAzure\SQLAzureShardManager; use Doctrine\DBAL\Sharding\SQLAzure\SQLAzureShardManager;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
class SQLAzureShardManagerTest extends TestCase class SQLAzureShardManagerTest extends TestCase
...@@ -81,6 +82,8 @@ class SQLAzureShardManagerTest extends TestCase ...@@ -81,6 +82,8 @@ class SQLAzureShardManagerTest extends TestCase
/** /**
* @param mixed[] $params * @param mixed[] $params
*
* @return Connection&MockObject
*/ */
private function createConnection(array $params) : Connection private function createConnection(array $params) : Connection
{ {
......
...@@ -14,16 +14,17 @@ use Doctrine\DBAL\Statement; ...@@ -14,16 +14,17 @@ use Doctrine\DBAL\Statement;
use Doctrine\Tests\DbalTestCase; use Doctrine\Tests\DbalTestCase;
use Exception; use Exception;
use PDOStatement; use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;
class StatementTest extends DbalTestCase class StatementTest extends DbalTestCase
{ {
/** @var Connection */ /** @var Connection&MockObject */
private $conn; private $conn;
/** @var Configuration */ /** @var Configuration&MockObject */
private $configuration; private $configuration;
/** @var PDOStatement */ /** @var PDOStatement&MockObject */
private $pdoStatement; private $pdoStatement;
protected function setUp() : void protected function setUp() : void
......
...@@ -6,6 +6,7 @@ use Doctrine\DBAL\Connection; ...@@ -6,6 +6,7 @@ use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand; use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand;
use Doctrine\DBAL\Tools\Console\ConsoleRunner; use Doctrine\DBAL\Tools\Console\ConsoleRunner;
use LogicException; use LogicException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use RuntimeException; use RuntimeException;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
...@@ -18,7 +19,7 @@ class RunSqlCommandTest extends TestCase ...@@ -18,7 +19,7 @@ class RunSqlCommandTest extends TestCase
/** @var RunSqlCommand */ /** @var RunSqlCommand */
private $command; private $command;
/** @var Connection */ /** @var Connection&MockObject */
private $connectionMock; private $connectionMock;
protected function setUp() : void protected function setUp() : void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment