@@ -24,7 +24,7 @@ |
||
24 | 24 | $this->_em->getClassMetadata(SequenceEntity::class), |
25 | 25 | ] |
26 | 26 | ); |
27 | - } catch(\Exception $e) { |
|
27 | + } catch (\Exception $e) { |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 |
@@ -182,7 +182,7 @@ |
||
182 | 182 | { |
183 | 183 | $this->_createFixture(); |
184 | 184 | |
185 | - $product = $this->_em->find(ECommerceProduct::class, $this->product->getId()); |
|
185 | + $product = $this->_em->find(ECommerceProduct::class, $this->product->getId()); |
|
186 | 186 | |
187 | 187 | $thirdFeature = new ECommerceFeature(); |
188 | 188 | $thirdFeature->setDescription('Model writing tutorial'); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $this->_em->getClassMetadata(DDC1461User::class) |
19 | 19 | ] |
20 | 20 | ); |
21 | - } catch(\Exception $e) { |
|
21 | + } catch (\Exception $e) { |
|
22 | 22 | |
23 | 23 | } |
24 | 24 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | $em->flush(); |
59 | 59 | |
60 | - $q = $this->_em->createQuery("SELECT COUNT(e) FROM " . __NAMESPACE__ . '\DDC1392File e'); |
|
60 | + $q = $this->_em->createQuery("SELECT COUNT(e) FROM ".__NAMESPACE__.'\DDC1392File e'); |
|
61 | 61 | $result = $q->getSingleScalarResult(); |
62 | 62 | |
63 | 63 | self::assertEquals(1, $result); |
@@ -26,9 +26,9 @@ |
||
26 | 26 | { |
27 | 27 | $qb = $this->_em->createQueryBuilder(); |
28 | 28 | $qb->from(DDC1225_TestEntity1::class, 'te1') |
29 | - ->select('te1') |
|
30 | - ->where('te1.testEntity2 = ?1') |
|
31 | - ->setParameter(1, 0); |
|
29 | + ->select('te1') |
|
30 | + ->where('te1.testEntity2 = ?1') |
|
31 | + ->setParameter(1, 0); |
|
32 | 32 | |
33 | 33 | $this->assertEquals( |
34 | 34 | strtolower('SELECT t0_.test_entity2_id AS test_entity2_id_0 FROM te1 t0_ WHERE t0_.test_entity2_id = ?'), |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $this->_em->getClassMetadata(DDC1225_TestEntity2::class), |
18 | 18 | ] |
19 | 19 | ); |
20 | - } catch(\PDOException $e) { |
|
20 | + } catch (\PDOException $e) { |
|
21 | 21 | |
22 | 22 | } |
23 | 23 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $related = $this |
47 | 47 | ->_em |
48 | - ->createQuery('SELECT b FROM '.__NAMESPACE__ . '\DDC2214Bar b WHERE b.id IN(:ids)') |
|
48 | + ->createQuery('SELECT b FROM '.__NAMESPACE__.'\DDC2214Bar b WHERE b.id IN(:ids)') |
|
49 | 49 | ->setParameter('ids', [$bar]) |
50 | 50 | ->getResult(); |
51 | 51 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $this->_em->getClassMetadata(DDC1209_3::class) |
18 | 18 | ] |
19 | 19 | ); |
20 | - } catch(\Exception $e) { |
|
20 | + } catch (\Exception $e) { |
|
21 | 21 | } |
22 | 22 | } |
23 | 23 |
@@ -23,30 +23,30 @@ discard block |
||
23 | 23 | |
24 | 24 | public function testFailingCase() |
25 | 25 | { |
26 | - $parent = new DDC1383Entity(); |
|
27 | - $child = new DDC1383Entity(); |
|
26 | + $parent = new DDC1383Entity(); |
|
27 | + $child = new DDC1383Entity(); |
|
28 | 28 | |
29 | - $child->setReference($parent); |
|
29 | + $child->setReference($parent); |
|
30 | 30 | |
31 | - $this->_em->persist($parent); |
|
32 | - $this->_em->persist($child); |
|
31 | + $this->_em->persist($parent); |
|
32 | + $this->_em->persist($child); |
|
33 | 33 | |
34 | - $id = $child->getId(); |
|
34 | + $id = $child->getId(); |
|
35 | 35 | |
36 | - $this->_em->flush(); |
|
37 | - $this->_em->clear(); |
|
36 | + $this->_em->flush(); |
|
37 | + $this->_em->clear(); |
|
38 | 38 | |
39 | - // Try merging the parent entity |
|
40 | - $child = $this->_em->merge($child); |
|
41 | - $parent = $child->getReference(); |
|
39 | + // Try merging the parent entity |
|
40 | + $child = $this->_em->merge($child); |
|
41 | + $parent = $child->getReference(); |
|
42 | 42 | |
43 | - // Parent is not instance of the abstract class |
|
44 | - self::assertTrue($parent instanceof DDC1383AbstractEntity, |
|
45 | - "Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected'); |
|
43 | + // Parent is not instance of the abstract class |
|
44 | + self::assertTrue($parent instanceof DDC1383AbstractEntity, |
|
45 | + "Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected'); |
|
46 | 46 | |
47 | - // Parent is NOT instance of entity |
|
48 | - self::assertTrue($parent instanceof DDC1383Entity, |
|
49 | - "Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected'); |
|
47 | + // Parent is NOT instance of entity |
|
48 | + self::assertTrue($parent instanceof DDC1383Entity, |
|
49 | + "Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected'); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
@@ -58,22 +58,22 @@ discard block |
||
58 | 58 | */ |
59 | 59 | abstract class DDC1383AbstractEntity |
60 | 60 | { |
61 | - /** |
|
62 | - * @Id |
|
63 | - * @Column(type="integer") |
|
64 | - * @GeneratedValue |
|
65 | - */ |
|
66 | - protected $id; |
|
67 | - |
|
68 | - public function getId() |
|
69 | - { |
|
70 | - return $this->id; |
|
71 | - } |
|
72 | - |
|
73 | - public function setId($id) |
|
74 | - { |
|
75 | - $this->id = $id; |
|
76 | - } |
|
61 | + /** |
|
62 | + * @Id |
|
63 | + * @Column(type="integer") |
|
64 | + * @GeneratedValue |
|
65 | + */ |
|
66 | + protected $id; |
|
67 | + |
|
68 | + public function getId() |
|
69 | + { |
|
70 | + return $this->id; |
|
71 | + } |
|
72 | + |
|
73 | + public function setId($id) |
|
74 | + { |
|
75 | + $this->id = $id; |
|
76 | + } |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -81,18 +81,18 @@ discard block |
||
81 | 81 | */ |
82 | 82 | class DDC1383Entity extends DDC1383AbstractEntity |
83 | 83 | { |
84 | - /** |
|
85 | - * @ManyToOne(targetEntity="DDC1383AbstractEntity") |
|
86 | - */ |
|
87 | - protected $reference; |
|
88 | - |
|
89 | - public function getReference() |
|
90 | - { |
|
91 | - return $this->reference; |
|
92 | - } |
|
93 | - |
|
94 | - public function setReference(DDC1383AbstractEntity $reference) |
|
95 | - { |
|
96 | - $this->reference = $reference; |
|
97 | - } |
|
84 | + /** |
|
85 | + * @ManyToOne(targetEntity="DDC1383AbstractEntity") |
|
86 | + */ |
|
87 | + protected $reference; |
|
88 | + |
|
89 | + public function getReference() |
|
90 | + { |
|
91 | + return $this->reference; |
|
92 | + } |
|
93 | + |
|
94 | + public function setReference(DDC1383AbstractEntity $reference) |
|
95 | + { |
|
96 | + $this->reference = $reference; |
|
97 | + } |
|
98 | 98 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->_em->getClassMetadata(DDC1383Entity::class), |
19 | 19 | ] |
20 | 20 | ); |
21 | - } catch(\Exception $ignored) {} |
|
21 | + } catch (\Exception $ignored) {} |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function testFailingCase() |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | |
43 | 43 | // Parent is not instance of the abstract class |
44 | 44 | self::assertTrue($parent instanceof DDC1383AbstractEntity, |
45 | - "Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected'); |
|
45 | + "Entity class is ".get_class($parent).', "DDC1383AbstractEntity" was expected'); |
|
46 | 46 | |
47 | 47 | // Parent is NOT instance of entity |
48 | 48 | self::assertTrue($parent instanceof DDC1383Entity, |
49 | - "Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected'); |
|
49 | + "Entity class is ".get_class($parent).', "DDC1383Entity" was expected'); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 |
@@ -36,9 +36,9 @@ |
||
36 | 36 | */ |
37 | 37 | class Ticket2481Product |
38 | 38 | { |
39 | - /** |
|
40 | - * @Id @Column(type="integer") |
|
41 | - * @GeneratedValue(strategy="AUTO") |
|
42 | - */ |
|
43 | - public $id; |
|
39 | + /** |
|
40 | + * @Id @Column(type="integer") |
|
41 | + * @GeneratedValue(strategy="AUTO") |
|
42 | + */ |
|
43 | + public $id; |
|
44 | 44 | } |