@@ -139,6 +139,9 @@ discard block |
||
139 | 139 | ); |
140 | 140 | } |
141 | 141 | |
142 | + /** |
|
143 | + * @param string $entityName |
|
144 | + */ |
|
142 | 145 | protected function asyncFindWithLock($entityName, $entityId, $lockMode) |
143 | 146 | { |
144 | 147 | $this->startJob('findWithLock', array( |
@@ -148,6 +151,9 @@ discard block |
||
148 | 151 | )); |
149 | 152 | } |
150 | 153 | |
154 | + /** |
|
155 | + * @param string $dql |
|
156 | + */ |
|
151 | 157 | protected function asyncDqlWithLock($dql, $params, $lockMode) |
152 | 158 | { |
153 | 159 | $this->startJob('dqlWithLock', array( |
@@ -157,6 +163,9 @@ discard block |
||
157 | 163 | )); |
158 | 164 | } |
159 | 165 | |
166 | + /** |
|
167 | + * @param string $entityName |
|
168 | + */ |
|
160 | 169 | protected function asyncLock($entityName, $entityId, $lockMode) |
161 | 170 | { |
162 | 171 | $this->startJob('lock', array( |
@@ -166,6 +175,9 @@ discard block |
||
166 | 175 | )); |
167 | 176 | } |
168 | 177 | |
178 | + /** |
|
179 | + * @param string $fn |
|
180 | + */ |
|
169 | 181 | protected function startJob($fn, $fixture) |
170 | 182 | { |
171 | 183 | $this->gearman->addTask($fn, serialize(array( |
@@ -2,10 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional\Locking; |
4 | 4 | |
5 | -use Doctrine\Tests\Models\CMS\CmsArticle, |
|
6 | - Doctrine\Tests\Models\CMS\CmsUser, |
|
7 | - Doctrine\DBAL\LockMode, |
|
8 | - Doctrine\ORM\EntityManager; |
|
5 | +use Doctrine\Tests\Models\CMS\CmsArticle; |
|
6 | +use Doctrine\DBAL\LockMode; |
|
9 | 7 | |
10 | 8 | /** |
11 | 9 | * @group locking_functional |
@@ -2,10 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional\Locking; |
4 | 4 | |
5 | -use Doctrine\Tests\Models\CMS\CmsArticle, |
|
6 | - Doctrine\Tests\Models\CMS\CmsUser, |
|
7 | - Doctrine\DBAL\LockMode, |
|
8 | - Doctrine\ORM\EntityManager; |
|
5 | +use Doctrine\Tests\Models\CMS\CmsArticle; |
|
6 | +use Doctrine\Tests\Models\CMS\CmsUser; |
|
7 | +use Doctrine\DBAL\LockMode; |
|
9 | 8 | |
10 | 9 | /** |
11 | 10 | * @group locking |
@@ -2,11 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional\Locking; |
4 | 4 | |
5 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
6 | 5 | use Doctrine\ORM\OptimisticLockException; |
7 | -use Doctrine\Common\EventManager; |
|
8 | -use Doctrine\ORM\Mapping\ClassMetadataFactory; |
|
9 | -use Doctrine\Tests\TestUtil; |
|
10 | 6 | use Doctrine\DBAL\LockMode; |
11 | 7 | use DateTime; |
12 | 8 |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Doctrine\Tests\ORM\Functional; |
4 | 4 | |
5 | 5 | use Doctrine\Common\Collections\Criteria; |
6 | -use Doctrine\Tests\Models\CMS\CmsUser, |
|
7 | - Doctrine\Tests\Models\CMS\CmsGroup, |
|
8 | - Doctrine\Common\Collections\ArrayCollection; |
|
6 | +use Doctrine\Tests\Models\CMS\CmsUser; |
|
7 | +use Doctrine\Tests\Models\CMS\CmsGroup; |
|
8 | +use Doctrine\Common\Collections\ArrayCollection; |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Basic many-to-many association tests. |
@@ -141,6 +141,9 @@ |
||
141 | 141 | return $this->session; |
142 | 142 | } |
143 | 143 | |
144 | + /** |
|
145 | + * @param string $session |
|
146 | + */ |
|
144 | 147 | public function setSession($session) |
145 | 148 | { |
146 | 149 | $this->session = $session; |
@@ -21,7 +21,6 @@ |
||
21 | 21 | |
22 | 22 | use Doctrine\Common\Collections\ArrayCollection; |
23 | 23 | use Doctrine\Common\Collections\Criteria; |
24 | - |
|
25 | 24 | use Doctrine\ORM\Query\Expr; |
26 | 25 | use Doctrine\ORM\Query\QueryExpressionVisitor; |
27 | 26 |
@@ -94,6 +94,9 @@ discard block |
||
94 | 94 | $this->listeners[] = $listener; |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @param string $propName |
|
99 | + */ |
|
97 | 100 | protected function onPropertyChanged($propName, $oldValue, $newValue) { |
98 | 101 | if ($this->listeners) { |
99 | 102 | foreach ($this->listeners as $listener) { |
@@ -126,6 +129,9 @@ discard block |
||
126 | 129 | return $this->name; |
127 | 130 | } |
128 | 131 | |
132 | + /** |
|
133 | + * @param string $name |
|
134 | + */ |
|
129 | 135 | function setName($name) { |
130 | 136 | $this->onPropertyChanged('name', $this->name, $name); |
131 | 137 | $this->name = $name; |
@@ -159,6 +165,9 @@ discard block |
||
159 | 165 | return $this->name; |
160 | 166 | } |
161 | 167 | |
168 | + /** |
|
169 | + * @param string $name |
|
170 | + */ |
|
162 | 171 | function setName($name) { |
163 | 172 | $this->onPropertyChanged('name', $this->name, $name); |
164 | 173 | $this->name = $name; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Doctrine\Tests\ORM\Functional; |
3 | 3 | |
4 | -use Doctrine\Common\Collections\ArrayCollection, |
|
5 | - Doctrine\Common\NotifyPropertyChanged, |
|
6 | - Doctrine\Common\PropertyChangedListener; |
|
4 | +use Doctrine\Common\Collections\ArrayCollection; |
|
5 | +use Doctrine\Common\NotifyPropertyChanged; |
|
6 | +use Doctrine\Common\PropertyChangedListener; |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * NativeQueryTest |
@@ -2,9 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional; |
4 | 4 | |
5 | -use Doctrine\Tests\Models\CMS\CmsUser, |
|
6 | - Doctrine\Tests\Models\CMS\CmsAddress, |
|
7 | - Doctrine\Tests\Models\CMS\CmsPhonenumber; |
|
5 | +use Doctrine\Tests\Models\CMS\CmsUser; |
|
6 | +use Doctrine\Tests\Models\CMS\CmsPhonenumber; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * Tests a bidirectional one-to-many association mapping with orphan removal. |
@@ -286,6 +286,9 @@ discard block |
||
286 | 286 | */ |
287 | 287 | public $train; |
288 | 288 | |
289 | + /** |
|
290 | + * @param string $name |
|
291 | + */ |
|
289 | 292 | public function __construct($name) |
290 | 293 | { |
291 | 294 | $this->name = $name; |
@@ -312,6 +315,9 @@ discard block |
||
312 | 315 | */ |
313 | 316 | public $train; |
314 | 317 | |
318 | + /** |
|
319 | + * @param string $name |
|
320 | + */ |
|
315 | 321 | public function __construct($name) |
316 | 322 | { |
317 | 323 | $this->name = $name; |
@@ -336,6 +342,9 @@ discard block |
||
336 | 342 | */ |
337 | 343 | public $train; |
338 | 344 | |
345 | + /** |
|
346 | + * @param Train $train |
|
347 | + */ |
|
339 | 348 | public function setTrain($train) |
340 | 349 | { |
341 | 350 | $this->train = $train; |