Completed
Pull Request — 2.6 (#8015)
by
unknown
06:46
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
     protected $name;
68 68
 
69 69
     /**
70
-    * @ManyToMany(targetEntity="DDC211Group", inversedBy="users")
71
-    *   @JoinTable(name="user_groups",
72
-    *       joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")},
73
-    *       inverseJoinColumns={@JoinColumn(name="group_id", referencedColumnName="id")}
74
-    *   )
75
-    */
70
+     * @ManyToMany(targetEntity="DDC211Group", inversedBy="users")
71
+     *   @JoinTable(name="user_groups",
72
+     *       joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")},
73
+     *       inverseJoinColumns={@JoinColumn(name="group_id", referencedColumnName="id")}
74
+     *   )
75
+     */
76 76
     protected $groups;
77 77
 
78 78
     public function __construct() {
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
     protected $name;
104 104
 
105 105
     /**
106
-    * @ManyToMany(targetEntity="DDC211User", mappedBy="groups")
107
-    */
106
+     * @ManyToMany(targetEntity="DDC211User", mappedBy="groups")
107
+     */
108 108
     protected $users;
109 109
 
110 110
     public function __construct() {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             $this->_em->persist($group);
36 36
             $this->_em->flush();
37 37
 
38
-            if (!$user->getGroups()->contains($group)) {
38
+            if ( ! $user->getGroups()->contains($group)) {
39 39
                 $user->getGroups()->add($group);
40 40
                 $group->getUsers()->add($user);
41 41
                 $this->_em->flush();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1998Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      */
72 72
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
73 73
     {
74
-        return (string)$value;
74
+        return (string) $value;
75 75
     }
76 76
 
77 77
     public function convertToPhpValue($value, AbstractPlatform $platform)
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC960Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
                 $this->_em->getClassMetadata(DDC960Child::class)
17 17
                 ]
18 18
             );
19
-        } catch(\Exception $e) {
19
+        } catch (\Exception $e) {
20 20
 
21 21
         }
22 22
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2759Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
                 $this->_em->getClassMetadata(DDC2759MetadataCategory::class),
24 24
                 ]
25 25
             );
26
-        } catch(\Exception $e) {
26
+        } catch (\Exception $e) {
27 27
             return;
28 28
         }
29 29
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         // Checks sequence name validity
56 56
         $this->assertEquals(
57
-            $fullTableName . '_' . $classMetadata->getSingleIdentifierColumnName() . '_seq',
57
+            $fullTableName.'_'.$classMetadata->getSingleIdentifierColumnName().'_seq',
58 58
             $classMetadata->getSequenceName($platform)
59 59
         );
60 60
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC735Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
                 $this->_em->getClassMetadata(DDC735Review::class)
17 17
                 ]
18 18
             );
19
-        } catch(\Exception $e) {
19
+        } catch (\Exception $e) {
20 20
 
21 21
         }
22 22
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
         $this->_em->flush();
47 47
         $this->_em->clear();
48 48
 
49
-        $dql = "SELECT a, b, ba FROM " . __NAMESPACE__ . "\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba";
49
+        $dql = "SELECT a, b, ba FROM ".__NAMESPACE__."\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba";
50 50
         $results = $this->_em->createQuery($dql)->setMaxResults(1)->getResult();
51 51
 
52 52
         $this->assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom);
53
-        $this->assertFalse( $results[0]->entitiesB[0]->entityATo instanceof Proxy);
53
+        $this->assertFalse($results[0]->entitiesB[0]->entityATo instanceof Proxy);
54 54
         $this->assertInstanceOf(Collection::class, $results[0]->entitiesB[0]->entityATo->getEntitiesB());
55 55
     }
