Improve phpdoc

parent a8c772d8
......@@ -198,6 +198,9 @@ abstract class AbstractDriverTest extends DbalTestCase
*/
abstract protected function createSchemaManager(Connection $connection) : AbstractSchemaManager;
/**
* @return Connection&MockObject
*/
protected function getConnectionMock() : Connection
{
return $this->getMockBuilder(Connection::class)
......
......@@ -13,6 +13,12 @@ use Doctrine\DBAL\Types\Type;
class SqlitePlatformTest extends AbstractPlatformTestCase
{
/** @var SqlitePlatform */
protected $platform;
/**
* @return SqlitePlatform
*/
public function createPlatform() : AbstractPlatform
{
return new SqlitePlatform();
......
......@@ -10,6 +10,7 @@ use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\MySqlSchemaManager;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use function array_map;
......@@ -18,7 +19,7 @@ class MySqlSchemaManagerTest extends TestCase
/** @var AbstractSchemaManager */
private $manager;
/** @var Connection */
/** @var Connection&MockObject */
private $conn;
protected function setUp() : void
......
......@@ -5,6 +5,7 @@ namespace Doctrine\Tests\DBAL\Sharding\SQLAzure;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Sharding\ShardingException;
use Doctrine\DBAL\Sharding\SQLAzure\SQLAzureShardManager;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
class SQLAzureShardManagerTest extends TestCase
......@@ -81,6 +82,8 @@ class SQLAzureShardManagerTest extends TestCase
/**
* @param mixed[] $params
*
* @return Connection&MockObject
*/
private function createConnection(array $params) : Connection
{
......
......@@ -14,16 +14,17 @@ use Doctrine\DBAL\Statement;
use Doctrine\Tests\DbalTestCase;
use Exception;
use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;
class StatementTest extends DbalTestCase
{
/** @var Connection */
/** @var Connection&MockObject */
private $conn;
/** @var Configuration */
/** @var Configuration&MockObject */
private $configuration;
/** @var PDOStatement */
/** @var PDOStatement&MockObject */
private $pdoStatement;
protected function setUp() : void
......
......@@ -6,6 +6,7 @@ use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand;
use Doctrine\DBAL\Tools\Console\ConsoleRunner;
use LogicException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use RuntimeException;
use Symfony\Component\Console\Application;
......@@ -18,7 +19,7 @@ class RunSqlCommandTest extends TestCase
/** @var RunSqlCommand */
private $command;
/** @var Connection */
/** @var Connection&MockObject */
private $connectionMock;
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