Failed Conditions
Pull Request — develop (#6599)
by Michael
131:05 queued 63:47
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1383Test.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -27,30 +27,30 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function testFailingCase()
29 29
     {
30
-		$parent = new DDC1383Entity();
31
-		$child = new DDC1383Entity();
30
+        $parent = new DDC1383Entity();
31
+        $child = new DDC1383Entity();
32 32
 
33
-		$child->setReference($parent);
33
+        $child->setReference($parent);
34 34
 
35
-		$this->em->persist($parent);
36
-		$this->em->persist($child);
35
+        $this->em->persist($parent);
36
+        $this->em->persist($child);
37 37
 
38
-		$id = $child->getId();
38
+        $id = $child->getId();
39 39
 
40
-		$this->em->flush();
41
-		$this->em->clear();
40
+        $this->em->flush();
41
+        $this->em->clear();
42 42
 
43
-		// Try merging the parent entity
44
-		$child = $this->em->merge($child);
45
-		$parent = $child->getReference();
43
+        // Try merging the parent entity
44
+        $child = $this->em->merge($child);
45
+        $parent = $child->getReference();
46 46
 
47
-		// Parent is not instance of the abstract class
48
-		self::assertTrue($parent instanceof DDC1383AbstractEntity,
49
-				"Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected');
47
+        // Parent is not instance of the abstract class
48
+        self::assertTrue($parent instanceof DDC1383AbstractEntity,
49
+                "Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected');
50 50
 
51
-		// Parent is NOT instance of entity
52
-		self::assertTrue($parent instanceof DDC1383Entity,
53
-				"Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected');
51
+        // Parent is NOT instance of entity
52
+        self::assertTrue($parent instanceof DDC1383Entity,
53
+                "Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected');
54 54
     }
55 55
 }
56 56
 
@@ -62,22 +62,22 @@  discard block
 block discarded – undo
62 62
  */
63 63
 abstract class DDC1383AbstractEntity
64 64
 {
65
-	/**
66
-	 * @ORM\Id
67
-	 * @ORM\Column(type="integer")
68
-	 * @ORM\GeneratedValue
69
-	 */
70
-	protected $id;
71
-
72
-	public function getId()
73
-	{
74
-		return $this->id;
75
-	}
76
-
77
-	public function setId($id)
78
-	{
79
-		$this->id = $id;
80
-	}
65
+    /**
66
+     * @ORM\Id
67
+     * @ORM\Column(type="integer")
68
+     * @ORM\GeneratedValue
69
+     */
70
+    protected $id;
71
+
72
+    public function getId()
73
+    {
74
+        return $this->id;
75
+    }
76
+
77
+    public function setId($id)
78
+    {
79
+        $this->id = $id;
80
+    }
81 81
 }
82 82
 
83 83
 /**
@@ -85,18 +85,18 @@  discard block
 block discarded – undo
85 85
  */
86 86
 class DDC1383Entity extends DDC1383AbstractEntity
87 87
 {
88
-	/**
89
-	 * @ORM\ManyToOne(targetEntity="DDC1383AbstractEntity")
90
-	 */
91
-	protected $reference;
92
-
93
-	public function getReference()
94
-	{
95
-		return $this->reference;
96
-	}
97
-
98
-	public function setReference(DDC1383AbstractEntity $reference)
99
-	{
100
-		$this->reference = $reference;
101
-	}
88
+    /**
89
+     * @ORM\ManyToOne(targetEntity="DDC1383AbstractEntity")
90
+     */
91
+    protected $reference;
92
+
93
+    public function getReference()
94
+    {
95
+        return $this->reference;
96
+    }
97
+
98
+    public function setReference(DDC1383AbstractEntity $reference)
99
+    {
100
+        $this->reference = $reference;
101
+    }
102 102
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                 $this->em->getClassMetadata(DDC1383Entity::class),
23 23
                 ]
24 24
             );
25
-        } catch(\Exception $ignored) {}
25
+        } catch (\Exception $ignored) {}
26 26
     }
27 27
 
28 28
     public function testFailingCase()
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		// Parent is not instance of the abstract class
48 48
 		self::assertTrue($parent instanceof DDC1383AbstractEntity,
49
-				"Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected');
49
+				"Entity class is ".get_class($parent).', "DDC1383AbstractEntity" was expected');
50 50
 
51 51
 		// Parent is NOT instance of entity
52 52
 		self::assertTrue($parent instanceof DDC1383Entity,
53
-				"Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected');
53
+				"Entity class is ".get_class($parent).', "DDC1383Entity" was expected');
54 54
     }
55 55
 }
56 56
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2895Test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                 $this->em->getClassMetadata(DDC2895::class),
23 23
                 ]
24 24
             );
25
-        } catch(\Exception $e) {
25
+        } catch (\Exception $e) {
26 26
 
27 27
         }
28 28
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     /**
78 78
      * @param \DateTime $lastModified
79 79
      */
