@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Performance\Hydration; |
6 | 6 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'u__status' => 'developer', |
69 | 69 | 'u__username' => 'jwage', |
70 | 70 | 'u__name' => 'Jonathan', |
71 | - 'sclr0' => 'JWAGE' . $i, |
|
71 | + 'sclr0' => 'JWAGE'.$i, |
|
72 | 72 | 'p__phonenumber' => '91' |
73 | 73 | ]; |
74 | 74 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Performance\LazyLoading; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Performance\ChangeSet; |
6 | 6 | |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | $user = new CmsUser; |
35 | 35 | $user->id = $i; |
36 | 36 | $user->status = 'user'; |
37 | - $user->username = 'user' . $i; |
|
38 | - $user->name = 'Mr.Smith-' . $i; |
|
37 | + $user->username = 'user'.$i; |
|
38 | + $user->name = 'Mr.Smith-'.$i; |
|
39 | 39 | $this->users[] = $user; |
40 | 40 | |
41 | 41 | $this->unitOfWork->registerManaged( |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * <http://www.doctrine-project.org>. |
18 | 18 | */ |
19 | 19 | |
20 | -declare(strict_types=1); |
|
20 | +declare(strict_types = 1); |
|
21 | 21 | |
22 | 22 | namespace Doctrine\ORM\Mapping\Driver; |
23 | 23 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | foreach ($this->drivers AS $namespace => $driver) { |
127 | 127 | $oid = spl_object_hash($driver); |
128 | 128 | |
129 | - if (!isset($driverClasses[$oid])) { |
|
129 | + if ( ! isset($driverClasses[$oid])) { |
|
130 | 130 | $driverClasses[$oid] = $driver->getAllClassNames(); |
131 | 131 | } |
132 | 132 |
@@ -73,7 +73,11 @@ discard block |
||
73 | 73 | $first = true; |
74 | 74 | |
75 | 75 | foreach ($owningAssociation->getJoinColumns() as $joinColumn) { |
76 | - if ($first) $first = false; else $sql .= ' AND '; |
|
76 | + if ($first) { |
|
77 | + $first = false; |
|
78 | + } else { |
|
79 | + $sql .= ' AND '; |
|
80 | + } |
|
77 | 81 | |
78 | 82 | $sql .= sprintf('%s.%s = %s.%s', |
79 | 83 | $targetTableAlias, |
@@ -106,7 +110,11 @@ discard block |
||
106 | 110 | $first = true; |
107 | 111 | |
108 | 112 | foreach ($joinColumns as $joinColumn) { |
109 | - if ($first) $first = false; else $sql .= ' AND '; |
|
113 | + if ($first) { |
|
114 | + $first = false; |
|
115 | + } else { |
|
116 | + $sql .= ' AND '; |
|
117 | + } |
|
110 | 118 | |
111 | 119 | $sql .= sprintf('%s.%s = %s.%s', |
112 | 120 | $joinTableAlias, |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query\AST\Functions; |
6 | 6 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName()); |
51 | 51 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); |
52 | 52 | |
53 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
53 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
54 | 54 | |
55 | 55 | $owningAssociation = $targetClass->getProperty($association->getMappedBy()); |
56 | 56 | $first = true; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | // join to target table |
82 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' WHERE '; |
|
82 | + $sql .= $joinTableName.' '.$joinTableAlias.' WHERE '; |
|
83 | 83 | |
84 | 84 | $joinColumns = $association->isOwningSide() |
85 | 85 | ? $joinTable->getJoinColumns() |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | - return '(' . $sql . ')'; |
|
103 | + return '('.$sql.')'; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -213,8 +213,8 @@ |
||
213 | 213 | $this->metadataCache = []; |
214 | 214 | |
215 | 215 | $this->em |
216 | - ->getEventManager() |
|
217 | - ->removeEventListener([Events::onClear], $this); |
|
216 | + ->getEventManager() |
|
217 | + ->removeEventListener([Events::onClear], $this); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Internal\Hydration; |
6 | 6 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | { |
146 | 146 | $row = $this->stmt->fetch(PDO::FETCH_ASSOC); |
147 | 147 | |
148 | - if (! $row) { |
|
148 | + if ( ! $row) { |
|
149 | 149 | $this->cleanup(); |
150 | 150 | |
151 | 151 | return false; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | : $value; |
287 | 287 | |
288 | 288 | if ($cacheKeyInfo['isIdentifier'] && $value !== null) { |
289 | - $id[$dqlAlias] .= '|' . $value; |
|
289 | + $id[$dqlAlias] .= '|'.$value; |
|
290 | 290 | $nonemptyComponents[$dqlAlias] = true; |
291 | 291 | } |
292 | 292 | break; |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | if ( ! isset($cacheKeyInfo['isScalar'])) { |
325 | 325 | $dqlAlias = $cacheKeyInfo['dqlAlias']; |
326 | 326 | $type = $cacheKeyInfo['type']; |
327 | - $fieldName = $dqlAlias . '_' . $fieldName; |
|
327 | + $fieldName = $dqlAlias.'_'.$fieldName; |
|
328 | 328 | $value = $type |
329 | 329 | ? $type->convertToPHPValue($value, $this->platform) |
330 | 330 | : $value; |
@@ -90,7 +90,7 @@ |
||
90 | 90 | $ownerId = $this->uow->getEntityIdentifier($collection->getOwner()); |
91 | 91 | $key = new CollectionCacheKey($this->sourceEntity->getRootClassName(), $fieldName, $ownerId); |
92 | 92 | |
93 | - // Invalidate non initialized collections OR ordered collection |
|
93 | + // Invalidate non initialized collections OR ordered collection |
|
94 | 94 | if (($isDirty && ! $isInitialized) || |
95 | 95 | ($this->association instanceof ToManyAssociationMetadata && $this->association->getOrderBy())) { |
96 | 96 | $this->persister->update($collection); |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Cache\Persister\Collection; |
7 | 7 |
@@ -25,6 +25,10 @@ |
||
25 | 25 | $this->em = $this->getTestEntityManager(); |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $dqlToBeTested |
|
30 | + * @param string $sqlToBeConfirmed |
|
31 | + */ |
|
28 | 32 | public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed) |
29 | 33 | { |
30 | 34 | try { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Query; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM; |
6 | 6 |