@@ -208,8 +208,8 @@ discard block |
||
208 | 208 | $sqlIdentifier = $this->getSQLIdentifier($AST); |
209 | 209 | |
210 | 210 | if ($hasOrderBy) { |
211 | - $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlIdentifier); |
|
212 | - $sqlIdentifier[] = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum'; |
|
211 | + $orderGroupBy = ' GROUP BY '.implode(', ', $sqlIdentifier); |
|
212 | + $sqlIdentifier[] = 'MIN('.$this->walkResultVariable('dctrn_rownum').') AS dctrn_minrownum'; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | // Build the counter query |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | ); |
221 | 221 | |
222 | 222 | if ($hasOrderBy) { |
223 | - $sql .= $orderGroupBy . $outerOrderBy; |
|
223 | + $sql .= $orderGroupBy.$outerOrderBy; |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | // Apply the limit and offset. |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | foreach ($orderByPathExpressions as $pathExpression) { |
324 | 324 | $idVar = $pathExpression->identificationVariable; |
325 | 325 | $field = $pathExpression->field; |
326 | - if (!isset($selects[$idVar])) { |
|
326 | + if ( ! isset($selects[$idVar])) { |
|
327 | 327 | $selects[$idVar] = []; |
328 | 328 | } |
329 | 329 | $selects[$idVar][$field] = true; |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | foreach ($AST->selectClause->selectExpressions as $selectExpression) { |
335 | 335 | if ($selectExpression instanceof SelectExpression) { |
336 | 336 | $idVar = $selectExpression->expression; |
337 | - if (!is_string($idVar)) { |
|
337 | + if ( ! is_string($idVar)) { |
|
338 | 338 | continue; |
339 | 339 | } |
340 | 340 | $field = $selectExpression->fieldIdentificationVariable; |
@@ -367,10 +367,10 @@ discard block |
||
367 | 367 | array $sqlIdentifier, |
368 | 368 | string $innerSql, |
369 | 369 | string $sql, |
370 | - ?OrderByClause $orderByClause |
|
370 | + ? OrderByClause $orderByClause |
|
371 | 371 | ) : string { |
372 | 372 | // If the sql statement has an order by clause, we need to wrap it in a new select distinct statement |
373 | - if (! $orderByClause) { |
|
373 | + if ( ! $orderByClause) { |
|
374 | 374 | return $sql; |
375 | 375 | } |
376 | 376 | |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | $orderByItems[] = $orderByItemString; |
413 | 413 | $identifier = \substr($orderByItemString, 0, \strrpos($orderByItemString, ' ')); |
414 | 414 | |
415 | - if (! \in_array($identifier, $identifiers, true)) { |
|
415 | + if ( ! \in_array($identifier, $identifiers, true)) { |
|
416 | 416 | $identifiers[] = $identifier; |
417 | 417 | } |
418 | 418 | } |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | $class = $metadataList[$dqlAliasForFieldAlias]; |
445 | 445 | |
446 | 446 | // If the field is from a joined child table, we won't be ordering on it. |
447 | - if (! isset($class->fieldMappings[$fieldName])) { |
|
447 | + if ( ! isset($class->fieldMappings[$fieldName])) { |
|
448 | 448 | continue; |
449 | 449 | } |
450 | 450 | |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | // for the joined parent table. |
466 | 466 | $otherClassMetadata = $this->em->getClassMetadata($fieldMapping['declared']); |
467 | 467 | |
468 | - if (! $otherClassMetadata->isMappedSuperclass) { |
|
468 | + if ( ! $otherClassMetadata->isMappedSuperclass) { |
|
469 | 469 | $sqlTableAliasForFieldAlias = $this->getSQLTableAlias($otherClassMetadata->getTableName(), $dqlAliasForFieldAlias); |
470 | 470 | } |
471 | 471 | } |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | */ |
583 | 583 | public function walkPathExpression($pathExpr) |
584 | 584 | { |
585 | - if (!$this->inSubSelect && !$this->platformSupportsRowNumber() && !in_array($pathExpr, $this->orderByPathExpressions)) { |
|
585 | + if ( ! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions)) { |
|
586 | 586 | $this->orderByPathExpressions[] = $pathExpr; |
587 | 587 | } |
588 | 588 |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Performance\Mock; |
4 | 4 | |
5 | -use Doctrine\ORM\Query; |
|
6 | 5 | use Doctrine\ORM\UnitOfWork; |
7 | 6 | use Doctrine\Tests\ORM\Performance\PersisterMock; |
8 | 7 |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | for ($i = 1; $i <= 10000; ++$i) { |
41 | 41 | $user = new CMS\CmsUser; |
42 | 42 | $user->status = 'user'; |
43 | - $user->username = 'user' . $i; |
|
44 | - $user->name = 'Mr.Smith-' . $i; |
|
43 | + $user->username = 'user'.$i; |
|
44 | + $user->name = 'Mr.Smith-'.$i; |
|
45 | 45 | |
46 | 46 | $this->users[$i] = $user; |
47 | 47 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | foreach ($this->users as $key => $user) { |
53 | 53 | $this->entityManager->persist($user); |
54 | 54 | |
55 | - if (! ($key % 20)) { |
|
55 | + if ( ! ($key % 20)) { |
|
56 | 56 | $this->entityManager->flush(); |
57 | 57 | $this->entityManager->clear(); |
58 | 58 | } |
@@ -66,7 +66,7 @@ |
||
66 | 66 | 'u__status' => 'developer', |
67 | 67 | 'u__username' => 'jwage', |
68 | 68 | 'u__name' => 'Jonathan', |
69 | - 'sclr0' => 'JWAGE' . $i, |
|
69 | + 'sclr0' => 'JWAGE'.$i, |
|
70 | 70 | 'p__phonenumber' => '91' |
71 | 71 | ]; |
72 | 72 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | 'u__status' => 'developer', |
52 | 52 | 'u__username' => 'jwage', |
53 | 53 | 'u__name' => 'Jonathan', |
54 | - 'sclr0' => 'JWAGE' . $i, |
|
54 | + 'sclr0' => 'JWAGE'.$i, |
|
55 | 55 | 'p__phonenumber' => '91', |
56 | 56 | 'a__id' => $i |
57 | 57 | ]; |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $user = new CMS\CmsUser(); |
40 | 40 | |
41 | 41 | $user->status = 'developer'; |
42 | - $user->username = 'jwage' . $i; |
|
42 | + $user->username = 'jwage'.$i; |
|
43 | 43 | $user->name = 'Jonathan'; |
44 | 44 | |
45 | 45 | $this->entityManager->persist($user); |
@@ -32,8 +32,8 @@ |
||
32 | 32 | $user = new CmsUser; |
33 | 33 | $user->id = $i; |
34 | 34 | $user->status = 'user'; |
35 | - $user->username = 'user' . $i; |
|
36 | - $user->name = 'Mr.Smith-' . $i; |
|
35 | + $user->username = 'user'.$i; |
|
36 | + $user->name = 'Mr.Smith-'.$i; |
|
37 | 37 | $this->users[] = $user; |
38 | 38 | |
39 | 39 | $this->unitOfWork->registerManaged( |
@@ -15,12 +15,12 @@ |
||
15 | 15 | { |
16 | 16 | $config = new Configuration(); |
17 | 17 | |
18 | - $config->setProxyDir(__DIR__ . '/../Tests/Proxies'); |
|
18 | + $config->setProxyDir(__DIR__.'/../Tests/Proxies'); |
|
19 | 19 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
20 | 20 | $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL); |
21 | 21 | $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver([ |
22 | - realpath(__DIR__ . '/Models/Cache'), |
|
23 | - realpath(__DIR__ . '/Models/GeoNames') |
|
22 | + realpath(__DIR__.'/Models/Cache'), |
|
23 | + realpath(__DIR__.'/Models/GeoNames') |
|
24 | 24 | ], true)); |
25 | 25 | |
26 | 26 | $entityManager = EntityManager::create( |
@@ -66,7 +66,7 @@ |
||
66 | 66 | 'u__status' => 'developer', |
67 | 67 | 'u__username' => 'jwage', |
68 | 68 | 'u__name' => 'Jonathan', |
69 | - 'sclr0' => 'JWAGE' . $i, |
|
69 | + 'sclr0' => 'JWAGE'.$i, |
|
70 | 70 | 'p__phonenumber' => '91' |
71 | 71 | ]; |
72 | 72 | } |