@@ -10,7 +10,6 @@ |
||
10 | 10 | use Doctrine\ORM\Proxy\Factory\DefaultProxyResolver; |
11 | 11 | use Doctrine\ORM\Proxy\Factory\StaticProxyFactory; |
12 | 12 | use Doctrine\ORM\Query\ResultSetMapping; |
13 | -use Doctrine\ORM\Utility\IdentifierFlattener; |
|
14 | 13 | |
15 | 14 | /** |
16 | 15 | * An entity manager mock that prevents lazy-loading of proxies |
@@ -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\Performance\Mock; |
6 | 6 |
@@ -5,8 +5,6 @@ |
||
5 | 5 | namespace Doctrine\Tests\Mocks; |
6 | 6 | |
7 | 7 | use Doctrine\Common\Collections\Criteria; |
8 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
9 | -use Doctrine\ORM\Mapping\GeneratorType; |
|
10 | 8 | use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; |
11 | 9 | |
12 | 10 | /** |
@@ -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\Mocks; |
6 | 6 |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | |
235 | 235 | /** |
236 | 236 | * |
237 | - * @return kateglo\application\helpers\collections\ArrayCollection |
|
237 | + * @return ArrayCollection |
|
238 | 238 | */ |
239 | 239 | public function getTypes() |
240 | 240 | { |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | |
338 | 338 | /** |
339 | 339 | * |
340 | - * @param kateglo\application\models\Lemma $lemma |
|
340 | + * @param Lemma $lemma |
|
341 | 341 | * @return void |
342 | 342 | */ |
343 | 343 | public function addLemma(Lemma $lemma) |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | |
351 | 351 | /** |
352 | 352 | * |
353 | - * @param kateglo\application\models\Lemma $lemma |
|
353 | + * @param Lemma $lemma |
|
354 | 354 | * @return void |
355 | 355 | */ |
356 | 356 | public function removeLEmma(Lemma $lemma) |
@@ -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 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * |
207 | 207 | * @return string |
208 | 208 | */ |
209 | - public function getLemma(){ |
|
209 | + public function getLemma() { |
|
210 | 210 | return $this->lemma; |
211 | 211 | } |
212 | 212 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | public function addType(Type $type) |
217 | 217 | { |
218 | - if (!$this->types->contains($type)) { |
|
218 | + if ( ! $this->types->contains($type)) { |
|
219 | 219 | $this->types[] = $type; |
220 | 220 | $type->addLemma($this); |
221 | 221 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function addLemma(Lemma $lemma) |
344 | 344 | { |
345 | - if (!$this->lemmas->contains($lemma)) { |
|
345 | + if ( ! $this->lemmas->contains($lemma)) { |
|
346 | 346 | $this->lemmas[] = $lemma; |
347 | 347 | $lemma->addType($this); |
348 | 348 | } |
@@ -3,7 +3,6 @@ |
||
3 | 3 | declare(strict_types=1); |
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | -use Doctrine\Common\Util\Debug; |
|
7 | 6 | use Doctrine\ORM\ORMException; |
8 | 7 | use Doctrine\ORM\Query\QueryException; |
9 | 8 | use Doctrine\Tests\Models\Navigation\NavCountry; |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | $this->putTripAroundEurope(); |
113 | 113 | |
114 | 114 | $dql = 'SELECT t, p, c ' |
115 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
116 | - . 'INNER JOIN t.pois p ' |
|
117 | - . 'INNER JOIN p.country c' |
|
115 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
116 | + . 'INNER JOIN t.pois p ' |
|
117 | + . 'INNER JOIN p.country c' |
|
118 | 118 | ; |
119 | 119 | |
120 | 120 | $tours = $this->em->createQuery($dql)->getResult(); |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | $this->putTripAroundEurope(); |
135 | 135 | |
136 | 136 | $dql = 'SELECT t ' |
137 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
138 | - . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
139 | - . 'WHERE p MEMBER OF t.pois' |
|
137 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
138 | + . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
139 | + . 'WHERE p MEMBER OF t.pois' |
|
140 | 140 | ; |
141 | 141 | |
142 | 142 | $query = $this->em->createQuery($dql); |
@@ -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 | use Doctrine\Common\Util\Debug; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
7 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
8 | 7 | use Doctrine\ORM\Mapping\FetchMode; |
9 | 8 | use Doctrine\Tests\Models\CMS\CmsArticle; |
10 | 9 | use Doctrine\Tests\Models\CMS\CmsGroup; |
@@ -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 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $this->useModelSet('ddc2504'); |
44 | 44 | parent::setUp(); |
45 | 45 | |
46 | - $class = $this->em->getClassMetadata(CmsUser::class); |
|
46 | + $class = $this->em->getClassMetadata(CmsUser::class); |
|
47 | 47 | |
48 | 48 | $class->getProperty('groups')->setFetchMode(FetchMode::EXTRA_LAZY); |
49 | 49 | $class->getProperty('articles')->setFetchMode(FetchMode::EXTRA_LAZY); |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | |
305 | 305 | $queryCount = $this->getCurrentQueryCount(); |
306 | 306 | self::assertFalse($user->articles->contains($article)); |
307 | - self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed."); |
|
307 | + self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed."); |
|
308 | 308 | self::assertFalse($user->articles->isInitialized(), "Post-Condition: Collection is not initialized."); |
309 | 309 | |
310 | 310 | // Test One to Many existence with state managed |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | |
472 | 472 | $queryCount = $this->getCurrentQueryCount(); |
473 | 473 | self::assertTrue($group->users->contains($user)); |
474 | - self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed."); |
|
474 | + self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed."); |
|
475 | 475 | self::assertFalse($user->groups->isInitialized(), "Post-Condition: Collection is not initialized."); |
476 | 476 | |
477 | 477 | $newUser = new CmsUser(); |
@@ -1251,7 +1251,7 @@ discard block |
||
1251 | 1251 | $user = new User(); |
1252 | 1252 | $userList = new UserList(); |
1253 | 1253 | |
1254 | - $user->name = 'ocramius'; |
|
1254 | + $user->name = 'ocramius'; |
|
1255 | 1255 | $userList->listName = 'PHP Developers to follow closely'; |
1256 | 1256 | |
1257 | 1257 | $user->addUserList($userList); |
@@ -6,8 +6,6 @@ |
||
6 | 6 | |
7 | 7 | use Doctrine\ORM\Mapping\FetchMode; |
8 | 8 | use Doctrine\Tests\Models\ECommerce\ECommerceProduct; |
9 | -use Doctrine\ORM\Mapping\AssociationMapping; |
|
10 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
11 | 9 | |
12 | 10 | /** |
13 | 11 | * Tests a self referential many-to-many association mapping (from a model to the same model, without inheritance). |
@@ -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 |
@@ -7,8 +7,6 @@ |
||
7 | 7 | use Doctrine\ORM\Mapping\FetchMode; |
8 | 8 | use Doctrine\Tests\Models\ECommerce\ECommerceCart; |
9 | 9 | use Doctrine\Tests\Models\ECommerce\ECommerceProduct; |
10 | -use Doctrine\ORM\Mapping\AssociationMapping; |
|
11 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
12 | 10 | |
13 | 11 | /** |
14 | 12 | * Tests a unidirectional many-to-many association mapping (without inheritance). |
@@ -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 |
@@ -100,6 +100,9 @@ discard block |
||
100 | 100 | $this->listeners[] = $listener; |
101 | 101 | } |
102 | 102 | |
103 | + /** |
|
104 | + * @param string $propName |
|
105 | + */ |
|
103 | 106 | protected function onPropertyChanged($propName, $oldValue, $newValue) { |
104 | 107 | if ($this->listeners) { |
105 | 108 | foreach ($this->listeners as $listener) { |
@@ -132,6 +135,9 @@ discard block |
||
132 | 135 | return $this->name; |
133 | 136 | } |
134 | 137 | |
138 | + /** |
|
139 | + * @param string $name |
|
140 | + */ |
|
135 | 141 | public function setName($name) { |
136 | 142 | $this->onPropertyChanged('name', $this->name, $name); |
137 | 143 | $this->name = $name; |
@@ -165,6 +171,9 @@ discard block |
||
165 | 171 | return $this->name; |
166 | 172 | } |
167 | 173 | |
174 | + /** |
|
175 | + * @param string $name |
|
176 | + */ |
|
168 | 177 | public function setName($name) { |
169 | 178 | $this->onPropertyChanged('name', $this->name, $name); |
170 | 179 | $this->name = $name; |
@@ -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,8 +4,6 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
7 | -use Doctrine\ORM\Mapping\AssociationMapping; |
|
8 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
9 | 7 | use Doctrine\ORM\Mapping\FetchMode; |
10 | 8 | use Doctrine\Tests\Models\ECommerce\ECommerceCategory; |
11 | 9 | use Doctrine\Tests\OrmFunctionalTestCase; |
@@ -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 |