56 56
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC657Test.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     public function testEntitySingleResult()
21 21
     {
22
-        $query      = $this->_em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d');
22
+        $query      = $this->_em->createQuery('SELECT d FROM '.DateTimeModel::class.' d');
23 23
         $datetime   = $query->setMaxResults(1)->getSingleResult();
24 24
 
25 25
         $this->assertInstanceOf(DateTimeModel::class, $datetime);
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function testScalarResult()
33 33
     {
34
-        $query      = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
34
+        $query      = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
35 35
         $result     = $query->getScalarResult();
36 36
 
37
-        $this->assertCount(2,$result);
37
+        $this->assertCount(2, $result);
38 38
 
39 39
         $this->assertContains('11:11:11', $result[0]['time']);
40 40
         $this->assertContains('2010-01-01', $result[0]['date']);
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function testaTicketEntityArrayResult()
49 49
     {
50
-        $query      = $this->_em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
50
+        $query      = $this->_em->createQuery('SELECT d FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
51 51
         $result     = $query->getArrayResult();
52 52
 
53
-        $this->assertCount(2,$result);
53
+        $this->assertCount(2, $result);
54 54
 
55 55
         $this->assertInstanceOf('DateTime', $result[0]['datetime']);
56 56
         $this->assertInstanceOf('DateTime', $result[0]['time']);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function testTicketSingleResult()
65 65
     {
66
-        $query      = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
66
+        $query      = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
67 67
         $datetime   = $query->setMaxResults(1)->getSingleResult();
68 68
 
69 69
         $this->assertTrue(is_array($datetime));
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
 
76 76
     public function testTicketResult()
77 77
     {
78
-        $query      = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
78
+        $query      = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
79 79
         $result     = $query->getResult();
80 80
 
81
-        $this->assertCount(2,$result);
81
+        $this->assertCount(2, $result);
82 82
 
83 83
         $this->assertInstanceOf('DateTime', $result[0]['time']);
84 84
         $this->assertInstanceOf('DateTime', $result[0]['date']);
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 
103 103
         $dateTime1->date    = new \DateTime('2010-01-01', $timezone);
104 104
         $dateTime1->time    = new \DateTime('2010-01-01 11:11:11', $timezone);
105
-        $dateTime1->datetime= new \DateTime('2010-01-01 11:11:11', $timezone);
105
+        $dateTime1->datetime = new \DateTime('2010-01-01 11:11:11', $timezone);
106 106
 
107 107
         $dateTime2->date    = new \DateTime('2010-02-02', $timezone);
108 108
         $dateTime2->time    = new \DateTime('2010-02-02 12:12:12', $timezone);
109
-        $dateTime2->datetime= new \DateTime('2010-02-02 12:12:12', $timezone);
109
+        $dateTime2->datetime = new \DateTime('2010-02-02 12:12:12', $timezone);
110 110
 
111 111
         $this->_em->persist($dateTime1);
112 112
         $this->_em->persist($dateTime2);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC501Test.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $userClone = $this->_em->merge($userClone);
61 61
 
62 62
         // Back in managed world I would expect to have my phonenumbers back but they aren't!
63
-	// Remember I didn't touch (and probably didn't need) them at all while in detached mode.
63
+    // Remember I didn't touch (and probably didn't need) them at all while in detached mode.
64 64
         $this->assertEquals(4, count($userClone->getPhonenumbers()), 'Phonenumbers are not available anymore');
65 65
 
66 66
         // This works fine as long as cmUser::groups doesn't cascade "merge"
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,13 +89,13 @@
 block discarded – undo
89 89
         $user->username = 'lukacho';
90 90
         $user->status = 'developer';
91 91
 
92
-        foreach([1111,2222,3333,4444] as $number) {
92
+        foreach ([1111, 2222, 3333, 4444] as $number) {
93 93
             $phone = new CmsPhonenumber;
94 94
             $phone->phonenumber = $number;
95 95
             $user->addPhonenumber($phone);
96 96
         }
97 97
 
98
-        foreach(['Moshers', 'Headbangers'] as $groupName) {
98
+        foreach (['Moshers', 'Headbangers'] as $groupName) {
99 99
             $group = new CmsGroup;
100 100
             $group->setName($groupName);
101 101
             $user->addGroup($group);
Please login to merge, or discard this patch.