@@ -394,7 +394,7 @@ |
||
394 | 394 | |
395 | 395 | $l1 = new Login('session1'); |
396 | 396 | $l2 = new Login('session2'); |
397 | - $token = new Token('token-hash'); |
|
397 | + $token = new Token('token-hash'); |
|
398 | 398 | $token->addLogin($l1); |
399 | 399 | $token->addLogin($l2); |
400 | 400 |
@@ -302,8 +302,8 @@ |
||
302 | 302 | } |
303 | 303 | |
304 | 304 | /** |
305 | - * @group DDC-1955 |
|
306 | - */ |
|
305 | + * @group DDC-1955 |
|
306 | + */ |
|
307 | 307 | public function testLifecycleCallbackEventArgs() |
308 | 308 | { |
309 | 309 | $e = new LifecycleCallbackEventArgEntity; |
@@ -350,13 +350,13 @@ |
||
350 | 350 | private $value; |
351 | 351 | /** @Column(type="string") */ |
352 | 352 | private $name; |
353 | - public function getId() {return $this->id;} |
|
354 | - public function getValue() {return $this->value;} |
|
355 | - public function setValue($value) {$this->value = $value;} |
|
356 | - public function getName() {return $this->name;} |
|
357 | - public function setName($name) {$this->name = $name;} |
|
353 | + public function getId() {return $this->id; } |
|
354 | + public function getValue() {return $this->value; } |
|
355 | + public function setValue($value) {$this->value = $value; } |
|
356 | + public function getName() {return $this->name; } |
|
357 | + public function setName($name) {$this->name = $name; } |
|
358 | 358 | /** @PreUpdate */ |
359 | - public function testCallback() {$this->value = 'Hello World';} |
|
359 | + public function testCallback() {$this->value = 'Hello World'; } |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | /** |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $this->_em->getClassMetadata(ReadOnlyEntity::class), |
22 | 22 | ] |
23 | 23 | ); |
24 | - } catch(\Exception $e) { |
|
24 | + } catch (\Exception $e) { |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $this->_em->getClassMetadata(TrainOrder::class), |
26 | 26 | ] |
27 | 27 | ); |
28 | - } catch(\Exception $e) {} |
|
28 | + } catch (\Exception $e) {} |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $this->assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s')); |
127 | 127 | |
128 | 128 | $articles = $this->_em->getRepository(DateTimeModel::class) |
129 | - ->findBy(['datetime' => new \DateTime()]); |
|
129 | + ->findBy(['datetime' => new \DateTime()]); |
|
130 | 130 | |
131 | 131 | $this->assertEmpty($articles); |
132 | 132 | } |
@@ -162,11 +162,11 @@ discard block |
||
162 | 162 | $this->_em->clear(); |
163 | 163 | |
164 | 164 | $dateTimeDb = $this->_em->createQueryBuilder() |
165 | - ->select('d') |
|
166 | - ->from(DateTimeModel::class, 'd') |
|
167 | - ->where('d.datetime = ?1') |
|
168 | - ->setParameter(1, $date, DBALType::DATETIME) |
|
169 | - ->getQuery()->getSingleResult(); |
|
165 | + ->select('d') |
|
166 | + ->from(DateTimeModel::class, 'd') |
|
167 | + ->where('d.datetime = ?1') |
|
168 | + ->setParameter(1, $date, DBALType::DATETIME) |
|
169 | + ->getQuery()->getSingleResult(); |
|
170 | 170 | |
171 | 171 | $this->assertInstanceOf(\DateTime::class, $dateTimeDb->datetime); |
172 | 172 | $this->assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s')); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->_em->flush(); |
30 | 30 | $this->_em->clear(); |
31 | 31 | |
32 | - $dql = 'SELECT d FROM ' . DecimalModel::class . ' d'; |
|
32 | + $dql = 'SELECT d FROM '.DecimalModel::class.' d'; |
|
33 | 33 | $decimal = $this->_em->createQuery($dql)->getSingleResult(); |
34 | 34 | |
35 | 35 | $this->assertSame('0.15', $decimal->decimal); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->_em->flush(); |
50 | 50 | $this->_em->clear(); |
51 | 51 | |
52 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = true'; |
|
52 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = true'; |
|
53 | 53 | $bool = $this->_em->createQuery($dql)->getSingleResult(); |
54 | 54 | |
55 | 55 | $this->assertTrue($bool->booleanField); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->_em->flush(); |
60 | 60 | $this->_em->clear(); |
61 | 61 | |
62 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = false'; |
|
62 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = false'; |
|
63 | 63 | $bool = $this->_em->createQuery($dql)->getSingleResult(); |
64 | 64 | |
65 | 65 | $this->assertFalse($bool->booleanField); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $this->_em->flush(); |
76 | 76 | $this->_em->clear(); |
77 | 77 | |
78 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
78 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
79 | 79 | $serialize = $this->_em->createQuery($dql)->getSingleResult(); |
80 | 80 | |
81 | 81 | $this->assertSame(["foo" => "bar", "bar" => "baz"], $serialize->array); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $this->_em->flush(); |
91 | 91 | $this->_em->clear(); |
92 | 92 | |
93 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
93 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
94 | 94 | $serialize = $this->_em->createQuery($dql)->getSingleResult(); |
95 | 95 | |
96 | 96 | $this->assertInstanceOf('stdClass', $serialize->object); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $this->assertEquals('FOO', $this->_em->getConnection()->fetchColumn("select named_lower_case_string from customtype_uppercases where id=".$entity->id.""), 'Database holds uppercase string'); |
71 | 71 | |
72 | 72 | |
73 | - $entity->namedLowerCaseString = 'bar'; |
|
73 | + $entity->namedLowerCaseString = 'bar'; |
|
74 | 74 | |
75 | 75 | $this->_em->persist($entity); |
76 | 76 | $this->_em->flush(); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | $this->_em->clear(); |
130 | 130 | |
131 | - $query = $this->_em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = " . $parentId); |
|
131 | + $query = $this->_em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = ".$parentId); |
|
132 | 132 | |
133 | 133 | $result = $query->getResult(); |
134 | 134 |
@@ -742,9 +742,9 @@ discard block |
||
742 | 742 | $this->assertEquals($this->fixtures[1]->address->country, $result[1][1]->country); |
743 | 743 | $this->assertEquals($this->fixtures[2]->address->country, $result[2][1]->country); |
744 | 744 | |
745 | - $this->assertEquals($this->fixtures[0]->status,$result[0]['status']); |
|
746 | - $this->assertEquals($this->fixtures[1]->status,$result[1]['status']); |
|
747 | - $this->assertEquals($this->fixtures[2]->status,$result[2]['status']); |
|
745 | + $this->assertEquals($this->fixtures[0]->status, $result[0]['status']); |
|
746 | + $this->assertEquals($this->fixtures[1]->status, $result[1]['status']); |
|
747 | + $this->assertEquals($this->fixtures[2]->status, $result[2]['status']); |
|
748 | 748 | } |
749 | 749 | |
750 | 750 | public function testShouldSupportMultipleNewOperatorsAndSingleScalarWithAliases() |
@@ -799,9 +799,9 @@ discard block |
||
799 | 799 | $this->assertEquals($this->fixtures[1]->address->country, $result[1]['cmsAddress']->country); |
800 | 800 | $this->assertEquals($this->fixtures[2]->address->country, $result[2]['cmsAddress']->country); |
801 | 801 | |
802 | - $this->assertEquals($this->fixtures[0]->status,$result[0]['cmsUserStatus']); |
|
803 | - $this->assertEquals($this->fixtures[1]->status,$result[1]['cmsUserStatus']); |
|
804 | - $this->assertEquals($this->fixtures[2]->status,$result[2]['cmsUserStatus']); |
|
802 | + $this->assertEquals($this->fixtures[0]->status, $result[0]['cmsUserStatus']); |
|
803 | + $this->assertEquals($this->fixtures[1]->status, $result[1]['cmsUserStatus']); |
|
804 | + $this->assertEquals($this->fixtures[2]->status, $result[2]['cmsUserStatus']); |
|
805 | 805 | } |
806 | 806 | |
807 | 807 | public function testShouldSupportMultipleNewOperatorsAndSingleScalarWithAndWithoutAliases() |
@@ -856,9 +856,9 @@ discard block |
||
856 | 856 | $this->assertEquals($this->fixtures[1]->address->country, $result[1][0]->country); |
857 | 857 | $this->assertEquals($this->fixtures[2]->address->country, $result[2][0]->country); |
858 | 858 | |
859 | - $this->assertEquals($this->fixtures[0]->status,$result[0]['status']); |
|
860 | - $this->assertEquals($this->fixtures[1]->status,$result[1]['status']); |
|
861 | - $this->assertEquals($this->fixtures[2]->status,$result[2]['status']); |
|
859 | + $this->assertEquals($this->fixtures[0]->status, $result[0]['status']); |
|
860 | + $this->assertEquals($this->fixtures[1]->status, $result[1]['status']); |
|
861 | + $this->assertEquals($this->fixtures[2]->status, $result[2]['status']); |
|
862 | 862 | } |
863 | 863 | |
864 | 864 | public function testShouldSupportMultipleNewOperatorsAndMultipleScalars() |
@@ -914,13 +914,13 @@ discard block |
||
914 | 914 | $this->assertEquals($this->fixtures[1]->address->country, $result[1][1]->country); |
915 | 915 | $this->assertEquals($this->fixtures[2]->address->country, $result[2][1]->country); |
916 | 916 | |
917 | - $this->assertEquals($this->fixtures[0]->status,$result[0]['status']); |
|
918 | - $this->assertEquals($this->fixtures[1]->status,$result[1]['status']); |
|
919 | - $this->assertEquals($this->fixtures[2]->status,$result[2]['status']); |
|
917 | + $this->assertEquals($this->fixtures[0]->status, $result[0]['status']); |
|
918 | + $this->assertEquals($this->fixtures[1]->status, $result[1]['status']); |
|
919 | + $this->assertEquals($this->fixtures[2]->status, $result[2]['status']); |
|
920 | 920 | |
921 | - $this->assertEquals($this->fixtures[0]->username,$result[0]['username']); |
|
922 | - $this->assertEquals($this->fixtures[1]->username,$result[1]['username']); |
|
923 | - $this->assertEquals($this->fixtures[2]->username,$result[2]['username']); |
|
921 | + $this->assertEquals($this->fixtures[0]->username, $result[0]['username']); |
|
922 | + $this->assertEquals($this->fixtures[1]->username, $result[1]['username']); |
|
923 | + $this->assertEquals($this->fixtures[2]->username, $result[2]['username']); |
|
924 | 924 | } |
925 | 925 | |
926 | 926 | public function testShouldSupportMultipleNewOperatorsAndMultipleScalarsWithAliases() |
@@ -976,13 +976,13 @@ discard block |
||
976 | 976 | $this->assertEquals($this->fixtures[1]->address->country, $result[1]['cmsAddress']->country); |
977 | 977 | $this->assertEquals($this->fixtures[2]->address->country, $result[2]['cmsAddress']->country); |
978 | 978 | |
979 | - $this->assertEquals($this->fixtures[0]->status,$result[0]['cmsUserStatus']); |
|
980 | - $this->assertEquals($this->fixtures[1]->status,$result[1]['cmsUserStatus']); |
|
981 | - $this->assertEquals($this->fixtures[2]->status,$result[2]['cmsUserStatus']); |
|
979 | + $this->assertEquals($this->fixtures[0]->status, $result[0]['cmsUserStatus']); |
|
980 | + $this->assertEquals($this->fixtures[1]->status, $result[1]['cmsUserStatus']); |
|
981 | + $this->assertEquals($this->fixtures[2]->status, $result[2]['cmsUserStatus']); |
|
982 | 982 | |
983 | - $this->assertEquals($this->fixtures[0]->username,$result[0]['cmsUserUsername']); |
|
984 | - $this->assertEquals($this->fixtures[1]->username,$result[1]['cmsUserUsername']); |
|
985 | - $this->assertEquals($this->fixtures[2]->username,$result[2]['cmsUserUsername']); |
|
983 | + $this->assertEquals($this->fixtures[0]->username, $result[0]['cmsUserUsername']); |
|
984 | + $this->assertEquals($this->fixtures[1]->username, $result[1]['cmsUserUsername']); |
|
985 | + $this->assertEquals($this->fixtures[2]->username, $result[2]['cmsUserUsername']); |
|
986 | 986 | } |
987 | 987 | |
988 | 988 | public function testShouldSupportMultipleNewOperatorsAndMultipleScalarsWithAndWithoutAliases() |
@@ -1038,13 +1038,13 @@ discard block |
||
1038 | 1038 | $this->assertEquals($this->fixtures[1]->address->country, $result[1][0]->country); |
1039 | 1039 | $this->assertEquals($this->fixtures[2]->address->country, $result[2][0]->country); |
1040 | 1040 | |
1041 | - $this->assertEquals($this->fixtures[0]->status,$result[0]['status']); |
|
1042 | - $this->assertEquals($this->fixtures[1]->status,$result[1]['status']); |
|
1043 | - $this->assertEquals($this->fixtures[2]->status,$result[2]['status']); |
|
1041 | + $this->assertEquals($this->fixtures[0]->status, $result[0]['status']); |
|
1042 | + $this->assertEquals($this->fixtures[1]->status, $result[1]['status']); |
|
1043 | + $this->assertEquals($this->fixtures[2]->status, $result[2]['status']); |
|
1044 | 1044 | |
1045 | - $this->assertEquals($this->fixtures[0]->username,$result[0]['cmsUserUsername']); |
|
1046 | - $this->assertEquals($this->fixtures[1]->username,$result[1]['cmsUserUsername']); |
|
1047 | - $this->assertEquals($this->fixtures[2]->username,$result[2]['cmsUserUsername']); |
|
1045 | + $this->assertEquals($this->fixtures[0]->username, $result[0]['cmsUserUsername']); |
|
1046 | + $this->assertEquals($this->fixtures[1]->username, $result[1]['cmsUserUsername']); |
|
1047 | + $this->assertEquals($this->fixtures[2]->username, $result[2]['cmsUserUsername']); |
|
1048 | 1048 | } |
1049 | 1049 | |
1050 | 1050 | /** |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | class ResultCacheTest extends OrmFunctionalTestCase |
18 | 18 | { |
19 | - /** |
|
19 | + /** |
|
20 | 20 | * @var \ReflectionProperty |
21 | 21 | */ |
22 | 22 | private $cacheDataReflection; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | parent::setUp(); |
25 | 25 | $this->_factory = new ProxyFactory( |
26 | 26 | $this->_em, |
27 | - __DIR__ . '/../../Proxies', |
|
27 | + __DIR__.'/../../Proxies', |
|
28 | 28 | 'Doctrine\Tests\Proxies', |
29 | 29 | true); |
30 | 30 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | $id = $this->createProduct(); |
70 | 70 | |
71 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
71 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
72 | 72 | $class = $this->_em->getClassMetadata(get_class($entity)); |
73 | 73 | |
74 | 74 | $this->assertEquals(ECommerceProduct::class, $class->name); |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | { |
82 | 82 | $id = $this->createProduct(); |
83 | 83 | |
84 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
85 | - $entity2 = $this->_em->find(ECommerceProduct::class , $id); |
|
84 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
85 | + $entity2 = $this->_em->find(ECommerceProduct::class, $id); |
|
86 | 86 | |
87 | 87 | $this->assertSame($entity, $entity2); |
88 | 88 | $this->assertEquals('Doctrine Cookbook', $entity2->getName()); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $id = $this->createProduct(); |
97 | 97 | |
98 | 98 | /* @var $entity ECommerceProduct */ |
99 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
99 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
100 | 100 | |
101 | 101 | /* @var $clone ECommerceProduct */ |
102 | 102 | $clone = clone $entity; |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $id = $this->createProduct(); |
122 | 122 | |
123 | 123 | /* @var $entity ECommerceProduct */ |
124 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
124 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
125 | 125 | |
126 | 126 | $this->assertFalse($entity->__isInitialized__, "Pre-Condition: Object is unitialized proxy."); |
127 | 127 | $this->_em->getUnitOfWork()->initializeObject($entity); |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | $id = $this->createProduct(); |
137 | 137 | |
138 | 138 | /* @var $entity ECommerceProduct */ |
139 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
139 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
140 | 140 | $entity->setName('Doctrine 2 Cookbook'); |
141 | 141 | |
142 | 142 | $this->_em->flush(); |
143 | 143 | $this->_em->clear(); |
144 | 144 | |
145 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
145 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
146 | 146 | $this->assertEquals('Doctrine 2 Cookbook', $entity->getName()); |
147 | 147 | } |
148 | 148 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $id = $this->createProduct(); |
155 | 155 | |
156 | 156 | /* @var $entity ECommerceProduct */ |
157 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
157 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
158 | 158 | |
159 | 159 | $this->assertFalse($entity->wakeUp); |
160 | 160 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $id = $this->createProduct(); |
169 | 169 | |
170 | 170 | /* @var $entity ECommerceProduct */ |
171 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
171 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
172 | 172 | |
173 | 173 | $this->assertFalse($entity->__isInitialized__, "Pre-Condition: Object is unitialized proxy."); |
174 | 174 | $this->assertEquals($id, $entity->getId()); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $id = $this->createAuction(); |
184 | 184 | |
185 | 185 | /* @var $entity CompanyAuction */ |
186 | - $entity = $this->_em->getReference(CompanyAuction::class , $id); |
|
186 | + $entity = $this->_em->getReference(CompanyAuction::class, $id); |
|
187 | 187 | |
188 | 188 | $this->assertFalse($entity->__isInitialized__, "Pre-Condition: Object is unitialized proxy."); |
189 | 189 | $this->assertEquals($id, $entity->getId()); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $id = $this->createProduct(); |
219 | 219 | |
220 | 220 | /* @var $entity ECommerceProduct */ |
221 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
221 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
222 | 222 | |
223 | 223 | $this->assertFalse($entity->__isInitialized__, "Pre-Condition: Object is unitialized proxy."); |
224 | 224 | $this->assertEquals('Doctrine Cookbook', $entity->getName()); |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $id = $this->createProduct(); |
234 | 234 | |
235 | 235 | /* @var $entity ECommerceProduct */ |
236 | - $entity = $this->_em->getReference(ECommerceProduct::class , $id); |
|
236 | + $entity = $this->_em->getReference(ECommerceProduct::class, $id); |
|
237 | 237 | $className = ClassUtils::getClass($entity); |
238 | 238 | |
239 | 239 | $this->assertInstanceOf(Proxy::class, $entity); |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | $this->assertEquals(ECommerceProduct::class, $className); |
242 | 242 | |
243 | 243 | $restName = str_replace($this->_em->getConfiguration()->getProxyNamespace(), "", get_class($entity)); |
244 | - $restName = substr(get_class($entity), strlen($this->_em->getConfiguration()->getProxyNamespace()) +1); |
|
245 | - $proxyFileName = $this->_em->getConfiguration()->getProxyDir() . DIRECTORY_SEPARATOR . str_replace("\\", "", $restName) . ".php"; |
|
244 | + $restName = substr(get_class($entity), strlen($this->_em->getConfiguration()->getProxyNamespace()) + 1); |
|
245 | + $proxyFileName = $this->_em->getConfiguration()->getProxyDir().DIRECTORY_SEPARATOR.str_replace("\\", "", $restName).".php"; |
|
246 | 246 | $this->assertTrue(file_exists($proxyFileName), "Proxy file name cannot be found generically."); |
247 | 247 | |
248 | 248 | $entity->__load(); |