Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
ec85e548
Unverified
Commit
ec85e548
authored
Feb 06, 2018
by
Marco Pivetta
Committed by
GitHub
Feb 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3002 from carusogabriel/missing-annotations
Use @var instead of @param
parents
4ea3b4dc
3796bd2b
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
178 additions
and
49 deletions
+178
-49
ConnectionTest.php
tests/Doctrine/Tests/DBAL/ConnectionTest.php
+3
-0
DataAccessTest.php
tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php
+3
-0
ModifyLimitQueryTest.php
...s/Doctrine/Tests/DBAL/Functional/ModifyLimitQueryTest.php
+3
-0
PortabilityTest.php
tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php
+3
-0
ResultCacheTest.php
tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php
+9
-1
TableGeneratorTest.php
tests/Doctrine/Tests/DBAL/Functional/TableGeneratorTest.php
+3
-0
DBAL630Test.php
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
+3
-0
TypeConversionTest.php
tests/Doctrine/Tests/DBAL/Functional/TypeConversionTest.php
+3
-0
SQLAzurePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/SQLAzurePlatformTest.php
+3
-1
ExpressionBuilderTest.php
...ine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php
+3
-0
QueryBuilderTest.php
tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php
+3
-0
AbstractTestCase.php
...octrine/Tests/DBAL/Sharding/SQLAzure/AbstractTestCase.php
+7
-0
RunSqlCommandTest.php
...s/Doctrine/Tests/DBAL/Tools/Console/RunSqlCommandTest.php
+3
-0
ArrayTest.php
tests/Doctrine/Tests/DBAL/Types/ArrayTest.php
+10
-3
BooleanTest.php
tests/Doctrine/Tests/DBAL/Types/BooleanTest.php
+9
-3
DecimalTest.php
tests/Doctrine/Tests/DBAL/Types/DecimalTest.php
+9
-3
FloatTest.php
tests/Doctrine/Tests/DBAL/Types/FloatTest.php
+9
-1
GuidTypeTest.php
tests/Doctrine/Tests/DBAL/Types/GuidTypeTest.php
+9
-3
IntegerTest.php
tests/Doctrine/Tests/DBAL/Types/IntegerTest.php
+9
-3
ObjectTest.php
tests/Doctrine/Tests/DBAL/Types/ObjectTest.php
+9
-3
SmallIntTest.php
tests/Doctrine/Tests/DBAL/Types/SmallIntTest.php
+9
-3
StringTest.php
tests/Doctrine/Tests/DBAL/Types/StringTest.php
+9
-3
VarDateTimeTest.php
tests/Doctrine/Tests/DBAL/Types/VarDateTimeTest.php
+9
-3
DbalPerformanceTestListener.php
tests/Doctrine/Tests/DbalPerformanceTestListener.php
+3
-0
ConnectionMock.php
tests/Doctrine/Tests/Mocks/ConnectionMock.php
+12
-17
DatabasePlatformMock.php
tests/Doctrine/Tests/Mocks/DatabasePlatformMock.php
+12
-1
DriverMock.php
tests/Doctrine/Tests/Mocks/DriverMock.php
+8
-1
TaskMock.php
tests/Doctrine/Tests/Mocks/TaskMock.php
+3
-0
No files found.
tests/Doctrine/Tests/DBAL/ConnectionTest.php
View file @
ec85e548
...
...
@@ -30,6 +30,9 @@ class ConnectionTest extends \Doctrine\Tests\DbalTestCase
*/
protected
$_conn
=
null
;
/**
* @var string[]
*/
protected
$params
=
array
(
'driver'
=>
'pdo_mysql'
,
'host'
=>
'localhost'
,
...
...
tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php
View file @
ec85e548
...
...
@@ -11,6 +11,9 @@ use Doctrine\DBAL\Types\Type;
class
DataAccessTest
extends
\Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
static
private
$generated
=
false
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Functional/ModifyLimitQueryTest.php
View file @
ec85e548
...
...
@@ -4,6 +4,9 @@ namespace Doctrine\Tests\DBAL\Functional;
class
ModifyLimitQueryTest
extends
\Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
private
static
$tableCreated
=
false
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php
View file @
ec85e548
...
...
@@ -13,6 +13,9 @@ use Doctrine\DBAL\Portability\Connection as ConnectionPortability;
*/
class
PortabilityTest
extends
\Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var Connection
*/
private
$portableConnection
;
protected
function
tearDown
()
...
...
tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php
View file @
ec85e548
...
...
@@ -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
);
...
...
tests/Doctrine/Tests/DBAL/Functional/TableGeneratorTest.php
View file @
ec85e548
...
...
@@ -9,6 +9,9 @@ use Doctrine\DBAL\Id\TableGenerator;
*/
class
TableGeneratorTest
extends
\Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var TableGenerator
*/
private
$generator
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
View file @
ec85e548
...
...
@@ -11,6 +11,9 @@ use PDO;
*/
class
DBAL630Test
extends
\Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var bool
*/
private
$running
=
false
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Functional/TypeConversionTest.php
View file @
ec85e548
...
...
@@ -6,6 +6,9 @@ use Doctrine\DBAL\Types\Type;
class
TypeConversionTest
extends
\Doctrine\Tests\DbalFunctionalTestCase
{
/**
* @var int
*/
static
private
$typeCounter
=
0
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Platforms/SQLAzurePlatformTest.php
View file @
ec85e548
...
...
@@ -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
));
}
}
tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php
View file @
ec85e548
...
...
@@ -10,6 +10,9 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
*/
class
ExpressionBuilderTest
extends
\Doctrine\Tests\DbalTestCase
{
/**
* @var ExpressionBuilder
*/
protected
$expr
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php
View file @
ec85e548
...
...
@@ -11,6 +11,9 @@ use Doctrine\DBAL\Query\QueryBuilder;
*/
class
QueryBuilderTest
extends
\Doctrine\Tests\DbalTestCase
{
/**
* @var \Doctrine\DBAL\Connection
*/
protected
$conn
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Sharding/SQLAzure/AbstractTestCase.php
View file @
ec85e548
...
...
@@ -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
()
...
...
tests/Doctrine/Tests/DBAL/Tools/Console/RunSqlCommandTest.php
View file @
ec85e548
...
...
@@ -14,6 +14,9 @@ class RunSqlCommandTest extends \PHPUnit\Framework\TestCase
/** @var RunSqlCommand */
private
$command
;
/**
* @var \Doctrine\DBAL\Connection
*/
private
$connectionMock
;
protected
function
setUp
()
...
...
tests/Doctrine/Tests/DBAL/Types/ArrayTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/BooleanTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/DecimalTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/FloatTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/GuidTypeTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/IntegerTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/ObjectTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/SmallIntTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/StringTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DBAL/Types/VarDateTimeTest.php
View file @
ec85e548
...
...
@@ -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
()
{
...
...
tests/Doctrine/Tests/DbalPerformanceTestListener.php
View file @
ec85e548
...
...
@@ -9,6 +9,9 @@ namespace Doctrine\Tests;
*/
class
DbalPerformanceTestListener
extends
\PHPUnit\Framework\BaseTestListener
{
/**
* @var string[][]
*/
private
$timings
=
[];
/**
...
...
tests/Doctrine/Tests/Mocks/ConnectionMock.php
View file @
ec85e548
...
...
@@ -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
;
...
...
@@ -84,4 +79,4 @@ class ConnectionMock extends \Doctrine\DBAL\Connection
$this
->
_inserts
=
array
();
$this
->
_lastInsertId
=
0
;
}
}
\ No newline at end of file
}
tests/Doctrine/Tests/Mocks/DatabasePlatformMock.php
View file @
ec85e548
...
...
@@ -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
;
/**
...
...
@@ -87,4 +98,4 @@ class DatabasePlatformMock extends \Doctrine\DBAL\Platforms\AbstractPlatform
{
throw
DBALException
::
notSupported
(
__METHOD__
);
}
}
\ No newline at end of file
}
tests/Doctrine/Tests/Mocks/DriverMock.php
View file @
ec85e548
...
...
@@ -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
;
}
...
...
tests/Doctrine/Tests/Mocks/TaskMock.php
View file @
ec85e548
...
...
@@ -37,6 +37,9 @@ class TaskMock extends \Doctrine\Common\Cli\Tasks\AbstractTask
*/
static
public
$instances
=
array
();
/**
* @var int
*/
private
$runCounter
=
0
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment