Failed Conditions
Pull Request — 2.6 (#7235)
by Aleksey
10:51
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
 
36 36
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author";
37 37
         $this->_em->createQuery($dql)
38
-                  ->setParameter('author', $user)
39
-                  ->getResult();
38
+                    ->setParameter('author', $user)
39
+                    ->getResult();
40 40
 
41 41
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author AND a.user = :author";
42 42
         $this->_em->createQuery($dql)
43
-                  ->setParameter('author', $user)
44
-                  ->getResult();
43
+                    ->setParameter('author', $user)
44
+                    ->getResult();
45 45
 
46 46
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author";
47 47
         $farticle = $this->_em->createQuery($dql)
48
-                  ->setParameter('author', $user)
49
-                  ->setParameter('topic', 'This is John Galt speaking!')
50
-                  ->getSingleResult();
48
+                    ->setParameter('author', $user)
49
+                    ->setParameter('topic', 'This is John Galt speaking!')
50
+                    ->getSingleResult();
51 51
 
52 52
         $this->assertSame($article, $farticle);
53 53
     }
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
 
71 71
         $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3";
72 72
         $farticle = $this->_em->createQuery($dql)
73
-                  ->setParameter(1, 'This is John Galt speaking!')
74
-                  ->setParameter(2, $user)
75
-                  ->setParameter(3, $user)
76
-                  ->getSingleResult();
73
+                    ->setParameter(1, 'This is John Galt speaking!')
74
+                    ->setParameter(2, $user)
75
+                    ->setParameter(3, $user)
76
+                    ->getSingleResult();
77 77
 
78 78
         $this->assertSame($article, $farticle);
79 79
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
                 $this->_em->getClassMetadata(DDC1655Baz::class),
22 22
                 ]
23 23
             );
24
-        } catch(\Exception $e) {
24
+        } catch (\Exception $e) {
25 25
         }
26 26
     }
27 27
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         $baz = $this->_em->find(get_class($baz), $baz->id);
49 49
         foreach ($baz->foos as $foo) {
50
-            $this->assertEquals(1, $foo->loaded, "should have loaded callback counter incremented for " . get_class($foo));
50
+            $this->assertEquals(1, $foo->loaded, "should have loaded callback counter incremented for ".get_class($foo));
51 51
         }
52 52
     }
53 53
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->assertEquals(1, $bar->loaded);
72 72
         $this->assertEquals(1, $bar->subLoaded);
73 73
 
74
-        $dql = "SELECT b FROM " . __NAMESPACE__ . "\DDC1655Bar b WHERE b.id = ?1";
74
+        $dql = "SELECT b FROM ".__NAMESPACE__."\DDC1655Bar b WHERE b.id = ?1";
75 75
         $bar = $this->_em->createQuery($dql)->setParameter(1, $bar->id)->getSingleResult();
76 76
 
77 77
         $this->assertEquals(1, $bar->loaded);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -50,65 +50,65 @@
 block discarded – undo
50 50
     /** @Column(type="string", nullable=false) */
51 51
     protected $name;
52 52
 
