@@ -48,9 +48,9 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public static function emptyDiscriminatorValue($dqlAlias) |
| 50 | 50 | { |
| 51 | - return new self("The DQL alias '" . $dqlAlias . "' contains an entity ". |
|
| 52 | - "of an inheritance hierarchy with an empty discriminator value. This means " . |
|
| 53 | - "that the database contains inconsistent data with an empty " . |
|
| 51 | + return new self("The DQL alias '".$dqlAlias."' contains an entity ". |
|
| 52 | + "of an inheritance hierarchy with an empty discriminator value. This means ". |
|
| 53 | + "that the database contains inconsistent data with an empty ". |
|
| 54 | 54 | "discriminator value in a table row." |
| 55 | 55 | ); |
| 56 | 56 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $class->reflFields[$fieldName]->setValue($entity, $value); |
| 203 | 203 | $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value); |
| 204 | 204 | |
| 205 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 205 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 206 | 206 | } else if ( |
| 207 | 207 | isset($this->_hints[Query::HINT_REFRESH]) || |
| 208 | 208 | isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) && |
@@ -213,10 +213,10 @@ discard block |
||
| 213 | 213 | $value->setInitialized(true); |
| 214 | 214 | $value->unwrap()->clear(); |
| 215 | 215 | |
| 216 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 216 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 217 | 217 | } else { |
| 218 | 218 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
| 219 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
| 219 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | return $value; |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $idHash = ''; |
| 290 | 290 | |
| 291 | 291 | foreach ($class->identifier as $fieldName) { |
| 292 | - $idHash .= ' ' . (isset($class->associationMappings[$fieldName]) |
|
| 292 | + $idHash .= ' '.(isset($class->associationMappings[$fieldName]) |
|
| 293 | 293 | ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] |
| 294 | 294 | : $data[$fieldName]); |
| 295 | 295 | } |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | $parentAlias = $this->_rsm->parentAliasMap[$dqlAlias]; |
| 343 | 343 | // we need the $path to save into the identifier map which entities were already |
| 344 | 344 | // seen for this parent-child relationship |
| 345 | - $path = $parentAlias . '.' . $dqlAlias; |
|
| 345 | + $path = $parentAlias.'.'.$dqlAlias; |
|
| 346 | 346 | |
| 347 | 347 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
| 348 | 348 | if ( ! isset($nonemptyComponents[$parentAlias])) { |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | $reflFieldValue = $reflField->getValue($parentObject); |
| 383 | 383 | |
| 384 | 384 | if (isset($nonemptyComponents[$dqlAlias])) { |
| 385 | - $collKey = $oid . $relationField; |
|
| 385 | + $collKey = $oid.$relationField; |
|
| 386 | 386 | if (isset($this->initializedCollections[$collKey])) { |
| 387 | 387 | $reflFieldValue = $this->initializedCollections[$collKey]; |
| 388 | 388 | } else if ( ! isset($this->existingCollections[$collKey])) { |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | // PATH B: Single-valued association |
| 431 | 431 | $reflFieldValue = $reflField->getValue($parentObject); |
| 432 | 432 | |
| 433 | - if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && !$reflFieldValue->__isInitialized__)) { |
|
| 433 | + if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && ! $reflFieldValue->__isInitialized__)) { |
|
| 434 | 434 | // we only need to take action if this value is null, |
| 435 | 435 | // we refresh the entity or its an unitialized proxy. |
| 436 | 436 | if (isset($nonemptyComponents[$dqlAlias])) { |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; |
| 476 | 476 | |
| 477 | 477 | // if this row has a NULL value for the root result id then make it a null result. |
| 478 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 478 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 479 | 479 | if ($this->_rsm->isMixed) { |
| 480 | 480 | $result[] = array($entityKey => null); |
| 481 | 481 | } else { |
@@ -531,13 +531,13 @@ discard block |
||
| 531 | 531 | } |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | - if ( ! isset($resultKey) ) { |
|
| 534 | + if ( ! isset($resultKey)) { |
|
| 535 | 535 | $this->resultCounter++; |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | 538 | // Append scalar values to mixed result sets |
| 539 | 539 | if (isset($rowData['scalars'])) { |
| 540 | - if ( ! isset($resultKey) ) { |
|
| 540 | + if ( ! isset($resultKey)) { |
|
| 541 | 541 | $resultKey = (isset($this->_rsm->indexByMap['scalars'])) |
| 542 | 542 | ? $row[$this->_rsm->indexByMap['scalars']] |
| 543 | 543 | : $this->resultCounter - 1; |
@@ -550,19 +550,19 @@ discard block |
||
| 550 | 550 | |
| 551 | 551 | // Append new object to mixed result sets |
| 552 | 552 | if (isset($rowData['newObjects'])) { |
| 553 | - if ( ! isset($resultKey) ) { |
|
| 553 | + if ( ! isset($resultKey)) { |
|
| 554 | 554 | $resultKey = $this->resultCounter - 1; |
| 555 | 555 | } |
| 556 | 556 | |
| 557 | 557 | |
| 558 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
| 558 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
| 559 | 559 | |
| 560 | 560 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
| 561 | 561 | $class = $newObject['class']; |
| 562 | 562 | $args = $newObject['args']; |
| 563 | 563 | $obj = $class->newInstanceArgs($args); |
| 564 | 564 | |
| 565 | - if ($scalarCount == 0 && count($rowData['newObjects']) == 1 ) { |
|
| 565 | + if ($scalarCount == 0 && count($rowData['newObjects']) == 1) { |
|
| 566 | 566 | $result[$resultKey] = $obj; |
| 567 | 567 | |
| 568 | 568 | continue; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | : $value; |
| 300 | 300 | |
| 301 | 301 | if ($cacheKeyInfo['isIdentifier'] && $value !== null) { |
| 302 | - $id[$dqlAlias] .= '|' . $value; |
|
| 302 | + $id[$dqlAlias] .= '|'.$value; |
|
| 303 | 303 | $nonemptyComponents[$dqlAlias] = true; |
| 304 | 304 | } |
| 305 | 305 | break; |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | if ( ! isset($cacheKeyInfo['isScalar'])) { |
| 338 | 338 | $dqlAlias = $cacheKeyInfo['dqlAlias']; |
| 339 | 339 | $type = $cacheKeyInfo['type']; |
| 340 | - $fieldName = $dqlAlias . '_' . $fieldName; |
|
| 340 | + $fieldName = $dqlAlias.'_'.$fieldName; |
|
| 341 | 341 | $value = $type |
| 342 | 342 | ? $type->convertToPHPValue($value, $this->_platform) |
| 343 | 343 | : $value; |
@@ -105,6 +105,6 @@ |
||
| 105 | 105 | */ |
| 106 | 106 | public function valid() |
| 107 | 107 | { |
| 108 | - return ($this->_current!=false); |
|
| 108 | + return ($this->_current != false); |
|
| 109 | 109 | } |
| 110 | 110 | } |
@@ -715,9 +715,9 @@ |
||
| 715 | 715 | ); |
| 716 | 716 | } |
| 717 | 717 | |
| 718 | - /** |
|
| 719 | - * {@inheritdoc} |
|
| 720 | - */ |
|
| 718 | + /** |
|
| 719 | + * {@inheritdoc} |
|
| 720 | + */ |
|
| 721 | 721 | protected function getHash() |
| 722 | 722 | { |
| 723 | 723 | return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts. |
| 42 | 42 | */ |
| 43 | - const STATE_CLEAN = 1; |
|
| 43 | + const STATE_CLEAN = 1; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * A query object is in state DIRTY when it has DQL parts that have not yet been |
@@ -707,11 +707,11 @@ discard block |
||
| 707 | 707 | ->getName(); |
| 708 | 708 | |
| 709 | 709 | return md5( |
| 710 | - $this->getDql() . serialize($this->_hints) . |
|
| 711 | - '&platform=' . $platform . |
|
| 712 | - ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '') . |
|
| 713 | - '&firstResult=' . $this->_firstResult . '&maxResult=' . $this->_maxResults . |
|
| 714 | - '&hydrationMode=' . $this->_hydrationMode . '&types=' . serialize($this->_parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT' |
|
| 710 | + $this->getDql().serialize($this->_hints). |
|
| 711 | + '&platform='.$platform. |
|
| 712 | + ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : ''). |
|
| 713 | + '&firstResult='.$this->_firstResult.'&maxResult='.$this->_maxResults. |
|
| 714 | + '&hydrationMode='.$this->_hydrationMode.'&types='.serialize($this->_parsedTypes).'DOCTRINE_QUERY_CACHE_SALT' |
|
| 715 | 715 | ); |
| 716 | 716 | } |
| 717 | 717 | |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | */ |
| 721 | 721 | protected function getHash() |
| 722 | 722 | { |
| 723 | - return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults); |
|
| 723 | + return sha1(parent::getHash().'-'.$this->_firstResult.'-'.$this->_maxResults); |
|
| 724 | 724 | } |
| 725 | 725 | |
| 726 | 726 | /** |
@@ -620,7 +620,7 @@ |
||
| 620 | 620 | * Executes the query and returns an IterableResult that can be used to incrementally |
| 621 | 621 | * iterated over the result. |
| 622 | 622 | * |
| 623 | - * @param ArrayCollection|array|null $parameters The query parameters. |
|
| 623 | + * @param null|ArrayCollection $parameters The query parameters. |
|
| 624 | 624 | * @param integer $hydrationMode The hydration mode to use. |
| 625 | 625 | * |
| 626 | 626 | * @return \Doctrine\ORM\Internal\Hydration\IterableResult |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function referenceColumnName() |
| 102 | 102 | { |
| 103 | - return $this->case === CASE_UPPER ? 'ID' : 'id'; |
|
| 103 | + return $this->case === CASE_UPPER ? 'ID' : 'id'; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function joinColumnName($propertyName, $className = null) |
| 110 | 110 | { |
| 111 | - return $this->underscore($propertyName) . '_' . $this->referenceColumnName(); |
|
| 111 | + return $this->underscore($propertyName).'_'.$this->referenceColumnName(); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) |
| 118 | 118 | { |
| 119 | - return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity); |
|
| 119 | + return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public function joinKeyColumnName($entityName, $referencedColumnName = null) |
| 126 | 126 | { |
| 127 | - return $this->classToTableName($entityName) . '_' . |
|
| 127 | + return $this->classToTableName($entityName).'_'. |
|
| 128 | 128 | ($referencedColumnName ?: $this->referenceColumnName()); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -91,6 +91,6 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | public function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null) |
| 93 | 93 | { |
| 94 | - return $platform->getSQLResultCasing($columnName . '_' . $counter); |
|
| 94 | + return $platform->getSQLResultCasing($columnName.'_'.$counter); |
|
| 95 | 95 | } |
| 96 | 96 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | // Evaluate named native queries |
| 109 | 109 | if (isset($element['namedNativeQueries'])) { |
| 110 | 110 | foreach ($element['namedNativeQueries'] as $name => $mappingElement) { |
| 111 | - if (!isset($mappingElement['name'])) { |
|
| 111 | + if ( ! isset($mappingElement['name'])) { |
|
| 112 | 112 | $mappingElement['name'] = $name; |
| 113 | 113 | } |
| 114 | 114 | $metadata->addNamedNativeQuery(array( |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | // Evaluate sql result set mappings |
| 124 | 124 | if (isset($element['sqlResultSetMappings'])) { |
| 125 | 125 | foreach ($element['sqlResultSetMappings'] as $name => $resultSetMapping) { |
| 126 | - if (!isset($resultSetMapping['name'])) { |
|
| 126 | + if ( ! isset($resultSetMapping['name'])) { |
|
| 127 | 127 | $resultSetMapping['name'] = $name; |
| 128 | 128 | } |
| 129 | 129 | |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | if (isset($element['inheritanceType'])) { |
| 171 | - $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); |
|
| 171 | + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.strtoupper($element['inheritanceType']))); |
|
| 172 | 172 | |
| 173 | 173 | if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { |
| 174 | 174 | // Evaluate discriminatorColumn |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | if (isset($oneToOneElement['fetch'])) { |
| 356 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToOneElement['fetch']); |
|
| 356 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$oneToOneElement['fetch']); |
|
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | if (isset($oneToOneElement['mappedBy'])) { |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | ); |
| 408 | 408 | |
| 409 | 409 | if (isset($oneToManyElement['fetch'])) { |
| 410 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToManyElement['fetch']); |
|
| 410 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$oneToManyElement['fetch']); |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | if (isset($oneToManyElement['cascade'])) { |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | if (isset($manyToOneElement['fetch'])) { |
| 452 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToOneElement['fetch']); |
|
| 452 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$manyToOneElement['fetch']); |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | if (isset($manyToOneElement['inversedBy'])) { |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | ); |
| 495 | 495 | |
| 496 | 496 | if (isset($manyToManyElement['fetch'])) { |
| 497 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToManyElement['fetch']); |
|
| 497 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$manyToManyElement['fetch']); |
|
| 498 | 498 | } |
| 499 | 499 | |
| 500 | 500 | if (isset($manyToManyElement['mappedBy'])) { |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | if (isset($element['associationOverride']) && is_array($element['associationOverride'])) { |
| 565 | 565 | |
| 566 | 566 | foreach ($element['associationOverride'] as $fieldName => $associationOverrideElement) { |
| 567 | - $override = array(); |
|
| 567 | + $override = array(); |
|
| 568 | 568 | |
| 569 | 569 | // Check for joinColumn |
| 570 | 570 | if (isset($associationOverrideElement['joinColumn'])) { |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | if (isset($associationOverrideElement['joinTable'])) { |
| 583 | 583 | |
| 584 | 584 | $joinTableElement = $associationOverrideElement['joinTable']; |
| 585 | - $joinTable = array( |
|
| 585 | + $joinTable = array( |
|
| 586 | 586 | 'name' => $joinTableElement['name'] |
| 587 | 587 | ); |
| 588 | 588 | |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | if (isset($element['lifecycleCallbacks'])) { |
| 632 | 632 | foreach ($element['lifecycleCallbacks'] as $type => $methods) { |
| 633 | 633 | foreach ($methods as $method) { |
| 634 | - $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::' . $type)); |
|
| 634 | + $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::'.$type)); |
|
| 635 | 635 | } |
| 636 | 636 | } |
| 637 | 637 | } |
@@ -773,12 +773,12 @@ discard block |
||
| 773 | 773 | $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; |
| 774 | 774 | $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; |
| 775 | 775 | |
| 776 | - if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { |
|
| 776 | + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) { |
|
| 777 | 777 | throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); |
| 778 | 778 | } |
| 779 | 779 | |
| 780 | 780 | if ($usage) { |
| 781 | - $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); |
|
| 781 | + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage); |
|
| 782 | 782 | } |
| 783 | 783 | |
| 784 | 784 | return array( |
@@ -707,13 +707,13 @@ |
||
| 707 | 707 | return $joinColumn; |
| 708 | 708 | } |
| 709 | 709 | |
| 710 | - /** |
|
| 711 | - * Parses the given field as array. |
|
| 712 | - * |
|
| 713 | - * @param SimpleXMLElement $fieldMapping |
|
| 714 | - * |
|
| 715 | - * @return array |
|
| 716 | - */ |
|
| 710 | + /** |
|
| 711 | + * Parses the given field as array. |
|
| 712 | + * |
|
| 713 | + * @param SimpleXMLElement $fieldMapping |
|
| 714 | + * |
|
| 715 | + * @return array |
|
| 716 | + */ |
|
| 717 | 717 | private function columnToArray(SimpleXMLElement $fieldMapping) |
| 718 | 718 | { |
| 719 | 719 | $mapping = array( |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | if (isset($xmlRoot['inheritance-type'])) { |
| 159 | 159 | $inheritanceType = (string) $xmlRoot['inheritance-type']; |
| 160 | - $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType)); |
|
| 160 | + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceType)); |
|
| 161 | 161 | |
| 162 | 162 | if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { |
| 163 | 163 | // Evaluate <discriminator-column...> |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | if (isset($oneToOneElement['fetch'])) { |
| 357 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToOneElement['fetch']); |
|
| 357 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToOneElement['fetch']); |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | if (isset($oneToOneElement['mapped-by'])) { |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | ); |
| 404 | 404 | |
| 405 | 405 | if (isset($oneToManyElement['fetch'])) { |
| 406 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToManyElement['fetch']); |
|
| 406 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToManyElement['fetch']); |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | if (isset($oneToManyElement->cascade)) { |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | if (isset($manyToOneElement['fetch'])) { |
| 453 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToOneElement['fetch']); |
|
| 453 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToOneElement['fetch']); |
|
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | if (isset($manyToOneElement['inversed-by'])) { |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | ); |
| 493 | 493 | |
| 494 | 494 | if (isset($manyToManyElement['fetch'])) { |
| 495 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToManyElement['fetch']); |
|
| 495 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToManyElement['fetch']); |
|
| 496 | 496 | } |
| 497 | 497 | |
| 498 | 498 | if (isset($manyToManyElement['orphan-removal'])) { |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | // Evaluate <lifecycle-callbacks...> |
| 618 | 618 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
| 619 | 619 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
| 620 | - $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string) $lifecycleCallback['type'])); |
|
| 620 | + $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::'.(string) $lifecycleCallback['type'])); |
|
| 621 | 621 | } |
| 622 | 622 | } |
| 623 | 623 | |
@@ -775,12 +775,12 @@ discard block |
||
| 775 | 775 | $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; |
| 776 | 776 | $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; |
| 777 | 777 | |
| 778 | - if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { |
|
| 778 | + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) { |
|
| 779 | 779 | throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | if ($usage) { |
| 783 | - $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); |
|
| 783 | + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage); |
|
| 784 | 784 | } |
| 785 | 785 | |
| 786 | 786 | return array( |