80
-    public function setLastModified( $lastModified )
80
+    public function setLastModified($lastModified)
81 81
     {
82 82
         $this->lastModified = $lastModified;
83 83
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * @param mixed $id
105 105
      */
106
-    public function setId( $id )
106
+    public function setId($id)
107 107
     {
108 108
         $this->id = $id;
109 109
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
                 $this->em->getClassMetadata(DDC1655Baz::class),
26 26
                 ]
27 27
             );
28
-        } catch(\Exception $e) {
29
-            $this->fail($e->getMessage() . PHP_EOL . $e->getTraceAsString());
28
+        } catch (\Exception $e) {
29
+            $this->fail($e->getMessage().PHP_EOL.$e->getTraceAsString());
30 30
         }
31 31
     }
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $conn = static::$sharedConn;
36 36
 
37 37
         // In case test is skipped, tearDown is called, but no setup may have run
38
-        if (!$conn) {
38
+        if ( ! $conn) {
39 39
             return;
40 40
         }
41 41
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $baz = $this->em->find(get_class($baz), $baz->id);
79 79
         foreach ($baz->foos as $foo) {
80
-            self::assertEquals(1, $foo->loaded, "should have loaded callback counter incremented for " . get_class($foo));
80
+            self::assertEquals(1, $foo->loaded, "should have loaded callback counter incremented for ".get_class($foo));
81 81
         }
82 82
     }
83 83
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         self::assertEquals(1, $bar->loaded);
102 102
         self::assertEquals(1, $bar->subLoaded);
103 103
 
104
-        $dql = "SELECT b FROM " . __NAMESPACE__ . "\DDC1655Bar b WHERE b.id = ?1";
104
+        $dql = "SELECT b FROM ".__NAMESPACE__."\DDC1655Bar b WHERE b.id = ?1";
105 105
         $bar = $this->em->createQuery($dql)->setParameter(1, $bar->id)->getSingleResult();
106 106
 
107 107
         self::assertEquals(1, $bar->loaded);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1461Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                 $this->em->getClassMetadata(DDC1461User::class)
23 23
                 ]
24 24
             );
25
-        } catch(\Exception $e) {
25
+        } catch (\Exception $e) {
26 26
 
27 27
         }
28 28
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1998Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
76 76
     {
77
-        return (string)$value;
77
+        return (string) $value;
78 78
     }
79 79
 
80 80
     public function convertToPhpValue($value, AbstractPlatform $platform)
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC440Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         return $this->number;
118 118
     }
119 119
 
