@@ -138,8 +138,8 @@ |
||
138 | 138 | public function __toString() |
139 | 139 | { |
140 | 140 | return strtoupper($this->joinType) . ' JOIN ' . $this->join |
141 | - . ($this->alias ? ' ' . $this->alias : '') |
|
142 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
141 | + . ($this->alias ? ' ' . $this->alias : '') |
|
142 | + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | + . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
144 | 144 | } |
145 | 145 | } |
@@ -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 |
@@ -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 |
@@ -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 | } |
@@ -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 | /** |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | $em = $this->createMock(EntityManagerInterface::class); |
61 | 61 | |
62 | 62 | $mappingDriver->method('getAllClassNames') |
63 | - ->willReturn([]); |
|
63 | + ->willReturn([]); |
|
64 | 64 | |
65 | 65 | $configuration->method('getMetadataDriverImpl') |
66 | - ->willReturn($mappingDriver); |
|
66 | + ->willReturn($mappingDriver); |
|
67 | 67 | |
68 | 68 | $em->method('getConfiguration') |
69 | - ->willReturn($configuration); |
|
69 | + ->willReturn($configuration); |
|
70 | 70 | |
71 | 71 | $application = new Application(); |
72 | 72 | $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)])); |
@@ -95,17 +95,17 @@ discard block |
||
95 | 95 | $em = $this->createMock(EntityManagerInterface::class); |
96 | 96 | |
97 | 97 | $mappingDriver->method('getAllClassNames') |
98 | - ->willReturn(['InvalidEntity']); |
|
98 | + ->willReturn(['InvalidEntity']); |
|
99 | 99 | |
100 | 100 | $configuration->method('getMetadataDriverImpl') |
101 | - ->willReturn($mappingDriver); |
|
101 | + ->willReturn($mappingDriver); |
|
102 | 102 | |
103 | 103 | $em->method('getConfiguration') |
104 | - ->willReturn($configuration); |
|
104 | + ->willReturn($configuration); |
|
105 | 105 | |
106 | 106 | $em->method('getClassMetadata') |
107 | - ->with('InvalidEntity') |
|
108 | - ->willThrowException(new MappingException('exception message')); |
|
107 | + ->with('InvalidEntity') |
|
108 | + ->willThrowException(new MappingException('exception message')); |
|
109 | 109 | |
110 | 110 | $application = new Application(); |
111 | 111 | $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)])); |