small refactory
This commit is contained in:
parent
b19e4a6440
commit
af2f556fd3
@ -82,7 +82,7 @@ class SqlWalker implements TreeWalker
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private $newObjectCounter;
|
||||
private $newObjectCounter = 0;
|
||||
|
||||
/**
|
||||
* @var ParserResult
|
||||
@ -1409,15 +1409,12 @@ class SqlWalker implements TreeWalker
|
||||
$objIndex = $this->newObjectCounter ++;
|
||||
foreach ($newObjectExpression->args as $argIndex => $e) {
|
||||
|
||||
$resultAlias = $this->scalarResultCounter++;
|
||||
$columnAlias = $this->getSQLColumnAlias('sclr') . $resultAlias;
|
||||
$resultAliasMap = $this->scalarResultAliasMap;
|
||||
$resultAlias = $this->scalarResultCounter++;
|
||||
$columnAlias = $this->getSQLColumnAlias('sclr') . $resultAlias;
|
||||
|
||||
switch (true) {
|
||||
case $e instanceof AST\NewObjectExpression:
|
||||
|
||||
$sqlSelectExpressions[] = $e->dispatch($this);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -141,7 +141,7 @@ class NewOperatorTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
new Doctrine\Tests\Models\CMS\CmsUserDTO(
|
||||
u.name,
|
||||
e.email,
|
||||
new Doctrine\Tests\Models\CMS\CmsUserDTO(
|
||||
new Doctrine\Tests\Models\CMS\CmsAddressDTO(
|
||||
a.country,
|
||||
a.city,
|
||||
a.zip
|
||||
@ -186,7 +186,7 @@ class NewOperatorTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
JOIN
|
||||
u.phonenumbers p
|
||||
GROUP BY
|
||||
u
|
||||
u, e, a
|
||||
ORDER BY
|
||||
u.name";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user