Unverified Commit ec85e548 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #3002 from carusogabriel/missing-annotations

Use @var instead of @param
parents 4ea3b4dc 3796bd2b
......@@ -30,6 +30,9 @@ class ConnectionTest extends \Doctrine\Tests\DbalTestCase
*/
protected $_conn = null;
/**
* @var string[]
*/
protected $params = array(
'driver' => 'pdo_mysql',
'host' => 'localhost',
......
......@@ -11,6 +11,9 @@ use Doctrine\DBAL\Types\Type;
class DataAccessTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
static private $generated = false;
protected function setUp()
......
......@@ -4,6 +4,9 @@ namespace Doctrine\Tests\DBAL\Functional;
class ModifyLimitQueryTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
private static $tableCreated = false;
protected function setUp()
......
......@@ -13,6 +13,9 @@ use Doctrine\DBAL\Portability\Connection as ConnectionPortability;
*/
class PortabilityTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var Connection
*/
private $portableConnection;
protected function tearDown()
......
......@@ -4,13 +4,21 @@ namespace Doctrine\Tests\DBAL\Functional;
use Doctrine\DBAL\Cache\QueryCacheProfile;
use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\Logging\DebugStack;
/**
* @group DDC-217
*/
class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var int[][]|string[][]
*/
private $expectedResult = array(array('test_int' => 100, 'test_string' => 'foo'), array('test_int' => 200, 'test_string' => 'bar'), array('test_int' => 300, 'test_string' => 'baz'));
/**
* @var DebugStack
*/
private $sqlLogger;
protected function setUp()
......@@ -30,7 +38,7 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
}
$config = $this->_conn->getConfiguration();
$config->setSQLLogger($this->sqlLogger = new \Doctrine\DBAL\Logging\DebugStack);
$config->setSQLLogger($this->sqlLogger = new DebugStack);
$cache = new \Doctrine\Common\Cache\ArrayCache;
$config->setResultCacheImpl($cache);
......
......@@ -9,6 +9,9 @@ use Doctrine\DBAL\Id\TableGenerator;
*/
class TableGeneratorTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var TableGenerator
*/
private $generator;
protected function setUp()
......
......@@ -11,6 +11,9 @@ use PDO;
*/
class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
private $running = false;
protected function setUp()
......
......@@ -6,6 +6,9 @@ use Doctrine\DBAL\Types\Type;
class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var int
*/
static private $typeCounter = 0;
protected function setUp()
......
......@@ -9,6 +9,9 @@ use Doctrine\Tests\DbalTestCase;
*/
class SQLAzurePlatformTest extends DbalTestCase
{
/**
* @var \Doctrine\DBAL\Platforms\SQLAzurePlatform
*/
private $platform;
protected function setUp()
......@@ -26,4 +29,3 @@ class SQLAzurePlatformTest extends DbalTestCase
self::assertEquals(array('CREATE TABLE tbl (id INT NOT NULL) FEDERATED ON (TblId = id)'), $this->platform->getCreateTableSQL($table));
}
}
......@@ -10,6 +10,9 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
*/
class ExpressionBuilderTest extends \Doctrine\Tests\DbalTestCase
{
/**
* @var ExpressionBuilder
*/
protected $expr;
protected function setUp()
......
......@@ -11,6 +11,9 @@ use Doctrine\DBAL\Query\QueryBuilder;
*/
class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
{
/**
* @var \Doctrine\DBAL\Connection
*/
protected $conn;
protected function setUp()
......
......@@ -8,7 +8,14 @@ use Doctrine\DBAL\Sharding\SQLAzure\SQLAzureShardManager;
abstract class AbstractTestCase extends \PHPUnit\Framework\TestCase
{
/**
* @var \Doctrine\DBAL\Connection
*/
protected $conn;
/**
* @var SQLAzureShardManager
*/
protected $sm;
protected function setUp()
......
......@@ -14,6 +14,9 @@ class RunSqlCommandTest extends \PHPUnit\Framework\TestCase
/** @var RunSqlCommand */
private $command;
/**
* @var \Doctrine\DBAL\Connection
*/
private $connectionMock;
protected function setUp()
......
......@@ -2,14 +2,21 @@
namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class ArrayTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var AbstractPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class BooleanTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class DecimalTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,7 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class FloatTest extends \Doctrine\Tests\DbalTestCase
{
protected $_platform, $_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class GuidTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class IntegerTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class ObjectTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class SmallIntTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class StringTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -7,9 +7,15 @@ use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class VarDateTimeTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;
/**
* @var Type
*/
protected $_type;
protected function setUp()
{
......
......@@ -9,6 +9,9 @@ namespace Doctrine\Tests;
*/
class DbalPerformanceTestListener extends \PHPUnit\Framework\BaseTestListener
{
/**
* @var string[][]
*/
private $timings = [];
/**
......
......@@ -4,9 +4,19 @@ namespace Doctrine\Tests\Mocks;
class ConnectionMock extends \Doctrine\DBAL\Connection
{
private $_fetchOneResult;
/**
* @var DatabasePlatformMock
*/
private $_platformMock;
/**
* @var int
*/
private $_lastInsertId = 0;
/**
* @var string[][]
*/
private $_inserts = array();
public function __construct(array $params, $driver, $config = null, $eventManager = null)
......@@ -43,14 +53,6 @@ class ConnectionMock extends \Doctrine\DBAL\Connection
return $this->_lastInsertId;
}
/**
* @override
*/
public function fetchColumn($statement, array $params = array(), $colnum = 0, array $types = array())
{
return $this->_fetchOneResult;
}
/**
* @override
*/
......@@ -62,13 +64,6 @@ class ConnectionMock extends \Doctrine\DBAL\Connection
return $input;
}
/* Mock API */
public function setFetchOneResult($fetchOneResult)
{
$this->_fetchOneResult = $fetchOneResult;
}
public function setLastInsertId($id)
{
$this->_lastInsertId = $id;
......
......@@ -6,8 +6,19 @@ use Doctrine\DBAL\DBALException;
class DatabasePlatformMock extends \Doctrine\DBAL\Platforms\AbstractPlatform
{
/**
* @var string
*/
private $_sequenceNextValSql = "";
/**
* @var bool
*/
private $_prefersIdentityColumns = true;
/**
* @var bool
*/
private $_prefersSequences = false;
/**
......
......@@ -2,11 +2,18 @@
namespace Doctrine\Tests\Mocks;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
class DriverMock implements \Doctrine\DBAL\Driver
{
/**
* @var DatabasePlatformMock
*/
private $_platformMock;
/**
* @var AbstractSchemaManager
*/
private $_schemaManagerMock;
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
......@@ -55,7 +62,7 @@ class DriverMock implements \Doctrine\DBAL\Driver
$this->_platformMock = $platform;
}
public function setSchemaManager(\Doctrine\DBAL\Schema\AbstractSchemaManager $sm)
public function setSchemaManager(AbstractSchemaManager $sm)
{
$this->_schemaManagerMock = $sm;
}
......
......@@ -37,6 +37,9 @@ class TaskMock extends \Doctrine\Common\Cli\Tasks\AbstractTask
*/
static public $instances = array();
/**
* @var int
*/
private $runCounter = 0;
/**
......
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