120
-    public function setClient(DDC440Client $value, $update_inverse=true)
120
+    public function setClient(DDC440Client $value, $update_inverse = true)
121 121
     {
122 122
         $this->client = $value;
123 123
         if ($update_inverse) {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC657Test.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function testEntitySingleResult()
23 23
     {
24
-        $query      = $this->em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d');
24
+        $query      = $this->em->createQuery('SELECT d FROM '.DateTimeModel::class.' d');
25 25
         $datetime   = $query->setMaxResults(1)->getSingleResult();
26 26
 
27 27
         self::assertInstanceOf(DateTimeModel::class, $datetime);
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function testScalarResult()
35 35
     {
36
-        $query      = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
36
+        $query      = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
37 37
         $result     = $query->getScalarResult();
38 38
 
39
-        self::assertCount(2,$result);
39
+        self::assertCount(2, $result);
40 40
 
41 41
         self::assertContains('11:11:11', $result[0]['time']);
42 42
         self::assertContains('2010-01-01', $result[0]['date']);
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function testaTicketEntityArrayResult()
51 51
     {
52
-        $query      = $this->em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
52
+        $query      = $this->em->createQuery('SELECT d FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
53 53
         $result     = $query->getArrayResult();
54 54
 
55
-        self::assertCount(2,$result);
55
+        self::assertCount(2, $result);
56 56
 
57 57
         self::assertInstanceOf('DateTime', $result[0]['datetime']);
58 58
         self::assertInstanceOf('DateTime', $result[0]['time']);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function testTicketSingleResult()
67 67
     {
68
-        $query      = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
68
+        $query      = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
69 69
         $datetime   = $query->setMaxResults(1)->getSingleResult();
70 70
 
71 71
         self::assertTrue(is_array($datetime));
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function testTicketResult()
79 79
     {
80
-        $query      = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
80
+        $query      = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
81 81
         $result     = $query->getResult();
82 82
 
83
-        self::assertCount(2,$result);
83
+        self::assertCount(2, $result);
84 84
 
85 85
         self::assertInstanceOf('DateTime', $result[0]['time']);
86 86
         self::assertInstanceOf('DateTime', $result[0]['date']);
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
 
105 105
         $dateTime1->date    = new \DateTime('2010-01-01', $timezone);
106 106
         $dateTime1->time    = new \DateTime('2010-01-01 11:11:11', $timezone);
107
-        $dateTime1->datetime= new \DateTime('2010-01-01 11:11:11', $timezone);
107
+        $dateTime1->datetime = new \DateTime('2010-01-01 11:11:11', $timezone);
108 108
 
109 109
         $dateTime2->date    = new \DateTime('2010-02-02', $timezone);
110 110
         $dateTime2->time    = new \DateTime('2010-02-02 12:12:12', $timezone);
111
-        $dateTime2->datetime= new \DateTime('2010-02-02 12:12:12', $timezone);
111
+        $dateTime2->datetime = new \DateTime('2010-02-02 12:12:12', $timezone);
112 112
 
113 113
         $this->em->persist($dateTime1);
114 114
         $this->em->persist($dateTime2);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php 2 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -54,65 +54,65 @@
 block discarded – undo
54 54
     /** @ORM\Column(type="string", nullable=false) */
55 55
     protected $name;
56 56
 
57
-	/** @ORM\Column(type="string", nullable=true) */
58
-	protected $description;
59
-
60
-	/**
61
-	 * @ORM\ManyToMany(targetEntity="DDC719Group", inversedBy="parents")
62
-	 * @ORM\JoinTable(name="groups_groups",
63
-	 * 		joinColumns={@ORM\JoinColumn(name="parent_id", referencedColumnName="id")},
64
-	 * 		inverseJoinColumns={@ORM\JoinColumn(name="child_id", referencedColumnName="id")}
65
-	 * )
66
-	 */
67
-	protected $children = NULL;
68
-
69
-	/**
70
-	 * @ORM\ManyToMany(targetEntity="DDC719Group", mappedBy="children")
71
-	 */
72
-	protected $parents = NULL;
73
-
74
-	/**
75
-	 * construct
76
-	 */
77
-	public function __construct() {
78
-		parent::__construct();
79
-
80
-		$this->channels = new ArrayCollection();
81
-		$this->children = new ArrayCollection();
82
-		$this->parents = new ArrayCollection();
83
-	}
84
-
85
-	/**
86
-	 * adds group as new child
87
-	 *
88
-	 * @param Group $child
89
-	 */
90
-	public function addGroup(Group $child) {
57
+    /** @ORM\Column(type="string", nullable=true) */
58
+    protected $description;
59
+
60
+    /**
61
+     * @ORM\ManyToMany(targetEntity="DDC719Group", inversedBy="parents")
62
+     * @ORM\JoinTable(name="groups_groups",
63
+     * 		joinColumns={@ORM\JoinColumn(name="parent_id", referencedColumnName="id")},
64
+     * 		inverseJoinColumns={@ORM\JoinColumn(name="child_id", referencedColumnName="id")}
65
+     * )
66
+     */
67
+    protected $children = NULL;
68
+
69
+    /**
70
+     * @ORM\ManyToMany(targetEntity="DDC719Group", mappedBy="children")
71
+     */
72
+    protected $parents = NULL;
73
+
74
+    /**
75
+     * construct
76
+     */
77
+    public function __construct() {
78
+        parent::__construct();
79
+
80
+        $this->channels = new ArrayCollection();
81
+        $this->children = new ArrayCollection();
82
+        $this->parents = new ArrayCollection();
83
+    }
84
+
85
+    /**
86
+     * adds group as new child
87
+     *
88
+     * @param Group $child
89
+     */
90
+    public function addGroup(Group $child) {
91 91
         if ( ! $this->children->contains($child)) {
92 92
             $this->children->add($child);
93 93
             $child->addGroup($this);
94 94
         }
95
-	}
96
-
97
-	/**
98
-	 * adds channel as new child
99
-	 *
100
-	 * @param Channel $child
101
-	 */
102
-	public function addChannel(Channel $child) {
95
+    }
96
+
97
+    /**
98
+     * adds channel as new child
99
+     *
100
+     * @param Channel $child
101
+     */
102
+    public function addChannel(Channel $child) {
103 103
         if ( ! $this->channels->contains($child)) {
104 104
             $this->channels->add($child);
105 105
         }
106
-	}
107
-
108
-	/**
109
-	 * getter & setter
110
-	 */
111
-	public function getName() { return $this->name; }
112
-	public function setName($name) { $this->name = $name; }
113
-	public function getDescription() { return $this->description; }
114
-	public function setDescription($description) { $this->description = $description; }
115
-	public function getChildren() { return $this->children; }
116
-	public function getParents() { return $this->parents; }
117
-	public function getChannels() { return $this->channels; }
106
+    }
107
+
108
+    /**
109
+     * getter & setter
110
+     */
111
+    public function getName() { return $this->name; }
112
+    public function setName($name) { $this->name = $name; }
113
+    public function getDescription() { return $this->description; }
114
+    public function setDescription($description) { $this->description = $description; }
115
+    public function getChildren() { return $this->children; }
116
+    public function getParents() { return $this->parents; }
117
+    public function getChannels() { return $this->channels; }
118 118
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,19 +50,19 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Ticket;
6 6
 
Please login to merge, or discard this patch.