@@ -32,8 +32,8 @@ |
||
32 | 32 | ->getMock(); |
33 | 33 | |
34 | 34 | $configuration = $this->getMockBuilder(Configuration::class) |
35 | - ->setMethods(['getMetadataDriverImpl']) |
|
36 | - ->getMock(); |
|
35 | + ->setMethods(['getMetadataDriverImpl']) |
|
36 | + ->getMock(); |
|
37 | 37 | |
38 | 38 | $connection = $this->createMock(Connection::class); |
39 | 39 |
@@ -86,6 +86,6 @@ |
||
86 | 86 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
87 | 87 | { |
88 | 88 | // getParameter applies quoting automatically |
89 | - return $targetTableAlias . '.id = ' . $this->getParameter('id'); |
|
89 | + return $targetTableAlias.'.id = '.$this->getParameter('id'); |
|
90 | 90 | } |
91 | 91 | } |
@@ -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); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | try { |
31 | 31 | $query = $this->em->createQuery($dqlToBeTested); |
32 | 32 | $query->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [CustomTreeWalkerJoin::class]) |
33 | - ->useQueryCache(false); |
|
33 | + ->useQueryCache(false); |
|
34 | 34 | |
35 | 35 | $sqlGenerated = $query->getSql(); |
36 | 36 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | $query->free(); |
37 | 37 | } catch (Exception $e) { |
38 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
38 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | { |
78 | 78 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
79 | 79 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
80 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
80 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
81 | 81 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
82 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
82 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
83 | 83 | |
84 | 84 | $identificationVariableDecl->joins[] = $join; |
85 | 85 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
90 | 90 | |
91 | 91 | $this->setQueryComponent( |
92 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
92 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
93 | 93 | [ |
94 | 94 | 'metadata' => $addressMetadata, |
95 | 95 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -212,7 +212,7 @@ |
||
212 | 212 | $this->expectExceptionMessage('The optimistic lock on an entity failed.'); |
213 | 213 | |
214 | 214 | $this->em->createQuery($dql) |
215 | - ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC) |
|
216 | - ->getSQL(); |
|
215 | + ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC) |
|
216 | + ->getSQL(); |
|
217 | 217 | } |
218 | 218 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $article = new CmsArticle(); |
93 | 93 | |
94 | 94 | $this->expectException(InvalidArgumentException::class); |
95 | - $this->expectExceptionMessage('Entity ' . CmsArticle::class); |
|
95 | + $this->expectExceptionMessage('Entity '.CmsArticle::class); |
|
96 | 96 | |
97 | 97 | $this->em->lock($article, LockMode::OPTIMISTIC, $article->version + 1); |
98 | 98 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | { |
142 | 142 | $writeLockSql = $this->em->getConnection()->getDatabasePlatform()->getWriteLockSQL(); |
143 | 143 | |
144 | - if (! $writeLockSql) { |
|
144 | + if ( ! $writeLockSql) { |
|
145 | 145 | $this->markTestSkipped('Database Driver has no Write Lock support.'); |
146 | 146 | } |
147 | 147 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | { |
177 | 177 | $readLockSql = $this->em->getConnection()->getDatabasePlatform()->getReadLockSQL(); |
178 | 178 | |
179 | - if (! $readLockSql) { |
|
179 | + if ( ! $readLockSql) { |
|
180 | 180 | $this->markTestSkipped('Database Driver has no Write Lock support.'); |
181 | 181 | } |
182 | 182 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function testLockOptimisticNonVersionedThrowsExceptionInDQL() : void |
211 | 211 | { |
212 | - $dql = 'SELECT u FROM ' . CmsUser::class . " u WHERE u.username = 'gblanco'"; |
|
212 | + $dql = 'SELECT u FROM '.CmsUser::class." u WHERE u.username = 'gblanco'"; |
|
213 | 213 | |
214 | 214 | $this->expectException(OptimisticLockException::class); |
215 | 215 | $this->expectExceptionMessage('The optimistic lock on an entity failed.'); |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | private function createQuery() |
52 | 52 | { |
53 | 53 | return $this->em->createQueryBuilder() |
54 | - ->select('car') |
|
55 | - ->from(GH2947Car::class, 'car') |
|
56 | - ->getQuery() |
|
57 | - ->useResultCache(true, 3600, 'foo-cache-id'); |
|
54 | + ->select('car') |
|
55 | + ->from(GH2947Car::class, 'car') |
|
56 | + ->getQuery() |
|
57 | + ->useResultCache(true, 3600, 'foo-cache-id'); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | private function createData() |
@@ -67,13 +67,13 @@ discard block |
||
67 | 67 | private function updateData() |
68 | 68 | { |
69 | 69 | $this->em->createQueryBuilder() |
70 | - ->update(GH2947Car::class, 'car') |
|
71 | - ->set('car.brand', ':newBrand') |
|
72 | - ->where('car.brand = :oldBrand') |
|
73 | - ->setParameter('newBrand', 'Dacia') |
|
74 | - ->setParameter('oldBrand', 'BMW') |
|
75 | - ->getQuery() |
|
76 | - ->execute(); |
|
70 | + ->update(GH2947Car::class, 'car') |
|
71 | + ->set('car.brand', ':newBrand') |
|
72 | + ->where('car.brand = :oldBrand') |
|
73 | + ->setParameter('newBrand', 'Dacia') |
|
74 | + ->setParameter('oldBrand', 'BMW') |
|
75 | + ->getQuery() |
|
76 | + ->execute(); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 |
@@ -50,19 +50,19 @@ |
||
50 | 50 | $this->em->clear(); |
51 | 51 | |
52 | 52 | $result = $this->em->createQueryBuilder() |
53 | - ->select('p') |
|
54 | - ->from(DDC3170ProductJoined::class, 'p') |
|
55 | - ->getQuery() |
|
56 | - ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
53 | + ->select('p') |
|
54 | + ->from(DDC3170ProductJoined::class, 'p') |
|
55 | + ->getQuery() |
|
56 | + ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
57 | 57 | |
58 | 58 | self::assertCount(1, $result); |
59 | 59 | self::assertContainsOnly(DDC3170ProductJoined::class, $result); |
60 | 60 | |
61 | 61 | $result = $this->em->createQueryBuilder() |
62 | - ->select('p') |
|
63 | - ->from(DDC3170ProductSingleTable::class, 'p') |
|
64 | - ->getQuery() |
|
65 | - ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
62 | + ->select('p') |
|
63 | + ->from(DDC3170ProductSingleTable::class, 'p') |
|
64 | + ->getQuery() |
|
65 | + ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
66 | 66 | |
67 | 67 | self::assertCount(1, $result); |
68 | 68 | self::assertContainsOnly(DDC3170ProductSingleTable::class, $result); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $product->addBuyer($user); |
36 | 36 | |
37 | 37 | $this->em->getUnitOfWork() |
38 | - ->computeChangeSets(); |
|
38 | + ->computeChangeSets(); |
|
39 | 39 | |
40 | 40 | $this->em->persist($product); |
41 | 41 | $this->em->flush(); |
@@ -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 | /** |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | { |
151 | 151 | $row = $this->stmt->fetch(FetchMode::ASSOCIATIVE); |
152 | 152 | |
153 | - if (! $row) { |
|
153 | + if ( ! $row) { |
|
154 | 154 | $this->cleanup(); |
155 | 155 | |
156 | 156 | return false; |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | : $value; |
293 | 293 | |
294 | 294 | if ($cacheKeyInfo['isIdentifier'] && $value !== null) { |
295 | - $id[$dqlAlias] .= '|' . $value; |
|
295 | + $id[$dqlAlias] .= '|'.$value; |
|
296 | 296 | $nonemptyComponents[$dqlAlias] = true; |
297 | 297 | } |
298 | 298 | break; |
@@ -328,10 +328,10 @@ discard block |
||
328 | 328 | |
329 | 329 | // WARNING: BC break! We know this is the desired behavior to type convert values, but this |
330 | 330 | // erroneous behavior exists since 2.0 and we're forced to keep compatibility. |
331 | - if (! isset($cacheKeyInfo['isScalar'])) { |
|
331 | + if ( ! isset($cacheKeyInfo['isScalar'])) { |
|
332 | 332 | $dqlAlias = $cacheKeyInfo['dqlAlias']; |
333 | 333 | $type = $cacheKeyInfo['type']; |
334 | - $fieldName = $dqlAlias . '_' . $fieldName; |
|
334 | + $fieldName = $dqlAlias.'_'.$fieldName; |
|
335 | 335 | $value = $type |
336 | 336 | ? $type->convertToPHPValue($value, $this->platform) |
337 | 337 | : $value; |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | private function getDiscriminatorValues(ClassMetadata $classMetadata) : array |
436 | 436 | { |
437 | 437 | $values = array_map( |
438 | - function (string $subClass) : string { |
|
438 | + function(string $subClass) : string { |
|
439 | 439 | return (string) $this->getClassMetadata($subClass)->discriminatorValue; |
440 | 440 | }, |
441 | 441 | $classMetadata->getSubClasses() |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | */ |
456 | 456 | protected function getClassMetadata($className) |
457 | 457 | { |
458 | - if (! isset($this->metadataCache[$className])) { |
|
458 | + if ( ! isset($this->metadataCache[$className])) { |
|
459 | 459 | $this->metadataCache[$className] = $this->em->getClassMetadata($className); |
460 | 460 | } |
461 | 461 |