@@ -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( |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $metadata->setCustomRepositoryClass((string) $xmlRoot['repository-class']); |
| 63 | 63 | } |
| 64 | 64 | if (isset($xmlRoot['persister-class'])) { |
| 65 | - $metadata->setCustomPersisterClass((string)$xmlRoot['persister-class']); |
|
| 65 | + $metadata->setCustomPersisterClass((string) $xmlRoot['persister-class']); |
|
| 66 | 66 | } |
| 67 | 67 | if (isset($xmlRoot['read-only']) && $this->evaluateBoolean($xmlRoot['read-only'])) { |
| 68 | 68 | $metadata->markReadOnly(); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | isset($xmlRoot['repository-class']) ? (string) $xmlRoot['repository-class'] : null |
| 73 | 73 | ); |
| 74 | 74 | $metadata->setCustomPersisterClass( |
| 75 | - isset($xmlRoot['persister-class']) ? (string)$xmlRoot['persister-class'] : null |
|
| 75 | + isset($xmlRoot['persister-class']) ? (string) $xmlRoot['persister-class'] : null |
|
| 76 | 76 | ); |
| 77 | 77 | $metadata->isMappedSuperclass = true; |
| 78 | 78 | } else if ($xmlRoot->getName() == 'embeddable') { |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | if (isset($xmlRoot['inheritance-type'])) { |
| 165 | 165 | $inheritanceType = (string) $xmlRoot['inheritance-type']; |
| 166 | - $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType)); |
|
| 166 | + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceType)); |
|
| 167 | 167 | |
| 168 | 168 | if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { |
| 169 | 169 | // Evaluate <discriminator-column...> |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | if (isset($oneToOneElement['fetch'])) { |
| 363 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToOneElement['fetch']); |
|
| 363 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToOneElement['fetch']); |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | if (isset($oneToOneElement['mapped-by'])) { |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | ); |
| 410 | 410 | |
| 411 | 411 | if (isset($oneToManyElement['fetch'])) { |
| 412 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToManyElement['fetch']); |
|
| 412 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToManyElement['fetch']); |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | if (isset($oneToManyElement['persister'])) { |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | if (isset($manyToOneElement['fetch'])) { |
| 463 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToOneElement['fetch']); |
|
| 463 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToOneElement['fetch']); |
|
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | if (isset($manyToOneElement['inversed-by'])) { |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | ); |
| 503 | 503 | |
| 504 | 504 | if (isset($manyToManyElement['fetch'])) { |
| 505 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToManyElement['fetch']); |
|
| 505 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToManyElement['fetch']); |
|
| 506 | 506 | } |
| 507 | 507 | |
| 508 | 508 | if (isset($manyToManyElement['persister'])) { |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | // Evaluate <lifecycle-callbacks...> |
| 632 | 632 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
| 633 | 633 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
| 634 | - $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string) $lifecycleCallback['type'])); |
|
| 634 | + $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::'.(string) $lifecycleCallback['type'])); |
|
| 635 | 635 | } |
| 636 | 636 | } |
| 637 | 637 | |
@@ -789,12 +789,12 @@ discard block |
||
| 789 | 789 | $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; |
| 790 | 790 | $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; |
| 791 | 791 | |
| 792 | - if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { |
|
| 792 | + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) { |
|
| 793 | 793 | throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); |
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | if ($usage) { |
| 797 | - $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); |
|
| 797 | + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage); |
|
| 798 | 798 | } |
| 799 | 799 | |
| 800 | 800 | return array( |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | $this->reverseEngineerMappingFromDatabase(); |
| 176 | 176 | |
| 177 | 177 | if ( ! isset($this->classToTableNames[$className])) { |
| 178 | - throw new \InvalidArgumentException("Unknown class " . $className); |
|
| 178 | + throw new \InvalidArgumentException("Unknown class ".$className); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | $tableName = $this->classToTableNames[$className]; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | if ( ! $table->hasPrimaryKey()) { |
| 288 | 288 | throw new MappingException( |
| 289 | - "Table " . $table->getName() . " has no primary key. Doctrine does not ". |
|
| 289 | + "Table ".$table->getName()." has no primary key. Doctrine does not ". |
|
| 290 | 290 | "support reverse engineering from tables that don't have a primary key." |
| 291 | 291 | ); |
| 292 | 292 | } |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | case Type::STRING: |
| 408 | 408 | case Type::TEXT: |
| 409 | 409 | $fieldMapping['length'] = $column->getLength(); |
| 410 | - $fieldMapping['options']['fixed'] = $column->getFixed(); |
|
| 410 | + $fieldMapping['options']['fixed'] = $column->getFixed(); |
|
| 411 | 411 | break; |
| 412 | 412 | |
| 413 | 413 | case Type::DECIMAL: |
@@ -523,10 +523,10 @@ discard block |
||
| 523 | 523 | private function getClassNameForTable($tableName) |
| 524 | 524 | { |
| 525 | 525 | if (isset($this->classNamesForTables[$tableName])) { |
| 526 | - return $this->namespace . $this->classNamesForTables[$tableName]; |
|
| 526 | + return $this->namespace.$this->classNamesForTables[$tableName]; |
|
| 527 | 527 | } |
| 528 | 528 | |
| 529 | - return $this->namespace . Inflector::classify(strtolower($tableName)); |
|
| 529 | + return $this->namespace.Inflector::classify(strtolower($tableName)); |
|
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | /** |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $cacheAnnot = $classAnnotations['Doctrine\ORM\Mapping\Cache']; |
| 151 | 151 | $cacheMap = array( |
| 152 | 152 | 'region' => $cacheAnnot->region, |
| 153 | - 'usage' => constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $cacheAnnot->usage), |
|
| 153 | + 'usage' => constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$cacheAnnot->usage), |
|
| 154 | 154 | ); |
| 155 | 155 | |
| 156 | 156 | $metadata->enableCache($cacheMap); |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $inheritanceTypeAnnot = $classAnnotations['Doctrine\ORM\Mapping\InheritanceType']; |
| 233 | 233 | |
| 234 | 234 | $metadata->setInheritanceType( |
| 235 | - constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceTypeAnnot->value) |
|
| 235 | + constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceTypeAnnot->value) |
|
| 236 | 236 | ); |
| 237 | 237 | |
| 238 | 238 | if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | // Evaluate DoctrineChangeTrackingPolicy annotation |
| 263 | 263 | if (isset($classAnnotations['Doctrine\ORM\Mapping\ChangeTrackingPolicy'])) { |
| 264 | 264 | $changeTrackingAnnot = $classAnnotations['Doctrine\ORM\Mapping\ChangeTrackingPolicy']; |
| 265 | - $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' . $changeTrackingAnnot->value)); |
|
| 265 | + $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_'.$changeTrackingAnnot->value)); |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | // Evaluate annotations on properties/fields |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | // Evaluate @Cache annotation |
| 285 | 285 | if (($cacheAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Cache')) !== null) { |
| 286 | 286 | $mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], array( |
| 287 | - 'usage' => constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $cacheAnnot->usage), |
|
| 287 | + 'usage' => constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$cacheAnnot->usage), |
|
| 288 | 288 | 'region' => $cacheAnnot->region, |
| 289 | 289 | )); |
| 290 | 290 | } |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | if ($generatedValueAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\GeneratedValue')) { |
| 316 | - $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $generatedValueAnnot->strategy)); |
|
| 316 | + $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'.$generatedValueAnnot->strategy)); |
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | if ($this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Version')) { |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | // Evaluate the listener using naming convention. |
| 500 | - if ( ! $hasMapping ) { |
|
| 500 | + if ( ! $hasMapping) { |
|
| 501 | 501 | EntityListenerBuilder::bindEntityListener($metadata, $listenerClassName); |
| 502 | 502 | } |
| 503 | 503 | } |
@@ -526,11 +526,11 @@ discard block |
||
| 526 | 526 | */ |
| 527 | 527 | private function getFetchMode($className, $fetchMode) |
| 528 | 528 | { |
| 529 | - if ( ! defined('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $fetchMode)) { |
|
| 529 | + if ( ! defined('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$fetchMode)) { |
|
| 530 | 530 | throw MappingException::invalidFetchMode($className, $fetchMode); |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | - return constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $fetchMode); |
|
| 533 | + return constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$fetchMode); |
|
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | /** |