@@ -57,7 +57,7 @@ |
||
| 57 | 57 | /** |
| 58 | 58 | * Constructor. |
| 59 | 59 | * |
| 60 | - * @param Query|QueryBuilder $query A Doctrine ORM query or query builder. |
|
| 60 | + * @param Query $query A Doctrine ORM query or query builder. |
|
| 61 | 61 | * @param boolean $fetchJoinCollection Whether the query joins a collection (true by default). |
| 62 | 62 | */ |
| 63 | 63 | public function __construct($query, $fetchJoinCollection = true) |
@@ -1237,7 +1237,7 @@ discard block |
||
| 1237 | 1237 | /** |
| 1238 | 1238 | * Schedules an entity for being updated. |
| 1239 | 1239 | * |
| 1240 | - * @param object $entity The entity to schedule for being updated. |
|
| 1240 | + * @param \Doctrine\Tests\Models\Forum\ForumUser $entity The entity to schedule for being updated. |
|
| 1241 | 1241 | * |
| 1242 | 1242 | * @return void |
| 1243 | 1243 | * |
@@ -1305,7 +1305,7 @@ discard block |
||
| 1305 | 1305 | /** |
| 1306 | 1306 | * Checks whether an entity is registered to be checked in the unit of work. |
| 1307 | 1307 | * |
| 1308 | - * @param object $entity |
|
| 1308 | + * @param \Doctrine\Tests\ORM\NotifyChangedEntity $entity |
|
| 1309 | 1309 | * |
| 1310 | 1310 | * @return boolean |
| 1311 | 1311 | */ |
@@ -3121,7 +3121,7 @@ discard block |
||
| 3121 | 3121 | * |
| 3122 | 3122 | * @param object $entity The entity that owns the property. |
| 3123 | 3123 | * @param string $propertyName The name of the property that changed. |
| 3124 | - * @param mixed $oldValue The old value of the property. |
|
| 3124 | + * @param null|integer $oldValue The old value of the property. |
|
| 3125 | 3125 | * @param mixed $newValue The new value of the property. |
| 3126 | 3126 | * |
| 3127 | 3127 | * @return void |
@@ -3321,7 +3321,7 @@ discard block |
||
| 3321 | 3321 | /** |
| 3322 | 3322 | * Verifies if two given entities actually are the same based on identifier comparison |
| 3323 | 3323 | * |
| 3324 | - * @param object $entity1 |
|
| 3324 | + * @param Proxy $entity1 |
|
| 3325 | 3325 | * @param object $entity2 |
| 3326 | 3326 | * |
| 3327 | 3327 | * @return bool |
@@ -26,7 +26,6 @@ discard block |
||
| 26 | 26 | use Exception; |
| 27 | 27 | use InvalidArgumentException; |
| 28 | 28 | use UnexpectedValueException; |
| 29 | - |
|
| 30 | 29 | use Doctrine\Common\Collections\ArrayCollection; |
| 31 | 30 | use Doctrine\Common\Collections\Collection; |
| 32 | 31 | use Doctrine\Common\NotifyPropertyChanged; |
@@ -34,14 +33,12 @@ discard block |
||
| 34 | 33 | use Doctrine\Common\Persistence\ObjectManagerAware; |
| 35 | 34 | use Doctrine\ORM\Mapping\ClassMetadata; |
| 36 | 35 | use Doctrine\ORM\Proxy\Proxy; |
| 37 | - |
|
| 38 | 36 | use Doctrine\ORM\Event\LifecycleEventArgs; |
| 39 | 37 | use Doctrine\ORM\Event\PreUpdateEventArgs; |
| 40 | 38 | use Doctrine\ORM\Event\PreFlushEventArgs; |
| 41 | 39 | use Doctrine\ORM\Event\OnFlushEventArgs; |
| 42 | 40 | use Doctrine\ORM\Event\PostFlushEventArgs; |
| 43 | 41 | use Doctrine\ORM\Event\ListenersInvoker; |
| 44 | - |
|
| 45 | 42 | use Doctrine\ORM\Cache\Persister\CachedPersister; |
| 46 | 43 | use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; |
| 47 | 44 | use Doctrine\ORM\Persisters\Entity\SingleTablePersister; |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | $state = $this->getEntityState($entity); |
| 464 | 464 | |
| 465 | 465 | if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { |
| 466 | - throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)); |
|
| 466 | + throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity)); |
|
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | $class = $this->em->getClassMetadata(get_class($entity)); |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | $oid = spl_object_hash($entity); |
| 524 | 524 | $data = array(); |
| 525 | 525 | |
| 526 | - if (!isset($this->entityChangeSets[$oid])) { |
|
| 526 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
| 527 | 527 | return $data; |
| 528 | 528 | } |
| 529 | 529 | |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | } |
| 619 | 619 | |
| 620 | 620 | if (( ! $class->isIdentifier($name) || ! $class->isIdGeneratorIdentity()) |
| 621 | - && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 621 | + && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 622 | 622 | $actualData[$name] = $value; |
| 623 | 623 | } |
| 624 | 624 | } |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | if ($owner === null) { // cloned |
| 688 | 688 | $actualValue->setOwner($entity, $assoc); |
| 689 | 689 | } else if ($owner !== $entity) { // no clone, we have to fix |
| 690 | - if (!$actualValue->isInitialized()) { |
|
| 690 | + if ( ! $actualValue->isInitialized()) { |
|
| 691 | 691 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
| 692 | 692 | } |
| 693 | 693 | $newValue = clone $actualValue; |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
| 834 | 834 | |
| 835 | 835 | foreach ($unwrappedValue as $key => $entry) { |
| 836 | - if (! ($entry instanceof $targetClass->name)) { |
|
| 836 | + if ( ! ($entry instanceof $targetClass->name)) { |
|
| 837 | 837 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry); |
| 838 | 838 | } |
| 839 | 839 | |
@@ -1164,7 +1164,7 @@ discard block |
||
| 1164 | 1164 | |
| 1165 | 1165 | $joinColumns = reset($assoc['joinColumns']); |
| 1166 | 1166 | |
| 1167 | - $calc->addDependency($targetClass->name, $class->name, (int)empty($joinColumns['nullable'])); |
|
| 1167 | + $calc->addDependency($targetClass->name, $class->name, (int) empty($joinColumns['nullable'])); |
|
| 1168 | 1168 | |
| 1169 | 1169 | // If the target class has mapped subclasses, these share the same dependency. |
| 1170 | 1170 | if ( ! $targetClass->subClasses) { |
@@ -1691,7 +1691,7 @@ discard block |
||
| 1691 | 1691 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
| 1692 | 1692 | |
| 1693 | 1693 | default: |
| 1694 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1694 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1695 | 1695 | } |
| 1696 | 1696 | |
| 1697 | 1697 | $this->cascadePersist($entity, $visited); |
@@ -1761,7 +1761,7 @@ discard block |
||
| 1761 | 1761 | case self::STATE_DETACHED: |
| 1762 | 1762 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
| 1763 | 1763 | default: |
| 1764 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1764 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1765 | 1765 | } |
| 1766 | 1766 | |
| 1767 | 1767 | } |
@@ -1911,7 +1911,7 @@ discard block |
||
| 1911 | 1911 | */ |
| 1912 | 1912 | private function isLoaded($entity) |
| 1913 | 1913 | { |
| 1914 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
| 1914 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
| 1915 | 1915 | } |
| 1916 | 1916 | |
| 1917 | 1917 | /** |
@@ -2070,7 +2070,7 @@ discard block |
||
| 2070 | 2070 | |
| 2071 | 2071 | $associationMappings = array_filter( |
| 2072 | 2072 | $class->associationMappings, |
| 2073 | - function ($assoc) { return in_array('refresh', $assoc['cascade']); } |
|
| 2073 | + function($assoc) { return in_array('refresh', $assoc['cascade']); } |
|
| 2074 | 2074 | ); |
| 2075 | 2075 | |
| 2076 | 2076 | foreach ($associationMappings as $assoc) { |
@@ -2113,7 +2113,7 @@ discard block |
||
| 2113 | 2113 | |
| 2114 | 2114 | $associationMappings = array_filter( |
| 2115 | 2115 | $class->associationMappings, |
| 2116 | - function ($assoc) { return in_array('detach', $assoc['cascade']); } |
|
| 2116 | + function($assoc) { return in_array('detach', $assoc['cascade']); } |
|
| 2117 | 2117 | ); |
| 2118 | 2118 | |
| 2119 | 2119 | foreach ($associationMappings as $assoc) { |
@@ -2157,7 +2157,7 @@ discard block |
||
| 2157 | 2157 | |
| 2158 | 2158 | $associationMappings = array_filter( |
| 2159 | 2159 | $class->associationMappings, |
| 2160 | - function ($assoc) { return in_array('merge', $assoc['cascade']); } |
|
| 2160 | + function($assoc) { return in_array('merge', $assoc['cascade']); } |
|
| 2161 | 2161 | ); |
| 2162 | 2162 | |
| 2163 | 2163 | foreach ($associationMappings as $assoc) { |
@@ -2196,7 +2196,7 @@ discard block |
||
| 2196 | 2196 | |
| 2197 | 2197 | $associationMappings = array_filter( |
| 2198 | 2198 | $class->associationMappings, |
| 2199 | - function ($assoc) { return in_array('persist', $assoc['cascade']); } |
|
| 2199 | + function($assoc) { return in_array('persist', $assoc['cascade']); } |
|
| 2200 | 2200 | ); |
| 2201 | 2201 | |
| 2202 | 2202 | foreach ($associationMappings as $assoc) { |
@@ -2225,7 +2225,7 @@ discard block |
||
| 2225 | 2225 | break; |
| 2226 | 2226 | |
| 2227 | 2227 | case ($relatedEntities !== null): |
| 2228 | - if (! $relatedEntities instanceof $assoc['targetEntity']) { |
|
| 2228 | + if ( ! $relatedEntities instanceof $assoc['targetEntity']) { |
|
| 2229 | 2229 | throw ORMInvalidArgumentException::invalidAssociation( |
| 2230 | 2230 | $this->em->getClassMetadata($assoc['targetEntity']), |
| 2231 | 2231 | $assoc, |
@@ -2256,13 +2256,13 @@ discard block |
||
| 2256 | 2256 | |
| 2257 | 2257 | $associationMappings = array_filter( |
| 2258 | 2258 | $class->associationMappings, |
| 2259 | - function ($assoc) { return in_array('remove', $assoc['cascade']); } |
|
| 2259 | + function($assoc) { return in_array('remove', $assoc['cascade']); } |
|
| 2260 | 2260 | ); |
| 2261 | 2261 | |
| 2262 | 2262 | $entitiesToCascade = array(); |
| 2263 | 2263 | |
| 2264 | 2264 | foreach ($associationMappings as $assoc) { |
| 2265 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
| 2265 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
| 2266 | 2266 | $entity->__load(); |
| 2267 | 2267 | } |
| 2268 | 2268 | |
@@ -2326,7 +2326,7 @@ discard block |
||
| 2326 | 2326 | return; |
| 2327 | 2327 | } |
| 2328 | 2328 | |
| 2329 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
| 2329 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
| 2330 | 2330 | $entity->__load(); |
| 2331 | 2331 | } |
| 2332 | 2332 | |
@@ -2341,7 +2341,7 @@ discard block |
||
| 2341 | 2341 | case LockMode::NONE === $lockMode: |
| 2342 | 2342 | case LockMode::PESSIMISTIC_READ === $lockMode: |
| 2343 | 2343 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
| 2344 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
| 2344 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
| 2345 | 2345 | throw TransactionRequiredException::transactionRequired(); |
| 2346 | 2346 | } |
| 2347 | 2347 | |
@@ -2671,7 +2671,7 @@ discard block |
||
| 2671 | 2671 | // then we can append this entity for eager loading! |
| 2672 | 2672 | if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER && |
| 2673 | 2673 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
| 2674 | - !$targetClass->isIdentifierComposite && |
|
| 2674 | + ! $targetClass->isIdentifierComposite && |
|
| 2675 | 2675 | $newValue instanceof Proxy && |
| 2676 | 2676 | $newValue->__isInitialized__ === false) { |
| 2677 | 2677 | |
@@ -3038,7 +3038,7 @@ discard block |
||
| 3038 | 3038 | public function getCollectionPersister(array $association) |
| 3039 | 3039 | { |
| 3040 | 3040 | $role = isset($association['cache']) |
| 3041 | - ? $association['sourceEntity'] . '::' . $association['fieldName'] |
|
| 3041 | + ? $association['sourceEntity'].'::'.$association['fieldName'] |
|
| 3042 | 3042 | : $association['type']; |
| 3043 | 3043 | |
| 3044 | 3044 | if (isset($this->collectionPersisters[$role])) { |
@@ -3255,7 +3255,7 @@ discard block |
||
| 3255 | 3255 | */ |
| 3256 | 3256 | private function afterTransactionComplete() |
| 3257 | 3257 | { |
| 3258 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 3258 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 3259 | 3259 | $persister->afterTransactionComplete(); |
| 3260 | 3260 | }); |
| 3261 | 3261 | } |
@@ -3265,7 +3265,7 @@ discard block |
||
| 3265 | 3265 | */ |
| 3266 | 3266 | private function afterTransactionRolledBack() |
| 3267 | 3267 | { |
| 3268 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 3268 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 3269 | 3269 | $persister->afterTransactionRolledBack(); |
| 3270 | 3270 | }); |
| 3271 | 3271 | } |
@@ -3364,7 +3364,7 @@ discard block |
||
| 3364 | 3364 | if ($other === null) { |
| 3365 | 3365 | $prop->setValue($managedCopy, null); |
| 3366 | 3366 | } else { |
| 3367 | - if ($other instanceof Proxy && !$other->__isInitialized()) { |
|
| 3367 | + if ($other instanceof Proxy && ! $other->__isInitialized()) { |
|
| 3368 | 3368 | // do not merge fields marked lazy that have not been fetched. |
| 3369 | 3369 | continue; |
| 3370 | 3370 | } |
@@ -3453,7 +3453,7 @@ discard block |
||
| 3453 | 3453 | */ |
| 3454 | 3454 | private function clearIdentityMapForEntityName($entityName) |
| 3455 | 3455 | { |
| 3456 | - if (! isset($this->identityMap[$entityName])) { |
|
| 3456 | + if ( ! isset($this->identityMap[$entityName])) { |
|
| 3457 | 3457 | return; |
| 3458 | 3458 | } |
| 3459 | 3459 | |
@@ -38,7 +38,6 @@ |
||
| 38 | 38 | * Dequeue an exception for a specific method invocation |
| 39 | 39 | * |
| 40 | 40 | * @param string $method |
| 41 | - * @param mixed $default |
|
| 42 | 41 | * |
| 43 | 42 | * @return mixed |
| 44 | 43 | */ |
@@ -28,6 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * {@inheritdoc} |
| 31 | + * @param \Doctrine\Tests\ORM\NotifyChangedEntity $entity |
|
| 31 | 32 | */ |
| 32 | 33 | public function getEntityChangeSet($entity) |
| 33 | 34 | { |
@@ -51,6 +51,9 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public $complexAction; |
| 53 | 53 | |
| 54 | + /** |
|
| 55 | + * @param string $token |
|
| 56 | + */ |
|
| 54 | 57 | public function __construct($token, Client $client = null) |
| 55 | 58 | { |
| 56 | 59 | $this->logins = new ArrayCollection(); |
@@ -19,6 +19,9 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | private $brand; |
| 21 | 21 | |
| 22 | + /** |
|
| 23 | + * @param string $brand |
|
| 24 | + */ |
|
| 22 | 25 | public function __construct($brand = null) { |
| 23 | 26 | $this->brand = $brand; |
| 24 | 27 | } |
@@ -79,6 +79,9 @@ discard block |
||
| 79 | 79 | return $this->hoursWorked; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | + /** |
|
| 83 | + * @param integer $hoursWorked |
|
| 84 | + */ |
|
| 82 | 85 | public function setHoursWorked($hoursWorked) |
| 83 | 86 | { |
| 84 | 87 | $this->hoursWorked = $hoursWorked; |
@@ -89,6 +92,9 @@ discard block |
||
| 89 | 92 | return $this->pricePerHour; |
| 90 | 93 | } |
| 91 | 94 | |
| 95 | + /** |
|
| 96 | + * @param integer $pricePerHour |
|
| 97 | + */ |
|
| 92 | 98 | public function setPricePerHour($pricePerHour) |
| 93 | 99 | { |
| 94 | 100 | $this->pricePerHour = $pricePerHour; |
@@ -33,6 +33,9 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | private $links; |
| 35 | 35 | |
| 36 | + /** |
|
| 37 | + * @param string $title |
|
| 38 | + */ |
|
| 36 | 39 | public function __construct($title) |
| 37 | 40 | { |
| 38 | 41 | $this->title = $title; |
@@ -60,6 +63,10 @@ discard block |
||
| 60 | 63 | return $this->references; |
| 61 | 64 | } |
| 62 | 65 | |
| 66 | + /** |
|
| 67 | + * @param string $language |
|
| 68 | + * @param string $title |
|
| 69 | + */ |
|
| 63 | 70 | public function addTranslation($language, $title) |
| 64 | 71 | { |
| 65 | 72 | $this->translations[] = new DDC117Translation($this, $language, $title); |
@@ -23,6 +23,11 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public $target; |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param DDC117Article $source |
|
| 28 | + * @param DDC117Article $target |
|
| 29 | + * @param string $description |
|
| 30 | + */ |
|
| 26 | 31 | public function __construct($source, $target, $description) |
| 27 | 32 | { |
| 28 | 33 | $this->source = $source; |