@@ -48,6 +48,9 @@ |
||
48 | 48 | $this->_em = $this->_getTestEntityManager(); |
49 | 49 | } |
50 | 50 | |
51 | + /** |
|
52 | + * @param string $expectedDql |
|
53 | + */ |
|
51 | 54 | protected function assertValidQueryBuilder(QueryBuilder $qb, $expectedDql) |
52 | 55 | { |
53 | 56 | $dql = $qb->getDql(); |
@@ -22,9 +22,7 @@ |
||
22 | 22 | use Shitty\Common\Collections\ArrayCollection; |
23 | 23 | use Shitty\Common\Collections\Criteria; |
24 | 24 | use Shitty\ORM\Cache; |
25 | - |
|
26 | 25 | use Shitty\ORM\QueryBuilder; |
27 | -use Shitty\ORM\Query\Expr; |
|
28 | 26 | use Shitty\ORM\Query\Parameter; |
29 | 27 | use Shitty\ORM\Query\ParameterTypeInferer; |
30 | 28 |
@@ -43,6 +43,9 @@ |
||
43 | 43 | */ |
44 | 44 | class ConvertDoctrine1SchemaTest extends \Shitty\Tests\OrmTestCase |
45 | 45 | { |
46 | + /** |
|
47 | + * @param \Shitty\ORM\Mapping\Driver\YamlDriver $metadataDriver |
|
48 | + */ |
|
46 | 49 | protected function _createEntityManager($metadataDriver) |
47 | 50 | { |
48 | 51 | $driverMock = new DriverMock(); |
@@ -24,7 +24,6 @@ |
||
24 | 24 | use Shitty\ORM\Tools\Export\ClassMetadataExporter; |
25 | 25 | use Shitty\ORM\Tools\ConvertDoctrine1Schema; |
26 | 26 | use Shitty\Tests\Mocks\MetadataDriverMock; |
27 | -use Shitty\Tests\Mocks\DatabasePlatformMock; |
|
28 | 27 | use Shitty\Tests\Mocks\EntityManagerMock; |
29 | 28 | use Shitty\Tests\Mocks\ConnectionMock; |
30 | 29 | use Shitty\Tests\Mocks\DriverMock; |
@@ -1079,7 +1079,7 @@ discard block |
||
1079 | 1079 | |
1080 | 1080 | /** |
1081 | 1081 | * @param string $type |
1082 | - * @param \ReflectionProperty $method |
|
1082 | + * @param \ReflectionMethod $method |
|
1083 | 1083 | */ |
1084 | 1084 | private function assertPhpDocReturnType($type, \ReflectionMethod $method) |
1085 | 1085 | { |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | |
1090 | 1090 | /** |
1091 | 1091 | * @param string $type |
1092 | - * @param \ReflectionProperty $method |
|
1092 | + * @param \ReflectionMethod $method |
|
1093 | 1093 | */ |
1094 | 1094 | private function assertPhpDocParamType($type, \ReflectionMethod $method) |
1095 | 1095 | { |
@@ -63,6 +63,9 @@ discard block |
||
63 | 63 | return EntityManagerMock::create($conn, $config, $eventManager); |
64 | 64 | } |
65 | 65 | |
66 | + /** |
|
67 | + * @param string $path |
|
68 | + */ |
|
66 | 69 | protected function _createMetadataDriver($type, $path) |
67 | 70 | { |
68 | 71 | $mappingDriver = array( |
@@ -82,6 +85,9 @@ discard block |
||
82 | 85 | return $driver; |
83 | 86 | } |
84 | 87 | |
88 | + /** |
|
89 | + * @param EntityManagerMock $em |
|
90 | + */ |
|
85 | 91 | protected function _createClassMetadataFactory($em, $type) |
86 | 92 | { |
87 | 93 | $factory = ($type === 'annotation') |
@@ -292,7 +298,6 @@ discard block |
||
292 | 298 | |
293 | 299 | /** |
294 | 300 | * @depends testOneToManyAssociationsAreExported |
295 | - * @param ClassMetadataInfo $metadata |
|
296 | 301 | */ |
297 | 302 | public function testManyToManyAssociationsAreExported($class) |
298 | 303 | { |
@@ -392,6 +397,9 @@ discard block |
||
392 | 397 | # $this->_deleteDirectory(__DIR__ . '/export/'.$this->_getType()); |
393 | 398 | } |
394 | 399 | |
400 | + /** |
|
401 | + * @param string $path |
|
402 | + */ |
|
395 | 403 | protected function _deleteDirectory($path) |
396 | 404 | { |
397 | 405 | if (is_file($path)) { |
@@ -25,7 +25,6 @@ |
||
25 | 25 | use Shitty\ORM\Mapping\ClassMetadataInfo; |
26 | 26 | use Shitty\ORM\Tools\EntityGenerator; |
27 | 27 | use Shitty\Tests\Mocks\MetadataDriverMock; |
28 | -use Shitty\Tests\Mocks\DatabasePlatformMock; |
|
29 | 28 | use Shitty\Tests\Mocks\EntityManagerMock; |
30 | 29 | use Shitty\Tests\Mocks\ConnectionMock; |
31 | 30 | use Shitty\Tests\Mocks\DriverMock; |
@@ -373,6 +373,9 @@ discard block |
||
373 | 373 | return $this->items; |
374 | 374 | } |
375 | 375 | |
376 | + /** |
|
377 | + * @param string $value |
|
378 | + */ |
|
376 | 379 | public function setTransient($value) { |
377 | 380 | if ($value != $this->transient) { |
378 | 381 | $this->_onPropertyChanged('transient', $this->transient, $value); |
@@ -384,6 +387,9 @@ discard block |
||
384 | 387 | return $this->data; |
385 | 388 | } |
386 | 389 | |
390 | + /** |
|
391 | + * @param string $data |
|
392 | + */ |
|
387 | 393 | public function setData($data) { |
388 | 394 | if ($data != $this->data) { |
389 | 395 | $this->_onPropertyChanged('data', $this->data, $data); |
@@ -396,6 +402,9 @@ discard block |
||
396 | 402 | $this->_listeners[] = $listener; |
397 | 403 | } |
398 | 404 | |
405 | + /** |
|
406 | + * @param string $propName |
|
407 | + */ |
|
399 | 408 | protected function _onPropertyChanged($propName, $oldValue, $newValue) { |
400 | 409 | if ($this->_listeners) { |
401 | 410 | foreach ($this->_listeners as $listener) { |
@@ -426,6 +435,9 @@ discard block |
||
426 | 435 | return $this->owner; |
427 | 436 | } |
428 | 437 | |
438 | + /** |
|
439 | + * @param NotifyChangedEntity|null $owner |
|
440 | + */ |
|
429 | 441 | public function setOwner($owner) { |
430 | 442 | $this->owner = $owner; |
431 | 443 | } |
@@ -556,7 +556,7 @@ |
||
556 | 556 | } |
557 | 557 | |
558 | 558 | /** |
559 | - * @param array $classNames |
|
559 | + * @param string[] $classNames |
|
560 | 560 | * |
561 | 561 | * @return void |
562 | 562 | * |
@@ -52,7 +52,7 @@ |
||
52 | 52 | protected $secondLevelCacheDriverImpl = null; |
53 | 53 | |
54 | 54 | /** |
55 | - * @param array $paths |
|
55 | + * @param string[] $paths |
|
56 | 56 | * @param mixed $alias |
57 | 57 | * |
58 | 58 | * @return \Doctrine\ORM\Mapping\Driver\AnnotationDriver |
@@ -242,17 +242,17 @@ |
||
242 | 242 | public function getUnitOfWork(); |
243 | 243 | |
244 | 244 | /** |
245 | - * Gets a hydrator for the given hydration mode. |
|
246 | - * |
|
247 | - * This method caches the hydrator instances which is used for all queries that don't |
|
248 | - * selectively iterate over the result. |
|
249 | - * |
|
250 | - * @deprecated |
|
251 | - * |
|
252 | - * @param int $hydrationMode |
|
253 | - * |
|
254 | - * @return \Shitty\ORM\Internal\Hydration\AbstractHydrator |
|
255 | - */ |
|
245 | + * Gets a hydrator for the given hydration mode. |
|
246 | + * |
|
247 | + * This method caches the hydrator instances which is used for all queries that don't |
|
248 | + * selectively iterate over the result. |
|
249 | + * |
|
250 | + * @deprecated |
|
251 | + * |
|
252 | + * @param int $hydrationMode |
|
253 | + * |
|
254 | + * @return \Shitty\ORM\Internal\Hydration\AbstractHydrator |
|
255 | + */ |
|
256 | 256 | public function getHydrator($hydrationMode); |
257 | 257 | |
258 | 258 | /** |
@@ -170,7 +170,7 @@ |
||
170 | 170 | |
171 | 171 | // Recognize identifiers, aliased or qualified names |
172 | 172 | case (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\'): |
173 | - $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); |
|
173 | + $name = 'Doctrine\ORM\Query\Lexer::T_'.strtoupper($value); |
|
174 | 174 | |
175 | 175 | if (defined($name)) { |
176 | 176 | $type = constant($name); |