Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use @var instead of @param #3002

Merged
merged 4 commits into from
Feb 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class ConnectionTest extends \Doctrine\Tests\DbalTestCase
*/
protected $_conn = null;

/**
* @var string[]
*/
protected $params = array(
'driver' => 'pdo_mysql',
'host' => 'localhost',
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

class DataAccessTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
static private $generated = false;

protected function setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Functional/ModifyLimitQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

class ModifyLimitQueryTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
private static $tableCreated = false;

protected function setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
*/
class PortabilityTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var Connection
*/
private $portableConnection;

protected function tearDown()
Expand Down
10 changes: 9 additions & 1 deletion tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@

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()
Expand All @@ -30,7 +38,7 @@ protected function setUp()
}

$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);
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Functional/TableGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
class TableGeneratorTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var TableGenerator
*/
private $generator;

protected function setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
private $running = false;

protected function setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Functional/TypeConversionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var int
*/
static private $typeCounter = 0;

protected function setUp()
Expand Down
4 changes: 3 additions & 1 deletion tests/Doctrine/Tests/DBAL/Platforms/SQLAzurePlatformTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
class SQLAzurePlatformTest extends DbalTestCase
{
/**
* @var \Doctrine\DBAL\Platforms\SQLAzurePlatform
*/
private $platform;

protected function setUp()
Expand All @@ -26,4 +29,3 @@ public function testCreateFederatedOnTable()
self::assertEquals(array('CREATE TABLE tbl (id INT NOT NULL) FEDERATED ON (TblId = id)'), $this->platform->getCreateTableSQL($table));
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
*/
class ExpressionBuilderTest extends \Doctrine\Tests\DbalTestCase
{
/**
* @var ExpressionBuilder
*/
protected $expr;

protected function setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
{
/**
* @var \Doctrine\DBAL\Connection
*/
protected $conn;

protected function setUp()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@

abstract class AbstractTestCase extends \PHPUnit\Framework\TestCase
{
/**
* @var \Doctrine\DBAL\Connection
*/
protected $conn;

/**
* @var SQLAzureShardManager
*/
protected $sm;

protected function setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DBAL/Tools/Console/RunSqlCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class RunSqlCommandTest extends \PHPUnit\Framework\TestCase
/** @var RunSqlCommand */
private $command;

/**
* @var \Doctrine\DBAL\Connection
*/
private $connectionMock;

protected function setUp()
Expand Down
13 changes: 10 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/BooleanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class BooleanTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/DecimalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class DecimalTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
10 changes: 9 additions & 1 deletion tests/Doctrine/Tests/DBAL/Types/FloatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@

class FloatTest extends \Doctrine\Tests\DbalTestCase
{
protected $_platform, $_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/GuidTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class GuidTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/IntegerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class IntegerTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/ObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class ObjectTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/SmallIntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class SmallIntTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/StringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class StringTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/DBAL/Types/VarDateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

class VarDateTimeTest extends \Doctrine\Tests\DbalTestCase
{
protected
$_platform,
$_type;
/**
* @var MockPlatform
*/
protected $_platform;

/**
* @var Type
*/
protected $_type;

protected function setUp()
{
Expand Down
3 changes: 3 additions & 0 deletions tests/Doctrine/Tests/DbalPerformanceTestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
class DbalPerformanceTestListener extends \PHPUnit\Framework\BaseTestListener
{
/**
* @var string[][]
*/
private $timings = [];

/**
Expand Down
Loading