@@ -91,6 +91,10 @@ |
||
91 | 91 | /** @ORM\Column(type="integer") */ |
92 | 92 | public $numericValue; |
93 | 93 | |
94 | + /** |
|
95 | + * @param string $name |
|
96 | + * @param integer $number |
|
97 | + */ |
|
94 | 98 | public function __construct($name, $number) |
95 | 99 | { |
96 | 100 | $this->name = $name; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $this->em->getClassMetadata(ReadOnlyEntity::class), |
25 | 25 | ] |
26 | 26 | ); |
27 | - } catch(\Exception $e) { |
|
27 | + } catch (\Exception $e) { |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Doctrine\ORM\Cache\DefaultCacheFactory; |
8 | 8 | use Doctrine\ORM\Mapping\CacheMetadata; |
9 | 9 | use Doctrine\ORM\Mapping\CacheUsage; |
10 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
11 | 10 | use Doctrine\Tests\Mocks\ConcurrentRegionMock; |
12 | 11 | use Doctrine\ORM\Cache\Region\DefaultRegion; |
13 | 12 | use Doctrine\Tests\Mocks\TimestampRegionMock; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Doctrine\Tests\Models\Cache\City; |
9 | 9 | use Doctrine\Tests\Models\Cache\State; |
10 | 10 | use Doctrine\Tests\Models\Cache\Travel; |
11 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
12 | 11 | |
13 | 12 | /** |
14 | 13 | * @group DDC-2183 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional\Ticket; |
6 | 6 | |
7 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
8 | 7 | use Doctrine\ORM\Mapping\FetchMode; |
9 | 8 | use Doctrine\Tests\Models; |
10 | 9 |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -184,6 +184,9 @@ |
||
184 | 184 | */ |
185 | 185 | private $products; |
186 | 186 | |
187 | + /** |
|
188 | + * @param string $status |
|
189 | + */ |
|
187 | 190 | public function __construct($status) |
188 | 191 | { |
189 | 192 | $this->status = $status; |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional\Ticket; |
6 | 6 | |
7 | -use Doctrine\Common\Collections\ArrayCollection; |
|
8 | -use Doctrine\ORM\PersistentCollection; |
|
9 | -use Doctrine\Tests\Models\ECommerce\ECommerceCategory; |
|
7 | +use Doctrine\Common\Collections\ArrayCollection; |
|
8 | +use Doctrine\ORM\PersistentCollection; |
|
9 | +use Doctrine\Tests\Models\ECommerce\ECommerceCategory; |
|
10 | 10 | use Doctrine\Tests\Models\ECommerce\ECommerceProduct; |
11 | 11 | |
12 | 12 | /** |
@@ -1,6 +1,6 @@ |
||
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,6 +117,10 @@ |
||
117 | 117 | /** @ORM\Column(type = "string") */ |
118 | 118 | private $value; |
119 | 119 | |
120 | + /** |
|
121 | + * @param string $name |
|
122 | + * @param string $value |
|
123 | + */ |
|
120 | 124 | public function __construct($name, $value) |
121 | 125 | { |
122 | 126 | $this->name = $name; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $this->em->flush(); |
46 | 46 | |
47 | 47 | $asset->getAttributes() |
48 | - ->removeElement($attribute1); |
|
48 | + ->removeElement($attribute1); |
|
49 | 49 | |
50 | 50 | $idToBeRemoved = $attribute1->id; |
51 | 51 | |
@@ -105,17 +105,17 @@ discard block |
||
105 | 105 | */ |
106 | 106 | class DDC3785_Attribute |
107 | 107 | { |
108 | - /** |
|
108 | + /** |
|
109 | 109 | * @ORM\Id @ORM\Column(type="integer") |
110 | 110 | * @ORM\GeneratedValue |
111 | 111 | */ |
112 | 112 | public $id; |
113 | 113 | |
114 | - /** @ORM\Column(type = "string") */ |
|
115 | - private $name; |
|
114 | + /** @ORM\Column(type = "string") */ |
|
115 | + private $name; |
|
116 | 116 | |
117 | - /** @ORM\Column(type = "string") */ |
|
118 | - private $value; |
|
117 | + /** @ORM\Column(type = "string") */ |
|
118 | + private $value; |
|
119 | 119 | |
120 | 120 | public function __construct($name, $value) |
121 | 121 | { |
@@ -1,6 +1,6 @@ discard block |
||
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,7 +25,7 @@ discard block |
||
25 | 25 | $this->em->getClassMetadata(DDC3785_Attribute::class) |
26 | 26 | ] |
27 | 27 | ); |
28 | - } catch(\Exception $e) { |
|
28 | + } catch (\Exception $e) { |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
158 | 158 | { |
159 | - return (string)$value; |
|
159 | + return (string) $value; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -155,6 +155,9 @@ discard block |
||
155 | 155 | $this->books = new \Doctrine\Common\Collections\ArrayCollection; |
156 | 156 | } |
157 | 157 | |
158 | + /** |
|
159 | + * @param string $title |
|
160 | + */ |
|
158 | 161 | public function addBook($title) |
159 | 162 | { |
160 | 163 | $book = new DDC618Book($title, $this); |
@@ -179,6 +182,9 @@ discard block |
||
179 | 182 | /** @ORM\ManyToOne(targetEntity="DDC618Author", inversedBy="books") */ |
180 | 183 | public $author; |
181 | 184 | |
185 | + /** |
|
186 | + * @param DDC618Author $author |
|
187 | + */ |
|
182 | 188 | function __construct($title, $author) |
183 | 189 | { |
184 | 190 | $this->title = $title; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function testIndexByJoin() |
76 | 76 | { |
77 | 77 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '. |
78 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
78 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
79 | 79 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
80 | 80 | |
81 | 81 | self::assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books. |
@@ -99,14 +99,14 @@ discard block |
||
99 | 99 | public function testIndexByToOneJoinSilentlyIgnored() |
100 | 100 | { |
101 | 101 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
102 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
102 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
103 | 103 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
104 | 104 | |
105 | 105 | self::assertInstanceOf(DDC618Book::class, $result[0]); |
106 | 106 | self::assertInstanceOf(DDC618Author::class, $result[0]->author); |
107 | 107 | |
108 | 108 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
109 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
109 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
110 | 110 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); |
111 | 111 | |
112 | 112 | self::assertEquals("Alice", $result[0]['author']['name']); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public function testCombineIndexBy() |
119 | 119 | { |
120 | 120 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '. |
121 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
121 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
122 | 122 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
123 | 123 | |
124 | 124 | self::assertArrayHasKey(11, $result); // Alice |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $this->em->flush(); |
42 | 42 | $this->em->clear(); |
43 | - } catch(\Exception $e) { |
|
43 | + } catch (\Exception $e) { |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | } |
@@ -80,17 +80,17 @@ discard block |
||
80 | 80 | |
81 | 81 | self::assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books. |
82 | 82 | self::assertEquals('Alice', $result[0]->name); |
83 | - self::assertTrue( isset($result[0]->books["In Wonderland"] ), "Indexing by title should have books by title."); |
|
84 | - self::assertTrue( isset($result[0]->books["Reloaded"] ), "Indexing by title should have books by title."); |
|
85 | - self::assertTrue( isset($result[0]->books["Test"] ), "Indexing by title should have books by title."); |
|
83 | + self::assertTrue(isset($result[0]->books["In Wonderland"]), "Indexing by title should have books by title."); |
|
84 | + self::assertTrue(isset($result[0]->books["Reloaded"]), "Indexing by title should have books by title."); |
|
85 | + self::assertTrue(isset($result[0]->books["Test"]), "Indexing by title should have books by title."); |
|
86 | 86 | |
87 | 87 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); |
88 | 88 | |
89 | 89 | self::assertEquals(3, count($result[0]['books'])); // Alice, Joe doesn't appear because he has no books. |
90 | 90 | self::assertEquals('Alice', $result[0]['name']); |
91 | - self::assertTrue( isset($result[0]['books']["In Wonderland"] ), "Indexing by title should have books by title."); |
|
92 | - self::assertTrue( isset($result[0]['books']["Reloaded"] ), "Indexing by title should have books by title."); |
|
93 | - self::assertTrue( isset($result[0]['books']["Test"] ), "Indexing by title should have books by title."); |
|
91 | + self::assertTrue(isset($result[0]['books']["In Wonderland"]), "Indexing by title should have books by title."); |
|
92 | + self::assertTrue(isset($result[0]['books']["Reloaded"]), "Indexing by title should have books by title."); |
|
93 | + self::assertTrue(isset($result[0]['books']["Test"]), "Indexing by title should have books by title."); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | |
126 | 126 | self::assertEquals(3, count($result[11]->books)); // Alice, Joe doesn't appear because he has no books. |
127 | 127 | self::assertEquals('Alice', $result[11]->name); |
128 | - self::assertTrue( isset($result[11]->books["In Wonderland"] ), "Indexing by title should have books by title."); |
|
129 | - self::assertTrue( isset($result[11]->books["Reloaded"] ), "Indexing by title should have books by title."); |
|
130 | - self::assertTrue( isset($result[11]->books["Test"] ), "Indexing by title should have books by title."); |
|
128 | + self::assertTrue(isset($result[11]->books["In Wonderland"]), "Indexing by title should have books by title."); |
|
129 | + self::assertTrue(isset($result[11]->books["Reloaded"]), "Indexing by title should have books by title."); |
|
130 | + self::assertTrue(isset($result[11]->books["Test"]), "Indexing by title should have books by title."); |
|
131 | 131 | } |
132 | 132 | } |
133 | 133 |
@@ -167,6 +167,9 @@ discard block |
||
167 | 167 | */ |
168 | 168 | public $version; |
169 | 169 | |
170 | + /** |
|
171 | + * @param string $word |
|
172 | + */ |
|
170 | 173 | public function __construct($word) |
171 | 174 | { |
172 | 175 | $this->word = $word; |
@@ -196,6 +199,9 @@ discard block |
||
196 | 199 | */ |
197 | 200 | public $version; |
198 | 201 | |
202 | + /** |
|
203 | + * @param string $name |
|
204 | + */ |
|
199 | 205 | public function __construct($name) |
200 | 206 | { |
201 | 207 | $this->name = $name; |
@@ -214,6 +220,11 @@ discard block |
||
214 | 220 | /** @ORM\Column(type="integer") */ |
215 | 221 | public $rgt; |
216 | 222 | |
223 | + /** |
|
224 | + * @param string $name |
|
225 | + * @param integer $lft |
|
226 | + * @param integer $rgt |
|
227 | + */ |
|
217 | 228 | public function __construct($name, $lft, $rgt) |
218 | 229 | { |
219 | 230 | $this->name = $name; |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $this->em->getClassMetadata(DDC832Like::class), |
29 | 29 | ] |
30 | 30 | ); |
31 | - } catch(\Exception $e) { |
|
31 | + } catch (\Exception $e) { |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 |