53
-	/** @Column(type="string", nullable=true) */
54
-	protected $description;
55
-
56
-	/**
57
-	 * @ManyToMany(targetEntity="DDC719Group", inversedBy="parents")
58
-	 * @JoinTable(name="groups_groups",
59
-	 * 		joinColumns={@JoinColumn(name="parent_id", referencedColumnName="id")},
60
-	 * 		inverseJoinColumns={@JoinColumn(name="child_id", referencedColumnName="id")}
61
-	 * )
62
-	 */
63
-	protected $children = NULL;
64
-
65
-	/**
66
-	 * @ManyToMany(targetEntity="DDC719Group", mappedBy="children")
67
-	 */
68
-	protected $parents = NULL;
69
-
70
-	/**
71
-	 * construct
72
-	 */
73
-	public function __construct() {
74
-		parent::__construct();
75
-
76
-		$this->channels = new ArrayCollection();
77
-		$this->children = new ArrayCollection();
78
-		$this->parents = new ArrayCollection();
79
-	}
80
-
81
-	/**
82
-	 * adds group as new child
83
-	 *
84
-	 * @param Group $child
85
-	 */
86
-	public function addGroup(Group $child) {
53
+    /** @Column(type="string", nullable=true) */
54
+    protected $description;
55
+
56
+    /**
57
+     * @ManyToMany(targetEntity="DDC719Group", inversedBy="parents")
58
+     * @JoinTable(name="groups_groups",
59
+     * 		joinColumns={@JoinColumn(name="parent_id", referencedColumnName="id")},
60
+     * 		inverseJoinColumns={@JoinColumn(name="child_id", referencedColumnName="id")}
61
+     * )
62
+     */
63
+    protected $children = NULL;
64
+
65
+    /**
66
+     * @ManyToMany(targetEntity="DDC719Group", mappedBy="children")
67
+     */
68
+    protected $parents = NULL;
69
+
70
+    /**
71
+     * construct
72
+     */
73
+    public function __construct() {
74
+        parent::__construct();
75
+
76
+        $this->channels = new ArrayCollection();
77
+        $this->children = new ArrayCollection();
78
+        $this->parents = new ArrayCollection();
79
+    }
80
+
81
+    /**
82
+     * adds group as new child
83
+     *
84
+     * @param Group $child
85
+     */
86
+    public function addGroup(Group $child) {
87 87
         if ( ! $this->children->contains($child)) {
88 88
             $this->children->add($child);
89 89
             $child->addGroup($this);
90 90
         }
91
-	}
92
-
93
-	/**
94
-	 * adds channel as new child
95
-	 *
96
-	 * @param Channel $child
97
-	 */
98
-	public function addChannel(Channel $child) {
91
+    }
92
+
93
+    /**
94
+     * adds channel as new child
95
+     *
96
+     * @param Channel $child
97
+     */
98
+    public function addChannel(Channel $child) {
99 99
         if ( ! $this->channels->contains($child)) {
100 100
             $this->channels->add($child);
101 101
         }
102
-	}
103
-
104
-	/**
105
-	 * getter & setter
106
-	 */
107
-	public function getName() { return $this->name; }
108
-	public function setName($name) { $this->name = $name; }
109
-	public function getDescription() { return $this->description; }
110
-	public function setDescription($description) { $this->description = $description; }
111
-	public function getChildren() { return $this->children; }
112
-	public function getParents() { return $this->parents; }
113
-	public function getChannels() { return $this->channels; }
102
+    }
103
+
104
+    /**
105
+     * getter & setter
106
+     */
107
+    public function getName() { return $this->name; }
108
+    public function setName($name) { $this->name = $name; }
109
+    public function getDescription() { return $this->description; }
110
+    public function setDescription($description) { $this->description = $description; }
111
+    public function getChildren() { return $this->children; }
112
+    public function getParents() { return $this->parents; }
113
+    public function getChannels() { return $this->channels; }
114 114
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/Issue5989Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
         $employee = new Issue5989Employee();
29 29
 
30
-        $employeeTags =['tag2', 'tag3'];
30
+        $employeeTags = ['tag2', 'tag3'];
31 31
         $employee->tags = $employeeTags;
32 32
         $this->_em->persist($employee);
33 33
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1238Test.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(DDC1238User::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/DDC729Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
                 $this->_em->getClassMetadata(DDC729B::class),
20 20
                 ]
21 21
             );
22
-        } catch(\Exception $e) {
22
+        } catch (\Exception $e) {
23 23
 
24 24
         }
25 25
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH6141Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
76 76
     {
77
-        if (!$value instanceof GH6141People) {
77
+        if ( ! $value instanceof GH6141People) {
78 78
             $value = GH6141People::get($value);
79 79
         }
80 80
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public static function get($value)
119 119
     {
120
-        if (!self::isValid($value)) {
120
+        if ( ! self::isValid($value)) {
121 121
             throw new \InvalidArgumentException();
122 122
         }
123 123
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2862Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function testIssue()
30 30
     {
31 31
         $user1    = new DDC2862User('Foo');
32
-        $driver1  = new DDC2862Driver('Bar' , $user1);
32
+        $driver1  = new DDC2862Driver('Bar', $user1);
33 33
 
34 34
         $this->_em->persist($user1);
35 35
         $this->_em->persist($driver1);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function testIssueReopened()
68 68
     {
69 69
         $user1    = new DDC2862User('Foo');
70
-        $driver1  = new DDC2862Driver('Bar' , $user1);
70
+        $driver1  = new DDC2862Driver('Bar', $user1);
71 71
 
72 72
         $this->_em->persist($user1);
73 73
         $this->_em->persist($driver1);
Please login to merge, or discard this patch.
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.