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
de568088
Unverified
Commit
de568088
authored
Feb 06, 2018
by
Marco Pivetta
Committed by
GitHub
Feb 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3015 from carusogabriel/cast
[CS] A cast statement must be followed by a single space
parents
ec85e548
c0a41300
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
PoolingShardConnection.php
lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php
+1
-1
QueryBuilderTest.php
tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php
+7
-7
DbalFunctionalTestCase.php
tests/Doctrine/Tests/DbalFunctionalTestCase.php
+1
-1
No files found.
lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php
View file @
de568088
...
@@ -207,7 +207,7 @@ class PoolingShardConnection extends Connection
...
@@ -207,7 +207,7 @@ class PoolingShardConnection extends Connection
throw
new
ShardingException
(
"Cannot switch shard when transaction is active."
);
throw
new
ShardingException
(
"Cannot switch shard when transaction is active."
);
}
}
$this
->
activeShardId
=
(
int
)
$shardId
;
$this
->
activeShardId
=
(
int
)
$shardId
;
if
(
isset
(
$this
->
activeConnections
[
$this
->
activeShardId
]))
{
if
(
isset
(
$this
->
activeConnections
[
$this
->
activeShardId
]))
{
$this
->
_conn
=
$this
->
activeConnections
[
$this
->
activeShardId
];
$this
->
_conn
=
$this
->
activeConnections
[
$this
->
activeShardId
];
...
...
tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php
View file @
de568088
...
@@ -583,9 +583,9 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
...
@@ -583,9 +583,9 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb
->
select
(
'u.*'
)
->
from
(
'users'
,
'u'
)
->
where
(
'u.name = ?'
);
$qb
->
select
(
'u.*'
)
->
from
(
'users'
,
'u'
)
->
where
(
'u.name = ?'
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = ?'
,
(
string
)
$qb
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = ?'
,
(
string
)
$qb
);
$qb
->
resetQueryPart
(
'where'
);
$qb
->
resetQueryPart
(
'where'
);
self
::
assertEquals
(
'SELECT u.* FROM users u'
,
(
string
)
$qb
);
self
::
assertEquals
(
'SELECT u.* FROM users u'
,
(
string
)
$qb
);
}
}
public
function
testResetQueryParts
()
public
function
testResetQueryParts
()
...
@@ -594,9 +594,9 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
...
@@ -594,9 +594,9 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb
->
select
(
'u.*'
)
->
from
(
'users'
,
'u'
)
->
where
(
'u.name = ?'
)
->
orderBy
(
'u.name'
);
$qb
->
select
(
'u.*'
)
->
from
(
'users'
,
'u'
)
->
where
(
'u.name = ?'
)
->
orderBy
(
'u.name'
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = ? ORDER BY u.name ASC'
,
(
string
)
$qb
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = ? ORDER BY u.name ASC'
,
(
string
)
$qb
);
$qb
->
resetQueryParts
(
array
(
'where'
,
'orderBy'
));
$qb
->
resetQueryParts
(
array
(
'where'
,
'orderBy'
));
self
::
assertEquals
(
'SELECT u.* FROM users u'
,
(
string
)
$qb
);
self
::
assertEquals
(
'SELECT u.* FROM users u'
,
(
string
)
$qb
);
}
}
public
function
testCreateNamedParameter
()
public
function
testCreateNamedParameter
()
...
@@ -607,7 +607,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
...
@@ -607,7 +607,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb
->
expr
()
->
eq
(
'u.name'
,
$qb
->
createNamedParameter
(
10
,
ParameterType
::
INTEGER
))
$qb
->
expr
()
->
eq
(
'u.name'
,
$qb
->
createNamedParameter
(
10
,
ParameterType
::
INTEGER
))
);
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = :dcValue1'
,
(
string
)
$qb
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = :dcValue1'
,
(
string
)
$qb
);
self
::
assertEquals
(
10
,
$qb
->
getParameter
(
'dcValue1'
));
self
::
assertEquals
(
10
,
$qb
->
getParameter
(
'dcValue1'
));
self
::
assertEquals
(
ParameterType
::
INTEGER
,
$qb
->
getParameterType
(
'dcValue1'
));
self
::
assertEquals
(
ParameterType
::
INTEGER
,
$qb
->
getParameterType
(
'dcValue1'
));
}
}
...
@@ -620,7 +620,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
...
@@ -620,7 +620,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb
->
expr
()
->
eq
(
'u.name'
,
$qb
->
createNamedParameter
(
10
,
ParameterType
::
INTEGER
,
':test'
))
$qb
->
expr
()
->
eq
(
'u.name'
,
$qb
->
createNamedParameter
(
10
,
ParameterType
::
INTEGER
,
':test'
))
);
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = :test'
,
(
string
)
$qb
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = :test'
,
(
string
)
$qb
);
self
::
assertEquals
(
10
,
$qb
->
getParameter
(
'test'
));
self
::
assertEquals
(
10
,
$qb
->
getParameter
(
'test'
));
self
::
assertEquals
(
ParameterType
::
INTEGER
,
$qb
->
getParameterType
(
'test'
));
self
::
assertEquals
(
ParameterType
::
INTEGER
,
$qb
->
getParameterType
(
'test'
));
}
}
...
@@ -633,7 +633,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
...
@@ -633,7 +633,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb
->
expr
()
->
eq
(
'u.name'
,
$qb
->
createPositionalParameter
(
10
,
ParameterType
::
INTEGER
))
$qb
->
expr
()
->
eq
(
'u.name'
,
$qb
->
createPositionalParameter
(
10
,
ParameterType
::
INTEGER
))
);
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = ?'
,
(
string
)
$qb
);
self
::
assertEquals
(
'SELECT u.* FROM users u WHERE u.name = ?'
,
(
string
)
$qb
);
self
::
assertEquals
(
10
,
$qb
->
getParameter
(
1
));
self
::
assertEquals
(
10
,
$qb
->
getParameter
(
1
));
self
::
assertEquals
(
ParameterType
::
INTEGER
,
$qb
->
getParameterType
(
1
));
self
::
assertEquals
(
ParameterType
::
INTEGER
,
$qb
->
getParameterType
(
1
));
}
}
...
...
tests/Doctrine/Tests/DbalFunctionalTestCase.php
View file @
de568088
...
@@ -85,7 +85,7 @@ class DbalFunctionalTestCase extends DbalTestCase
...
@@ -85,7 +85,7 @@ class DbalFunctionalTestCase extends DbalTestCase
$message
=
"["
.
get_class
(
$t
)
.
"] "
.
$t
->
getMessage
()
.
PHP_EOL
.
PHP_EOL
.
"With queries:"
.
PHP_EOL
.
$queries
.
PHP_EOL
.
"Trace:"
.
PHP_EOL
.
$traceMsg
;
$message
=
"["
.
get_class
(
$t
)
.
"] "
.
$t
->
getMessage
()
.
PHP_EOL
.
PHP_EOL
.
"With queries:"
.
PHP_EOL
.
$queries
.
PHP_EOL
.
"Trace:"
.
PHP_EOL
.
$traceMsg
;
throw
new
\Exception
(
$message
,
(
int
)
$t
->
getCode
(),
$t
);
throw
new
\Exception
(
$message
,
(
int
)
$t
->
getCode
(),
$t
);
}
}
throw
$t
;
throw
$t
;
}
}
...
...
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