@@ -39,7 +39,7 @@ |
||
39 | 39 | /** |
40 | 40 | * @var array |
41 | 41 | */ |
42 | - private $types = []; |
|
42 | + private $types = []; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Converts a comparison expression into the target query language output. |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | protected function onNotFoundMetadata($className) |
107 | 107 | { |
108 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
108 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
109 | 109 | return; |
110 | 110 | } |
111 | 111 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $this->completeIdGeneratorMapping($class); |
163 | 163 | } |
164 | 164 | |
165 | - if (!$class->isMappedSuperclass) { |
|
165 | + if ( ! $class->isMappedSuperclass) { |
|
166 | 166 | foreach ($class->embeddedClasses as $property => $embeddableClass) { |
167 | 167 | |
168 | 168 | if (isset($embeddableClass['inherited'])) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | $identifier = $embeddableMetadata->getIdentifier(); |
189 | 189 | |
190 | - if (! empty($identifier)) { |
|
190 | + if ( ! empty($identifier)) { |
|
191 | 191 | $this->inheritIdGeneratorMapping($class, $embeddableMetadata); |
192 | 192 | } |
193 | 193 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | protected function validateRuntimeMetadata($class, $parent) |
259 | 259 | { |
260 | - if ( ! $class->reflClass ) { |
|
260 | + if ( ! $class->reflClass) { |
|
261 | 261 | // only validate if there is a reflection class instance |
262 | 262 | return; |
263 | 263 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
268 | 268 | |
269 | 269 | // verify inheritance |
270 | - if ( ! $class->isMappedSuperclass && !$class->isInheritanceTypeNone()) { |
|
270 | + if ( ! $class->isMappedSuperclass && ! $class->isInheritanceTypeNone()) { |
|
271 | 271 | if ( ! $parent) { |
272 | 272 | if (count($class->discriminatorMap) == 0) { |
273 | 273 | throw MappingException::missingDiscriminatorMap($class->name); |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | { |
429 | 429 | foreach ($parentClass->associationMappings as $field => $mapping) { |
430 | 430 | if ($parentClass->isMappedSuperclass) { |
431 | - if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) { |
|
431 | + if ($mapping['type'] & ClassMetadata::TO_MANY && ! $mapping['isOwningSide']) { |
|
432 | 432 | throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field); |
433 | 433 | } |
434 | 434 | $mapping['sourceEntity'] = $subClass->name; |
@@ -477,11 +477,11 @@ discard block |
||
477 | 477 | |
478 | 478 | $parentClass->mapEmbedded( |
479 | 479 | [ |
480 | - 'fieldName' => $prefix . '.' . $property, |
|
480 | + 'fieldName' => $prefix.'.'.$property, |
|
481 | 481 | 'class' => $embeddableMetadata->name, |
482 | 482 | 'columnPrefix' => $embeddableClass['columnPrefix'], |
483 | 483 | 'declaredField' => $embeddableClass['declaredField'] |
484 | - ? $prefix . '.' . $embeddableClass['declaredField'] |
|
484 | + ? $prefix.'.'.$embeddableClass['declaredField'] |
|
485 | 485 | : $prefix, |
486 | 486 | 'originalField' => $embeddableClass['originalField'] ?: $property, |
487 | 487 | ] |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | */ |
500 | 500 | private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass) |
501 | 501 | { |
502 | - if (! $parentClass->isMappedSuperclass) { |
|
502 | + if ( ! $parentClass->isMappedSuperclass) { |
|
503 | 503 | return; |
504 | 504 | } |
505 | 505 | |
@@ -704,14 +704,14 @@ discard block |
||
704 | 704 | case ClassMetadata::GENERATOR_TYPE_CUSTOM: |
705 | 705 | $definition = $class->customGeneratorDefinition; |
706 | 706 | if ( ! class_exists($definition['class'])) { |
707 | - throw new ORMException("Can't instantiate custom generator : " . |
|
707 | + throw new ORMException("Can't instantiate custom generator : ". |
|
708 | 708 | $definition['class']); |
709 | 709 | } |
710 | 710 | $class->setIdGenerator(new $definition['class']); |
711 | 711 | break; |
712 | 712 | |
713 | 713 | default: |
714 | - throw new ORMException("Unknown generator type: " . $class->generatorType); |
|
714 | + throw new ORMException("Unknown generator type: ".$class->generatorType); |
|
715 | 715 | } |
716 | 716 | } |
717 | 717 | |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | */ |
762 | 762 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) |
763 | 763 | { |
764 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
764 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
765 | 765 | } |
766 | 766 | |
767 | 767 | /** |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | */ |
786 | 786 | private function getTargetPlatform() |
787 | 787 | { |
788 | - if (!$this->targetPlatform) { |
|
788 | + if ( ! $this->targetPlatform) { |
|
789 | 789 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
790 | 790 | } |
791 | 791 |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | $state = $this->getEntityState($entity); |
461 | 461 | |
462 | 462 | if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { |
463 | - throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)); |
|
463 | + throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity)); |
|
464 | 464 | } |
465 | 465 | |
466 | 466 | $class = $this->em->getClassMetadata(get_class($entity)); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | $oid = spl_object_hash($entity); |
517 | 517 | $data = []; |
518 | 518 | |
519 | - if (!isset($this->entityChangeSets[$oid])) { |
|
519 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
520 | 520 | return $data; |
521 | 521 | } |
522 | 522 | |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | if ($owner === null) { // cloned |
680 | 680 | $actualValue->setOwner($entity, $assoc); |
681 | 681 | } else if ($owner !== $entity) { // no clone, we have to fix |
682 | - if (!$actualValue->isInitialized()) { |
|
682 | + if ( ! $actualValue->isInitialized()) { |
|
683 | 683 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
684 | 684 | } |
685 | 685 | $newValue = clone $actualValue; |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
826 | 826 | |
827 | 827 | foreach ($unwrappedValue as $key => $entry) { |
828 | - if (! ($entry instanceof $targetClass->name)) { |
|
828 | + if ( ! ($entry instanceof $targetClass->name)) { |
|
829 | 829 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry); |
830 | 830 | } |
831 | 831 | |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | |
1155 | 1155 | $joinColumns = reset($assoc['joinColumns']); |
1156 | 1156 | |
1157 | - $calc->addDependency($targetClass->name, $class->name, (int)empty($joinColumns['nullable'])); |
|
1157 | + $calc->addDependency($targetClass->name, $class->name, (int) empty($joinColumns['nullable'])); |
|
1158 | 1158 | |
1159 | 1159 | // If the target class has mapped subclasses, these share the same dependency. |
1160 | 1160 | if ( ! $targetClass->subClasses) { |
@@ -1677,7 +1677,7 @@ discard block |
||
1677 | 1677 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
1678 | 1678 | |
1679 | 1679 | default: |
1680 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1680 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1681 | 1681 | } |
1682 | 1682 | |
1683 | 1683 | $this->cascadePersist($entity, $visited); |
@@ -1747,7 +1747,7 @@ discard block |
||
1747 | 1747 | case self::STATE_DETACHED: |
1748 | 1748 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
1749 | 1749 | default: |
1750 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1750 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1751 | 1751 | } |
1752 | 1752 | |
1753 | 1753 | } |
@@ -1886,7 +1886,7 @@ discard block |
||
1886 | 1886 | */ |
1887 | 1887 | private function ensureVersionMatch(ClassMetadata $class, $entity, $managedCopy) |
1888 | 1888 | { |
1889 | - if (! ($class->isVersioned && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
1889 | + if ( ! ($class->isVersioned && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
1890 | 1890 | return; |
1891 | 1891 | } |
1892 | 1892 | |
@@ -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 | /** |
@@ -2069,7 +2069,7 @@ discard block |
||
2069 | 2069 | |
2070 | 2070 | $associationMappings = array_filter( |
2071 | 2071 | $class->associationMappings, |
2072 | - function ($assoc) { return $assoc['isCascadeRefresh']; } |
|
2072 | + function($assoc) { return $assoc['isCascadeRefresh']; } |
|
2073 | 2073 | ); |
2074 | 2074 | |
2075 | 2075 | foreach ($associationMappings as $assoc) { |
@@ -2112,7 +2112,7 @@ discard block |
||
2112 | 2112 | |
2113 | 2113 | $associationMappings = array_filter( |
2114 | 2114 | $class->associationMappings, |
2115 | - function ($assoc) { return $assoc['isCascadeDetach']; } |
|
2115 | + function($assoc) { return $assoc['isCascadeDetach']; } |
|
2116 | 2116 | ); |
2117 | 2117 | |
2118 | 2118 | foreach ($associationMappings as $assoc) { |
@@ -2156,7 +2156,7 @@ discard block |
||
2156 | 2156 | |
2157 | 2157 | $associationMappings = array_filter( |
2158 | 2158 | $class->associationMappings, |
2159 | - function ($assoc) { return $assoc['isCascadeMerge']; } |
|
2159 | + function($assoc) { return $assoc['isCascadeMerge']; } |
|
2160 | 2160 | ); |
2161 | 2161 | |
2162 | 2162 | foreach ($associationMappings as $assoc) { |
@@ -2195,7 +2195,7 @@ discard block |
||
2195 | 2195 | |
2196 | 2196 | $associationMappings = array_filter( |
2197 | 2197 | $class->associationMappings, |
2198 | - function ($assoc) { return $assoc['isCascadePersist']; } |
|
2198 | + function($assoc) { return $assoc['isCascadePersist']; } |
|
2199 | 2199 | ); |
2200 | 2200 | |
2201 | 2201 | foreach ($associationMappings as $assoc) { |
@@ -2224,7 +2224,7 @@ discard block |
||
2224 | 2224 | break; |
2225 | 2225 | |
2226 | 2226 | case ($relatedEntities !== null): |
2227 | - if (! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2227 | + if ( ! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2228 | 2228 | throw ORMInvalidArgumentException::invalidAssociation( |
2229 | 2229 | $this->em->getClassMetadata($assoc['targetEntity']), |
2230 | 2230 | $assoc, |
@@ -2255,13 +2255,13 @@ discard block |
||
2255 | 2255 | |
2256 | 2256 | $associationMappings = array_filter( |
2257 | 2257 | $class->associationMappings, |
2258 | - function ($assoc) { return $assoc['isCascadeRemove']; } |
|
2258 | + function($assoc) { return $assoc['isCascadeRemove']; } |
|
2259 | 2259 | ); |
2260 | 2260 | |
2261 | 2261 | $entitiesToCascade = []; |
2262 | 2262 | |
2263 | 2263 | foreach ($associationMappings as $assoc) { |
2264 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2264 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2265 | 2265 | $entity->__load(); |
2266 | 2266 | } |
2267 | 2267 | |
@@ -2325,7 +2325,7 @@ discard block |
||
2325 | 2325 | return; |
2326 | 2326 | } |
2327 | 2327 | |
2328 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2328 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2329 | 2329 | $entity->__load(); |
2330 | 2330 | } |
2331 | 2331 | |
@@ -2340,7 +2340,7 @@ discard block |
||
2340 | 2340 | case LockMode::NONE === $lockMode: |
2341 | 2341 | case LockMode::PESSIMISTIC_READ === $lockMode: |
2342 | 2342 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
2343 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
2343 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
2344 | 2344 | throw TransactionRequiredException::transactionRequired(); |
2345 | 2345 | } |
2346 | 2346 | |
@@ -2676,7 +2676,7 @@ discard block |
||
2676 | 2676 | // then we can append this entity for eager loading! |
2677 | 2677 | if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER && |
2678 | 2678 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2679 | - !$targetClass->isIdentifierComposite && |
|
2679 | + ! $targetClass->isIdentifierComposite && |
|
2680 | 2680 | $newValue instanceof Proxy && |
2681 | 2681 | $newValue->__isInitialized__ === false) { |
2682 | 2682 | |
@@ -3043,7 +3043,7 @@ discard block |
||
3043 | 3043 | public function getCollectionPersister(array $association) |
3044 | 3044 | { |
3045 | 3045 | $role = isset($association['cache']) |
3046 | - ? $association['sourceEntity'] . '::' . $association['fieldName'] |
|
3046 | + ? $association['sourceEntity'].'::'.$association['fieldName'] |
|
3047 | 3047 | : $association['type']; |
3048 | 3048 | |
3049 | 3049 | if (isset($this->collectionPersisters[$role])) { |
@@ -3261,7 +3261,7 @@ discard block |
||
3261 | 3261 | */ |
3262 | 3262 | private function afterTransactionComplete() |
3263 | 3263 | { |
3264 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3264 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3265 | 3265 | $persister->afterTransactionComplete(); |
3266 | 3266 | }); |
3267 | 3267 | } |
@@ -3271,7 +3271,7 @@ discard block |
||
3271 | 3271 | */ |
3272 | 3272 | private function afterTransactionRolledBack() |
3273 | 3273 | { |
3274 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3274 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3275 | 3275 | $persister->afterTransactionRolledBack(); |
3276 | 3276 | }); |
3277 | 3277 | } |
@@ -3351,11 +3351,11 @@ discard block |
||
3351 | 3351 | */ |
3352 | 3352 | private function mergeEntityStateIntoManagedCopy($entity, $managedCopy) |
3353 | 3353 | { |
3354 | - if (! $this->isLoaded($entity)) { |
|
3354 | + if ( ! $this->isLoaded($entity)) { |
|
3355 | 3355 | return; |
3356 | 3356 | } |
3357 | 3357 | |
3358 | - if (! $this->isLoaded($managedCopy)) { |
|
3358 | + if ( ! $this->isLoaded($managedCopy)) { |
|
3359 | 3359 | $managedCopy->__load(); |
3360 | 3360 | } |
3361 | 3361 | |
@@ -3378,7 +3378,7 @@ discard block |
||
3378 | 3378 | if ($other === null) { |
3379 | 3379 | $prop->setValue($managedCopy, null); |
3380 | 3380 | } else { |
3381 | - if ($other instanceof Proxy && !$other->__isInitialized()) { |
|
3381 | + if ($other instanceof Proxy && ! $other->__isInitialized()) { |
|
3382 | 3382 | // do not merge fields marked lazy that have not been fetched. |
3383 | 3383 | continue; |
3384 | 3384 | } |
@@ -3465,7 +3465,7 @@ discard block |
||
3465 | 3465 | */ |
3466 | 3466 | private function clearIdentityMapForEntityName($entityName) |
3467 | 3467 | { |
3468 | - if (! isset($this->identityMap[$entityName])) { |
|
3468 | + if ( ! isset($this->identityMap[$entityName])) { |
|
3469 | 3469 | return; |
3470 | 3470 | } |
3471 | 3471 |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
89 | 89 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable); |
90 | 90 | |
91 | - $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')' |
|
92 | - . ' SELECT t0.' . implode(', t0.', $idColumnNames); |
|
91 | + $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')' |
|
92 | + . ' SELECT t0.'.implode(', t0.', $idColumnNames); |
|
93 | 93 | |
94 | 94 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable); |
95 | 95 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->_insertSql .= $sqlWalker->walkFromClause($fromClause); |
98 | 98 | |
99 | 99 | // 2. Create ID subselect statement used in UPDATE ... WHERE ... IN (subselect) |
100 | - $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable; |
|
100 | + $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable; |
|
101 | 101 | |
102 | 102 | // 3. Create and store UPDATE statements |
103 | 103 | $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | foreach (array_reverse($classNames) as $className) { |
107 | 107 | $affected = false; |
108 | 108 | $class = $em->getClassMetadata($className); |
109 | - $updateSql = 'UPDATE ' . $quoteStrategy->getTableName($class, $platform) . ' SET '; |
|
109 | + $updateSql = 'UPDATE '.$quoteStrategy->getTableName($class, $platform).' SET '; |
|
110 | 110 | |
111 | 111 | foreach ($updateItems as $updateItem) { |
112 | 112 | $field = $updateItem->pathExpression->field; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | if ($affected) { |
136 | - $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')'; |
|
136 | + $this->_sqlStatements[$i] = $updateSql.' WHERE ('.$idColumnList.') IN ('.$idSubselect.')'; |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | ]; |
153 | 153 | } |
154 | 154 | |
155 | - $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
156 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
155 | + $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
156 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
157 | 157 | |
158 | 158 | $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
159 | 159 | } |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
78 | 78 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias); |
79 | 79 | |
80 | - $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')' |
|
81 | - . ' SELECT t0.' . implode(', t0.', $idColumnNames); |
|
80 | + $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')' |
|
81 | + . ' SELECT t0.'.implode(', t0.', $idColumnNames); |
|
82 | 82 | |
83 | 83 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias); |
84 | 84 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | // 2. Create ID subselect statement used in DELETE ... WHERE ... IN (subselect) |
93 | - $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable; |
|
93 | + $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable; |
|
94 | 94 | |
95 | 95 | // 3. Create and store DELETE statements |
96 | 96 | $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses); |
97 | 97 | foreach (array_reverse($classNames) as $className) { |
98 | 98 | $tableName = $quoteStrategy->getTableName($em->getClassMetadata($className), $platform); |
99 | - $this->_sqlStatements[] = 'DELETE FROM ' . $tableName |
|
100 | - . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')'; |
|
99 | + $this->_sqlStatements[] = 'DELETE FROM '.$tableName |
|
100 | + . ' WHERE ('.$idColumnList.') IN ('.$idSubselect.')'; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | // 4. Store DDL for temporary identifier table. |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | 'type' => Type::getType(PersisterHelper::getTypeOfColumn($idColumnName, $rootClass, $em)), |
109 | 109 | ]; |
110 | 110 | } |
111 | - $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
112 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
111 | + $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
112 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
113 | 113 | $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
114 | 114 | } |
115 | 115 |
@@ -444,7 +444,9 @@ discard block |
||
444 | 444 | foreach ($dqlAliases as $dqlAlias) { |
445 | 445 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
446 | 446 | |
447 | - if ( ! $class->isInheritanceTypeSingleTable()) continue; |
|
447 | + if ( ! $class->isInheritanceTypeSingleTable()) { |
|
448 | + continue; |
|
449 | + } |
|
448 | 450 | |
449 | 451 | $conn = $this->em->getConnection(); |
450 | 452 | $values = []; |
@@ -782,7 +784,9 @@ discard block |
||
782 | 784 | |
783 | 785 | foreach ($subClass->associationMappings as $assoc) { |
784 | 786 | // Skip if association is inherited |
785 | - if (isset($assoc['inherited'])) continue; |
|
787 | + if (isset($assoc['inherited'])) { |
|
788 | + continue; |
|
789 | + } |
|
786 | 790 | |
787 | 791 | if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) { |
788 | 792 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
@@ -289,11 +289,11 @@ discard block |
||
289 | 289 | */ |
290 | 290 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
291 | 291 | { |
292 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
292 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
293 | 293 | |
294 | 294 | if ( ! isset($this->tableAliasMap[$tableName])) { |
295 | 295 | $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't') |
296 | - . $this->tableAliasCounter++ . '_'; |
|
296 | + . $this->tableAliasCounter++.'_'; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | return $this->tableAliasMap[$tableName]; |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
313 | 313 | { |
314 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
314 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
315 | 315 | |
316 | 316 | $this->tableAliasMap[$tableName] = $alias; |
317 | 317 | |
@@ -352,12 +352,12 @@ discard block |
||
352 | 352 | |
353 | 353 | // If this is a joined association we must use left joins to preserve the correct result. |
354 | 354 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
355 | - $sql .= 'JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
355 | + $sql .= 'JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON '; |
|
356 | 356 | |
357 | 357 | $sqlParts = []; |
358 | 358 | |
359 | 359 | foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { |
360 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; |
|
360 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | // Add filters on the root class |
@@ -378,12 +378,12 @@ discard block |
||
378 | 378 | $subClass = $this->em->getClassMetadata($subClassName); |
379 | 379 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
380 | 380 | |
381 | - $sql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
381 | + $sql .= ' LEFT JOIN '.$this->quoteStrategy->getTableName($subClass, $this->platform).' '.$tableAlias.' ON '; |
|
382 | 382 | |
383 | 383 | $sqlParts = []; |
384 | 384 | |
385 | 385 | foreach ($this->quoteStrategy->getIdentifierColumnNames($subClass, $this->platform) as $columnName) { |
386 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; |
|
386 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; |
|
387 | 387 | } |
388 | 388 | |
389 | 389 | $sql .= implode(' AND ', $sqlParts); |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | ? $persister->getOwningTable($fieldName) |
416 | 416 | : $qComp['metadata']->getTableName(); |
417 | 417 | |
418 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
418 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
419 | 419 | |
420 | 420 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
421 | 421 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | } |
424 | 424 | |
425 | 425 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
426 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
426 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
427 | 427 | } |
428 | 428 | } |
429 | 429 | |
@@ -458,15 +458,15 @@ discard block |
||
458 | 458 | } |
459 | 459 | |
460 | 460 | $sqlTableAlias = ($this->useSqlTableAliases) |
461 | - ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.' |
|
461 | + ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.' |
|
462 | 462 | : ''; |
463 | 463 | |
464 | - $sqlParts[] = $sqlTableAlias . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')'; |
|
464 | + $sqlParts[] = $sqlTableAlias.$class->discriminatorColumn['name'].' IN ('.implode(', ', $values).')'; |
|
465 | 465 | } |
466 | 466 | |
467 | 467 | $sql = implode(' AND ', $sqlParts); |
468 | 468 | |
469 | - return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql; |
|
469 | + return (count($sqlParts) > 1) ? '('.$sql.')' : $sql; |
|
470 | 470 | } |
471 | 471 | |
472 | 472 | /** |
@@ -479,11 +479,11 @@ discard block |
||
479 | 479 | */ |
480 | 480 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
481 | 481 | { |
482 | - if (!$this->em->hasFilters()) { |
|
482 | + if ( ! $this->em->hasFilters()) { |
|
483 | 483 | return ''; |
484 | 484 | } |
485 | 485 | |
486 | - switch($targetEntity->inheritanceType) { |
|
486 | + switch ($targetEntity->inheritanceType) { |
|
487 | 487 | case ClassMetadata::INHERITANCE_TYPE_NONE: |
488 | 488 | break; |
489 | 489 | case ClassMetadata::INHERITANCE_TYPE_JOINED: |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | $filterClauses = []; |
507 | 507 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
508 | 508 | if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
509 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
509 | + $filterClauses[] = '('.$filterExpr.')'; |
|
510 | 510 | } |
511 | 511 | } |
512 | 512 | |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | } |
539 | 539 | |
540 | 540 | if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) { |
541 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
541 | + $sql .= ' ORDER BY '.$orderBySql; |
|
542 | 542 | } |
543 | 543 | |
544 | 544 | if ($limit !== null || $offset !== null) { |
@@ -550,11 +550,11 @@ discard block |
||
550 | 550 | } |
551 | 551 | |
552 | 552 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
553 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
553 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
554 | 554 | } |
555 | 555 | |
556 | 556 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
557 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
557 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
558 | 558 | } |
559 | 559 | |
560 | 560 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | $sqlParts = []; |
610 | 610 | |
611 | 611 | foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { |
612 | - $sqlParts[] = $tableAlias . '.' . $columnName; |
|
612 | + $sqlParts[] = $tableAlias.'.'.$columnName; |
|
613 | 613 | } |
614 | 614 | |
615 | 615 | return implode(', ', $sqlParts); |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
653 | 653 | |
654 | 654 | if ($this->useSqlTableAliases) { |
655 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
655 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
656 | 656 | } |
657 | 657 | |
658 | 658 | $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | } |
682 | 682 | |
683 | 683 | if ($this->useSqlTableAliases) { |
684 | - $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.'; |
|
684 | + $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.'; |
|
685 | 685 | } |
686 | 686 | |
687 | 687 | $sql .= reset($assoc['targetToSourceKeyColumns']); |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | */ |
700 | 700 | public function walkSelectClause($selectClause) |
701 | 701 | { |
702 | - $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
702 | + $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
703 | 703 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
704 | 704 | |
705 | 705 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) { |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | $discrColumn = $rootClass->discriminatorColumn; |
737 | 737 | $columnAlias = $this->getSQLColumnAlias($discrColumn['name']); |
738 | 738 | |
739 | - $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias; |
|
739 | + $sqlSelectExpressions[] = $tblAlias.'.'.$discrColumn['name'].' AS '.$columnAlias; |
|
740 | 740 | |
741 | 741 | $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias); |
742 | 742 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName'], false, $discrColumn['type']); |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | // Add foreign key columns of class and also parent classes |
751 | 751 | foreach ($class->associationMappings as $assoc) { |
752 | 752 | if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) |
753 | - || ( ! $addMetaColumns && !isset($assoc['id']))) { |
|
753 | + || ( ! $addMetaColumns && ! isset($assoc['id']))) { |
|
754 | 754 | continue; |
755 | 755 | } |
756 | 756 | |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); |
766 | 766 | |
767 | 767 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
768 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; |
|
768 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; |
|
769 | 769 | |
770 | 770 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType); |
771 | 771 | } |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); |
795 | 795 | |
796 | 796 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $subClass, $this->platform); |
797 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; |
|
797 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; |
|
798 | 798 | |
799 | 799 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType); |
800 | 800 | } |
@@ -820,7 +820,7 @@ discard block |
||
820 | 820 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
821 | 821 | } |
822 | 822 | |
823 | - return ' FROM ' . implode(', ', $sqlParts); |
|
823 | + return ' FROM '.implode(', ', $sqlParts); |
|
824 | 824 | } |
825 | 825 | |
826 | 826 | /** |
@@ -897,7 +897,7 @@ discard block |
||
897 | 897 | } |
898 | 898 | |
899 | 899 | $sql = $this->platform->appendLockHint( |
900 | - $this->quoteStrategy->getTableName($class, $this->platform) . ' ' . |
|
900 | + $this->quoteStrategy->getTableName($class, $this->platform).' '. |
|
901 | 901 | $this->getSQLTableAlias($class->getTableName(), $dqlAlias), |
902 | 902 | $this->query->getHint(Query::HINT_LOCK_MODE) |
903 | 903 | ); |
@@ -909,10 +909,10 @@ discard block |
||
909 | 909 | $classTableInheritanceJoins = $this->_generateClassTableInheritanceJoins($class, $dqlAlias); |
910 | 910 | |
911 | 911 | if ( ! $buildNestedJoins) { |
912 | - return $sql . $classTableInheritanceJoins; |
|
912 | + return $sql.$classTableInheritanceJoins; |
|
913 | 913 | } |
914 | 914 | |
915 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
915 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
916 | 916 | } |
917 | 917 | |
918 | 918 | /** |
@@ -945,7 +945,7 @@ discard block |
||
945 | 945 | // Ensure we got the owning side, since it has all mapping info |
946 | 946 | $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation; |
947 | 947 | |
948 | - if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
948 | + if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
949 | 949 | if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) { |
950 | 950 | throw QueryException::iterateWithFetchJoinNotAllowed($assoc); |
951 | 951 | } |
@@ -965,12 +965,12 @@ discard block |
||
965 | 965 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
966 | 966 | |
967 | 967 | if ($relation['isOwningSide']) { |
968 | - $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn; |
|
968 | + $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn; |
|
969 | 969 | |
970 | 970 | continue; |
971 | 971 | } |
972 | 972 | |
973 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn; |
|
973 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn; |
|
974 | 974 | } |
975 | 975 | |
976 | 976 | // Apply remaining inheritance restrictions |
@@ -988,7 +988,7 @@ discard block |
||
988 | 988 | } |
989 | 989 | |
990 | 990 | $targetTableJoin = [ |
991 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
991 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
992 | 992 | 'condition' => implode(' AND ', $conditions), |
993 | 993 | ]; |
994 | 994 | break; |
@@ -1008,10 +1008,10 @@ discard block |
||
1008 | 1008 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
1009 | 1009 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
1010 | 1010 | |
1011 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
1011 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
1012 | 1012 | } |
1013 | 1013 | |
1014 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1014 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1015 | 1015 | |
1016 | 1016 | // Join target table |
1017 | 1017 | $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
1026 | 1026 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
1027 | 1027 | |
1028 | - $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
1028 | + $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
1029 | 1029 | } |
1030 | 1030 | |
1031 | 1031 | // Apply remaining inheritance restrictions |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | } |
1044 | 1044 | |
1045 | 1045 | $targetTableJoin = [ |
1046 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1046 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1047 | 1047 | 'condition' => implode(' AND ', $conditions), |
1048 | 1048 | ]; |
1049 | 1049 | break; |
@@ -1053,22 +1053,22 @@ discard block |
||
1053 | 1053 | } |
1054 | 1054 | |
1055 | 1055 | // Handle WITH clause |
1056 | - $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1056 | + $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1057 | 1057 | |
1058 | 1058 | if ($targetClass->isInheritanceTypeJoined()) { |
1059 | 1059 | $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1060 | 1060 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1061 | 1061 | if ($withCondition) { |
1062 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1062 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1063 | 1063 | } else { |
1064 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1064 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1065 | 1065 | } |
1066 | 1066 | } else { |
1067 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1067 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1068 | 1068 | } |
1069 | 1069 | |
1070 | 1070 | if ($withCondition) { |
1071 | - $sql .= ' AND ' . $withCondition; |
|
1071 | + $sql .= ' AND '.$withCondition; |
|
1072 | 1072 | } |
1073 | 1073 | |
1074 | 1074 | // Apply the indexes |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1102 | 1102 | } |
1103 | 1103 | |
1104 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1104 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1105 | 1105 | } |
1106 | 1106 | |
1107 | 1107 | /** |
@@ -1118,10 +1118,10 @@ discard block |
||
1118 | 1118 | $this->orderedColumnsMap[$sql] = $type; |
1119 | 1119 | |
1120 | 1120 | if ($expr instanceof AST\Subselect) { |
1121 | - return '(' . $sql . ') ' . $type; |
|
1121 | + return '('.$sql.') '.$type; |
|
1122 | 1122 | } |
1123 | 1123 | |
1124 | - return $sql . ' ' . $type; |
|
1124 | + return $sql.' '.$type; |
|
1125 | 1125 | } |
1126 | 1126 | |
1127 | 1127 | /** |
@@ -1129,7 +1129,7 @@ discard block |
||
1129 | 1129 | */ |
1130 | 1130 | public function walkHavingClause($havingClause) |
1131 | 1131 | { |
1132 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1132 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1133 | 1133 | } |
1134 | 1134 | |
1135 | 1135 | /** |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | $conditions = []; |
1153 | 1153 | |
1154 | 1154 | if ($join->conditionalExpression) { |
1155 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1155 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1156 | 1156 | } |
1157 | 1157 | |
1158 | 1158 | $isUnconditionalJoin = empty($conditions); |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | ? ' AND ' |
1161 | 1161 | : ' ON '; |
1162 | 1162 | |
1163 | - $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, !$isUnconditionalJoin); |
|
1163 | + $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, ! $isUnconditionalJoin); |
|
1164 | 1164 | |
1165 | 1165 | // Apply remaining inheritance restrictions |
1166 | 1166 | $discrSql = $this->_generateDiscriminatorColumnConditionSQL([$dqlAlias]); |
@@ -1177,7 +1177,7 @@ discard block |
||
1177 | 1177 | } |
1178 | 1178 | |
1179 | 1179 | if ($conditions) { |
1180 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1180 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1181 | 1181 | } |
1182 | 1182 | |
1183 | 1183 | break; |
@@ -1207,7 +1207,7 @@ discard block |
||
1207 | 1207 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1208 | 1208 | } |
1209 | 1209 | |
1210 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
1210 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
1211 | 1211 | |
1212 | 1212 | return $sql; |
1213 | 1213 | } |
@@ -1229,7 +1229,7 @@ discard block |
||
1229 | 1229 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1230 | 1230 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1231 | 1231 | |
1232 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1232 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1233 | 1233 | } |
1234 | 1234 | |
1235 | 1235 | /** |
@@ -1244,11 +1244,11 @@ discard block |
||
1244 | 1244 | $sql = 'CASE'; |
1245 | 1245 | |
1246 | 1246 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1247 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1248 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1247 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1248 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1249 | 1249 | } |
1250 | 1250 | |
1251 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1251 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1252 | 1252 | |
1253 | 1253 | return $sql; |
1254 | 1254 | } |
@@ -1262,14 +1262,14 @@ discard block |
||
1262 | 1262 | */ |
1263 | 1263 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1264 | 1264 | { |
1265 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1265 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1266 | 1266 | |
1267 | 1267 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1268 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1269 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1268 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1269 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1270 | 1270 | } |
1271 | 1271 | |
1272 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1272 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1273 | 1273 | |
1274 | 1274 | return $sql; |
1275 | 1275 | } |
@@ -1303,14 +1303,14 @@ discard block |
||
1303 | 1303 | $fieldMapping = $class->fieldMappings[$fieldName]; |
1304 | 1304 | $columnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
1305 | 1305 | $columnAlias = $this->getSQLColumnAlias($fieldMapping['columnName']); |
1306 | - $col = $sqlTableAlias . '.' . $columnName; |
|
1306 | + $col = $sqlTableAlias.'.'.$columnName; |
|
1307 | 1307 | |
1308 | 1308 | if (isset($fieldMapping['requireSQLConversion'])) { |
1309 | 1309 | $type = Type::getType($fieldMapping['type']); |
1310 | 1310 | $col = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform()); |
1311 | 1311 | } |
1312 | 1312 | |
1313 | - $sql .= $col . ' AS ' . $columnAlias; |
|
1313 | + $sql .= $col.' AS '.$columnAlias; |
|
1314 | 1314 | |
1315 | 1315 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1316 | 1316 | |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1336 | 1336 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1337 | 1337 | |
1338 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1338 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1339 | 1339 | |
1340 | 1340 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1341 | 1341 | |
@@ -1349,7 +1349,7 @@ discard block |
||
1349 | 1349 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1350 | 1350 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1351 | 1351 | |
1352 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1352 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1353 | 1353 | |
1354 | 1354 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1355 | 1355 | |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | break; |
1361 | 1361 | |
1362 | 1362 | case ($expr instanceof AST\NewObjectExpression): |
1363 | - $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); |
|
1363 | + $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable); |
|
1364 | 1364 | break; |
1365 | 1365 | |
1366 | 1366 | default: |
@@ -1401,14 +1401,14 @@ discard block |
||
1401 | 1401 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
1402 | 1402 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
1403 | 1403 | |
1404 | - $col = $sqlTableAlias . '.' . $quotedColumnName; |
|
1404 | + $col = $sqlTableAlias.'.'.$quotedColumnName; |
|
1405 | 1405 | |
1406 | 1406 | if (isset($mapping['requireSQLConversion'])) { |
1407 | 1407 | $type = Type::getType($mapping['type']); |
1408 | 1408 | $col = $type->convertToPHPValueSQL($col, $this->platform); |
1409 | 1409 | } |
1410 | 1410 | |
1411 | - $sqlParts[] = $col . ' AS '. $columnAlias; |
|
1411 | + $sqlParts[] = $col.' AS '.$columnAlias; |
|
1412 | 1412 | |
1413 | 1413 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; |
1414 | 1414 | |
@@ -1425,21 +1425,21 @@ discard block |
||
1425 | 1425 | $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
1426 | 1426 | |
1427 | 1427 | foreach ($subClass->fieldMappings as $fieldName => $mapping) { |
1428 | - if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) { |
|
1428 | + if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) { |
|
1429 | 1429 | continue; |
1430 | 1430 | } |
1431 | 1431 | |
1432 | 1432 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
1433 | 1433 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform); |
1434 | 1434 | |
1435 | - $col = $sqlTableAlias . '.' . $quotedColumnName; |
|
1435 | + $col = $sqlTableAlias.'.'.$quotedColumnName; |
|
1436 | 1436 | |
1437 | 1437 | if (isset($mapping['requireSQLConversion'])) { |
1438 | 1438 | $type = Type::getType($mapping['type']); |
1439 | 1439 | $col = $type->convertToPHPValueSQL($col, $this->platform); |
1440 | 1440 | } |
1441 | 1441 | |
1442 | - $sqlParts[] = $col . ' AS ' . $columnAlias; |
|
1442 | + $sqlParts[] = $col.' AS '.$columnAlias; |
|
1443 | 1443 | |
1444 | 1444 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; |
1445 | 1445 | |
@@ -1459,7 +1459,7 @@ discard block |
||
1459 | 1459 | */ |
1460 | 1460 | public function walkQuantifiedExpression($qExpr) |
1461 | 1461 | { |
1462 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1462 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1463 | 1463 | } |
1464 | 1464 | |
1465 | 1465 | /** |
@@ -1499,7 +1499,7 @@ discard block |
||
1499 | 1499 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1500 | 1500 | } |
1501 | 1501 | |
1502 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1502 | + return ' FROM '.implode(', ', $sqlParts); |
|
1503 | 1503 | } |
1504 | 1504 | |
1505 | 1505 | /** |
@@ -1507,7 +1507,7 @@ discard block |
||
1507 | 1507 | */ |
1508 | 1508 | public function walkSimpleSelectClause($simpleSelectClause) |
1509 | 1509 | { |
1510 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1510 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1511 | 1511 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1512 | 1512 | } |
1513 | 1513 | |
@@ -1526,10 +1526,10 @@ discard block |
||
1526 | 1526 | * @param null|string $newObjectResultAlias |
1527 | 1527 | * @return string The SQL. |
1528 | 1528 | */ |
1529 | - public function walkNewObject($newObjectExpression, $newObjectResultAlias=null) |
|
1529 | + public function walkNewObject($newObjectExpression, $newObjectResultAlias = null) |
|
1530 | 1530 | { |
1531 | 1531 | $sqlSelectExpressions = []; |
1532 | - $objIndex = $newObjectResultAlias?:$this->newObjectCounter++; |
|
1532 | + $objIndex = $newObjectResultAlias ?: $this->newObjectCounter++; |
|
1533 | 1533 | |
1534 | 1534 | foreach ($newObjectExpression->args as $argIndex => $e) { |
1535 | 1535 | $resultAlias = $this->scalarResultCounter++; |
@@ -1542,7 +1542,7 @@ discard block |
||
1542 | 1542 | break; |
1543 | 1543 | |
1544 | 1544 | case ($e instanceof AST\Subselect): |
1545 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1545 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1546 | 1546 | break; |
1547 | 1547 | |
1548 | 1548 | case ($e instanceof AST\PathExpression): |
@@ -1551,7 +1551,7 @@ discard block |
||
1551 | 1551 | $class = $qComp['metadata']; |
1552 | 1552 | $fieldType = $class->fieldMappings[$e->field]['type']; |
1553 | 1553 | |
1554 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1554 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1555 | 1555 | break; |
1556 | 1556 | |
1557 | 1557 | case ($e instanceof AST\Literal): |
@@ -1565,11 +1565,11 @@ discard block |
||
1565 | 1565 | break; |
1566 | 1566 | } |
1567 | 1567 | |
1568 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1568 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1569 | 1569 | break; |
1570 | 1570 | |
1571 | 1571 | default: |
1572 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1572 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1573 | 1573 | break; |
1574 | 1574 | } |
1575 | 1575 | |
@@ -1602,10 +1602,10 @@ discard block |
||
1602 | 1602 | case ($expr instanceof AST\Subselect): |
1603 | 1603 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1604 | 1604 | |
1605 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1605 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1606 | 1606 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1607 | 1607 | |
1608 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1608 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1609 | 1609 | break; |
1610 | 1610 | |
1611 | 1611 | case ($expr instanceof AST\Functions\FunctionNode): |
@@ -1622,7 +1622,7 @@ discard block |
||
1622 | 1622 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1623 | 1623 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1624 | 1624 | |
1625 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1625 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1626 | 1626 | break; |
1627 | 1627 | |
1628 | 1628 | case ($expr instanceof AST\ParenthesisExpression): |
@@ -1642,8 +1642,8 @@ discard block |
||
1642 | 1642 | */ |
1643 | 1643 | public function walkAggregateExpression($aggExpression) |
1644 | 1644 | { |
1645 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1646 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1645 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1646 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1647 | 1647 | } |
1648 | 1648 | |
1649 | 1649 | /** |
@@ -1657,7 +1657,7 @@ discard block |
||
1657 | 1657 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1658 | 1658 | } |
1659 | 1659 | |
1660 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1660 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1661 | 1661 | } |
1662 | 1662 | |
1663 | 1663 | /** |
@@ -1714,7 +1714,7 @@ discard block |
||
1714 | 1714 | { |
1715 | 1715 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1716 | 1716 | $tableName = $class->getTableName(); |
1717 | - $sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
1717 | + $sql = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
1718 | 1718 | |
1719 | 1719 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1720 | 1720 | $this->rootAliases[] = $deleteClause->aliasIdentificationVariable; |
@@ -1729,12 +1729,12 @@ discard block |
||
1729 | 1729 | { |
1730 | 1730 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1731 | 1731 | $tableName = $class->getTableName(); |
1732 | - $sql = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
1732 | + $sql = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
1733 | 1733 | |
1734 | 1734 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1735 | 1735 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1736 | 1736 | |
1737 | - $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1737 | + $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1738 | 1738 | |
1739 | 1739 | return $sql; |
1740 | 1740 | } |
@@ -1747,7 +1747,7 @@ discard block |
||
1747 | 1747 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1748 | 1748 | $this->useSqlTableAliases = false; |
1749 | 1749 | |
1750 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1750 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1751 | 1751 | $newValue = $updateItem->newValue; |
1752 | 1752 | |
1753 | 1753 | switch (true) { |
@@ -1790,7 +1790,7 @@ discard block |
||
1790 | 1790 | |
1791 | 1791 | if (count($filterClauses)) { |
1792 | 1792 | if ($condSql) { |
1793 | - $condSql = '(' . $condSql . ') AND '; |
|
1793 | + $condSql = '('.$condSql.') AND '; |
|
1794 | 1794 | } |
1795 | 1795 | |
1796 | 1796 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1798,11 +1798,11 @@ discard block |
||
1798 | 1798 | } |
1799 | 1799 | |
1800 | 1800 | if ($condSql) { |
1801 | - return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1801 | + return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1802 | 1802 | } |
1803 | 1803 | |
1804 | 1804 | if ($discrSql) { |
1805 | - return ' WHERE ' . $discrSql; |
|
1805 | + return ' WHERE '.$discrSql; |
|
1806 | 1806 | } |
1807 | 1807 | |
1808 | 1808 | return ''; |
@@ -1845,7 +1845,7 @@ discard block |
||
1845 | 1845 | // if only one ConditionalPrimary is defined |
1846 | 1846 | return ( ! ($factor instanceof AST\ConditionalFactor)) |
1847 | 1847 | ? $this->walkConditionalPrimary($factor) |
1848 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1848 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1849 | 1849 | } |
1850 | 1850 | |
1851 | 1851 | /** |
@@ -1860,7 +1860,7 @@ discard block |
||
1860 | 1860 | if ($primary->isConditionalExpression()) { |
1861 | 1861 | $condExpr = $primary->conditionalExpression; |
1862 | 1862 | |
1863 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1863 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1864 | 1864 | } |
1865 | 1865 | } |
1866 | 1866 | |
@@ -1871,7 +1871,7 @@ discard block |
||
1871 | 1871 | { |
1872 | 1872 | $sql = ($existsExpr->not) ? 'NOT ' : ''; |
1873 | 1873 | |
1874 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1874 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1875 | 1875 | |
1876 | 1876 | return $sql; |
1877 | 1877 | } |
@@ -1915,7 +1915,7 @@ discard block |
||
1915 | 1915 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1916 | 1916 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1917 | 1917 | |
1918 | - $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE '; |
|
1918 | + $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE '; |
|
1919 | 1919 | |
1920 | 1920 | $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; |
1921 | 1921 | $sqlParts = []; |
@@ -1923,7 +1923,7 @@ discard block |
||
1923 | 1923 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
1924 | 1924 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform); |
1925 | 1925 | |
1926 | - $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn; |
|
1926 | + $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn; |
|
1927 | 1927 | } |
1928 | 1928 | |
1929 | 1929 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -1931,7 +1931,7 @@ discard block |
||
1931 | 1931 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1932 | 1932 | } |
1933 | 1933 | |
1934 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql; |
|
1934 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql; |
|
1935 | 1935 | } |
1936 | 1936 | |
1937 | 1937 | $sql .= implode(' AND ', $sqlParts); |
@@ -1947,8 +1947,8 @@ discard block |
||
1947 | 1947 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1948 | 1948 | |
1949 | 1949 | // join to target table |
1950 | - $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias |
|
1951 | - . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON '; |
|
1950 | + $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias |
|
1951 | + . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON '; |
|
1952 | 1952 | |
1953 | 1953 | // join conditions |
1954 | 1954 | $joinColumns = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns']; |
@@ -1957,7 +1957,7 @@ discard block |
||
1957 | 1957 | foreach ($joinColumns as $joinColumn) { |
1958 | 1958 | $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform); |
1959 | 1959 | |
1960 | - $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn; |
|
1960 | + $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn; |
|
1961 | 1961 | } |
1962 | 1962 | |
1963 | 1963 | $sql .= implode(' AND ', $joinSqlParts); |
@@ -1969,7 +1969,7 @@ discard block |
||
1969 | 1969 | foreach ($joinColumns as $joinColumn) { |
1970 | 1970 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform); |
1971 | 1971 | |
1972 | - $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn; |
|
1972 | + $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn; |
|
1973 | 1973 | } |
1974 | 1974 | |
1975 | 1975 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -1977,13 +1977,13 @@ discard block |
||
1977 | 1977 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1978 | 1978 | } |
1979 | 1979 | |
1980 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')'; |
|
1980 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')'; |
|
1981 | 1981 | } |
1982 | 1982 | |
1983 | 1983 | $sql .= implode(' AND ', $sqlParts); |
1984 | 1984 | } |
1985 | 1985 | |
1986 | - return $sql . ')'; |
|
1986 | + return $sql.')'; |
|
1987 | 1987 | } |
1988 | 1988 | |
1989 | 1989 | /** |
@@ -1994,7 +1994,7 @@ discard block |
||
1994 | 1994 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
1995 | 1995 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
1996 | 1996 | |
1997 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
1997 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
1998 | 1998 | } |
1999 | 1999 | |
2000 | 2000 | /** |
@@ -2003,19 +2003,19 @@ discard block |
||
2003 | 2003 | public function walkNullComparisonExpression($nullCompExpr) |
2004 | 2004 | { |
2005 | 2005 | $expression = $nullCompExpr->expression; |
2006 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2006 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2007 | 2007 | |
2008 | 2008 | // Handle ResultVariable |
2009 | 2009 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2010 | - return $this->walkResultVariable($expression) . $comparison; |
|
2010 | + return $this->walkResultVariable($expression).$comparison; |
|
2011 | 2011 | } |
2012 | 2012 | |
2013 | 2013 | // Handle InputParameter mapping inclusion to ParserResult |
2014 | 2014 | if ($expression instanceof AST\InputParameter) { |
2015 | - return $this->walkInputParameter($expression) . $comparison; |
|
2015 | + return $this->walkInputParameter($expression).$comparison; |
|
2016 | 2016 | } |
2017 | 2017 | |
2018 | - return $expression->dispatch($this) . $comparison; |
|
2018 | + return $expression->dispatch($this).$comparison; |
|
2019 | 2019 | } |
2020 | 2020 | |
2021 | 2021 | /** |
@@ -2023,7 +2023,7 @@ discard block |
||
2023 | 2023 | */ |
2024 | 2024 | public function walkInExpression($inExpr) |
2025 | 2025 | { |
2026 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2026 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2027 | 2027 | |
2028 | 2028 | $sql .= ($inExpr->subselect) |
2029 | 2029 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2050,10 +2050,10 @@ discard block |
||
2050 | 2050 | } |
2051 | 2051 | |
2052 | 2052 | if ($this->useSqlTableAliases) { |
2053 | - $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.'; |
|
2053 | + $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.'; |
|
2054 | 2054 | } |
2055 | 2055 | |
2056 | - $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
2056 | + $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
2057 | 2057 | $sql .= $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr); |
2058 | 2058 | |
2059 | 2059 | return $sql; |
@@ -2100,8 +2100,8 @@ discard block |
||
2100 | 2100 | $sql .= ' NOT'; |
2101 | 2101 | } |
2102 | 2102 | |
2103 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2104 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2103 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2104 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2105 | 2105 | |
2106 | 2106 | return $sql; |
2107 | 2107 | } |
@@ -2116,7 +2116,7 @@ discard block |
||
2116 | 2116 | ? $this->walkResultVariable($stringExpr) |
2117 | 2117 | : $stringExpr->dispatch($this); |
2118 | 2118 | |
2119 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2119 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2120 | 2120 | |
2121 | 2121 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2122 | 2122 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2129,7 +2129,7 @@ discard block |
||
2129 | 2129 | } |
2130 | 2130 | |
2131 | 2131 | if ($likeExpr->escapeChar) { |
2132 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2132 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2133 | 2133 | } |
2134 | 2134 | |
2135 | 2135 | return $sql; |
@@ -2156,7 +2156,7 @@ discard block |
||
2156 | 2156 | ? $leftExpr->dispatch($this) |
2157 | 2157 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2158 | 2158 | |
2159 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2159 | + $sql .= ' '.$compExpr->operator.' '; |
|
2160 | 2160 | |
2161 | 2161 | $sql .= ($rightExpr instanceof AST\Node) |
2162 | 2162 | ? $rightExpr->dispatch($this) |
@@ -2188,7 +2188,7 @@ discard block |
||
2188 | 2188 | { |
2189 | 2189 | return ($arithmeticExpr->isSimpleArithmeticExpression()) |
2190 | 2190 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2191 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2191 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2192 | 2192 | } |
2193 | 2193 | |
2194 | 2194 | /** |
@@ -2242,7 +2242,7 @@ discard block |
||
2242 | 2242 | |
2243 | 2243 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2244 | 2244 | |
2245 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2245 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2246 | 2246 | } |
2247 | 2247 | |
2248 | 2248 | /** |
@@ -2255,7 +2255,7 @@ discard block |
||
2255 | 2255 | public function walkArithmeticPrimary($primary) |
2256 | 2256 | { |
2257 | 2257 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2258 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2258 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2259 | 2259 | } |
2260 | 2260 | |
2261 | 2261 | if ($primary instanceof AST\Node) { |
@@ -2319,6 +2319,6 @@ discard block |
||
2319 | 2319 | $sqlParameterList[] = $this->conn->quote($dis); |
2320 | 2320 | } |
2321 | 2321 | |
2322 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2322 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2323 | 2323 | } |
2324 | 2324 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | /** |
34 | 34 | * @var string |
35 | 35 | */ |
36 | - protected $preSeparator = ''; |
|
36 | + protected $preSeparator = ''; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var string |
@@ -102,7 +102,7 @@ |
||
102 | 102 | [$pathExpression] |
103 | 103 | ); |
104 | 104 | $expression = new InExpression($arithmeticExpression); |
105 | - $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS); |
|
105 | + $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS); |
|
106 | 106 | |
107 | 107 | } else { |
108 | 108 | $expression = new NullComparisonExpression($pathExpression); |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | |
1292 | 1292 | $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata); |
1293 | 1293 | $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName'] |
1294 | - . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n"; |
|
1294 | + . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n"; |
|
1295 | 1295 | } |
1296 | 1296 | |
1297 | 1297 | return implode("\n", $lines); |
@@ -1319,7 +1319,7 @@ discard block |
||
1319 | 1319 | |
1320 | 1320 | $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata); |
1321 | 1321 | $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName'] |
1322 | - . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n"; |
|
1322 | + . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n"; |
|
1323 | 1323 | } |
1324 | 1324 | |
1325 | 1325 | return implode("\n", $lines); |
@@ -1382,14 +1382,14 @@ discard block |
||
1382 | 1382 | } |
1383 | 1383 | |
1384 | 1384 | $replacements = [ |
1385 | - '<description>' => ucfirst($type) . ' ' . $variableName . '.', |
|
1386 | - '<methodTypeHint>' => $methodTypeHint, |
|
1387 | - '<variableType>' => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''), |
|
1388 | - '<variableName>' => $variableName, |
|
1389 | - '<methodName>' => $methodName, |
|
1390 | - '<fieldName>' => $fieldName, |
|
1391 | - '<variableDefault>' => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '', |
|
1392 | - '<entity>' => $this->getClassName($metadata) |
|
1385 | + '<description>' => ucfirst($type) . ' ' . $variableName . '.', |
|
1386 | + '<methodTypeHint>' => $methodTypeHint, |
|
1387 | + '<variableType>' => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''), |
|
1388 | + '<variableName>' => $variableName, |
|
1389 | + '<methodName>' => $methodName, |
|
1390 | + '<fieldName>' => $fieldName, |
|
1391 | + '<variableDefault>' => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '', |
|
1392 | + '<entity>' => $this->getClassName($metadata) |
|
1393 | 1393 | ]; |
1394 | 1394 | |
1395 | 1395 | $method = str_replace( |
@@ -1525,11 +1525,21 @@ |
||
1525 | 1525 | if ($associationMapping['cascade']) { |
1526 | 1526 | $cascades = []; |
1527 | 1527 | |
1528 | - if ($associationMapping['isCascadePersist']) $cascades[] = '"persist"'; |
|
1529 | - if ($associationMapping['isCascadeRemove']) $cascades[] = '"remove"'; |
|
1530 | - if ($associationMapping['isCascadeDetach']) $cascades[] = '"detach"'; |
|
1531 | - if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"'; |
|
1532 | - if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"'; |
|
1528 | + if ($associationMapping['isCascadePersist']) { |
|
1529 | + $cascades[] = '"persist"'; |
|
1530 | + } |
|
1531 | + if ($associationMapping['isCascadeRemove']) { |
|
1532 | + $cascades[] = '"remove"'; |
|
1533 | + } |
|
1534 | + if ($associationMapping['isCascadeDetach']) { |
|
1535 | + $cascades[] = '"detach"'; |
|
1536 | + } |
|
1537 | + if ($associationMapping['isCascadeMerge']) { |
|
1538 | + $cascades[] = '"merge"'; |
|
1539 | + } |
|
1540 | + if ($associationMapping['isCascadeRefresh']) { |
|
1541 | + $cascades[] = '"refresh"'; |
|
1542 | + } |
|
1533 | 1543 | |
1534 | 1544 | if (count($cascades) === 5) { |
1535 | 1545 | $cascades = ['"all"']; |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | */ |
367 | 367 | public function writeEntityClass(ClassMetadata $metadata, $outputDirectory) |
368 | 368 | { |
369 | - $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension; |
|
369 | + $path = $outputDirectory.'/'.str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name).$this->extension; |
|
370 | 370 | $dir = dirname($path); |
371 | 371 | |
372 | 372 | if ( ! is_dir($dir)) { |
@@ -382,8 +382,8 @@ discard block |
||
382 | 382 | } |
383 | 383 | |
384 | 384 | if ($this->backupExisting && file_exists($path)) { |
385 | - $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~"; |
|
386 | - if (!copy($path, $backupPath)) { |
|
385 | + $backupPath = dirname($path).DIRECTORY_SEPARATOR.basename($path)."~"; |
|
386 | + if ( ! copy($path, $backupPath)) { |
|
387 | 387 | throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed."); |
388 | 388 | } |
389 | 389 | } |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | $body = str_replace('<spaces>', $this->spaces, $body); |
445 | 445 | $last = strrpos($currentCode, '}'); |
446 | 446 | |
447 | - return substr($currentCode, 0, $last) . $body . ($body ? "\n" : '') . "}\n"; |
|
447 | + return substr($currentCode, 0, $last).$body.($body ? "\n" : '')."}\n"; |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | /** |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | public function setFieldVisibility($visibility) |
509 | 509 | { |
510 | 510 | if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) { |
511 | - throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility); |
|
511 | + throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility); |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | $this->fieldVisibility = $visibility; |
@@ -605,11 +605,11 @@ discard block |
||
605 | 605 | */ |
606 | 606 | protected function generateEntityNamespace(ClassMetadata $metadata) |
607 | 607 | { |
608 | - if (! $this->hasNamespace($metadata)) { |
|
608 | + if ( ! $this->hasNamespace($metadata)) { |
|
609 | 609 | return ''; |
610 | 610 | } |
611 | 611 | |
612 | - return 'namespace ' . $this->getNamespace($metadata) .';'; |
|
612 | + return 'namespace '.$this->getNamespace($metadata).';'; |
|
613 | 613 | } |
614 | 614 | |
615 | 615 | /** |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | */ |
618 | 618 | protected function generateEntityUse() |
619 | 619 | { |
620 | - if (! $this->generateAnnotations) { |
|
620 | + if ( ! $this->generateAnnotations) { |
|
621 | 621 | return ''; |
622 | 622 | } |
623 | 623 | |
@@ -631,8 +631,8 @@ discard block |
||
631 | 631 | */ |
632 | 632 | protected function generateEntityClassName(ClassMetadata $metadata) |
633 | 633 | { |
634 | - return 'class ' . $this->getClassName($metadata) . |
|
635 | - ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null); |
|
634 | + return 'class '.$this->getClassName($metadata). |
|
635 | + ($this->extendsClass() ? ' extends '.$this->getClassToExtendName() : null); |
|
636 | 636 | } |
637 | 637 | |
638 | 638 | /** |
@@ -734,13 +734,13 @@ discard block |
||
734 | 734 | $fieldMappings = array_merge($requiredFields, $optionalFields); |
735 | 735 | |
736 | 736 | foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) { |
737 | - $paramType = '\\' . ltrim($embeddedClass['class'], '\\'); |
|
738 | - $paramVariable = '$' . $fieldName; |
|
737 | + $paramType = '\\'.ltrim($embeddedClass['class'], '\\'); |
|
738 | + $paramVariable = '$'.$fieldName; |
|
739 | 739 | |
740 | 740 | $paramTypes[] = $paramType; |
741 | 741 | $paramVariables[] = $paramVariable; |
742 | - $params[] = $paramType . ' ' . $paramVariable; |
|
743 | - $fields[] = '$this->' . $fieldName . ' = ' . $paramVariable . ';'; |
|
742 | + $params[] = $paramType.' '.$paramVariable; |
|
743 | + $fields[] = '$this->'.$fieldName.' = '.$paramVariable.';'; |
|
744 | 744 | } |
745 | 745 | |
746 | 746 | foreach ($fieldMappings as $fieldMapping) { |
@@ -748,27 +748,27 @@ discard block |
||
748 | 748 | continue; |
749 | 749 | } |
750 | 750 | |
751 | - $paramTypes[] = $this->getType($fieldMapping['type']) . (!empty($fieldMapping['nullable']) ? '|null' : ''); |
|
752 | - $param = '$' . $fieldMapping['fieldName']; |
|
751 | + $paramTypes[] = $this->getType($fieldMapping['type']).( ! empty($fieldMapping['nullable']) ? '|null' : ''); |
|
752 | + $param = '$'.$fieldMapping['fieldName']; |
|
753 | 753 | $paramVariables[] = $param; |
754 | 754 | |
755 | 755 | if ($fieldMapping['type'] === 'datetime') { |
756 | - $param = $this->getType($fieldMapping['type']) . ' ' . $param; |
|
756 | + $param = $this->getType($fieldMapping['type']).' '.$param; |
|
757 | 757 | } |
758 | 758 | |
759 | - if (!empty($fieldMapping['nullable'])) { |
|
759 | + if ( ! empty($fieldMapping['nullable'])) { |
|
760 | 760 | $param .= ' = null'; |
761 | 761 | } |
762 | 762 | |
763 | 763 | $params[] = $param; |
764 | 764 | |
765 | - $fields[] = '$this->' . $fieldMapping['fieldName'] . ' = $' . $fieldMapping['fieldName'] . ';'; |
|
765 | + $fields[] = '$this->'.$fieldMapping['fieldName'].' = $'.$fieldMapping['fieldName'].';'; |
|
766 | 766 | } |
767 | 767 | |
768 | 768 | $maxParamTypeLength = max(array_map('strlen', $paramTypes)); |
769 | 769 | $paramTags = array_map( |
770 | - function ($type, $variable) use ($maxParamTypeLength) { |
|
771 | - return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable; |
|
770 | + function($type, $variable) use ($maxParamTypeLength) { |
|
771 | + return '@param '.$type.str_repeat(' ', $maxParamTypeLength - strlen($type) + 1).$variable; |
|
772 | 772 | }, |
773 | 773 | $paramTypes, |
774 | 774 | $paramVariables |
@@ -776,8 +776,8 @@ discard block |
||
776 | 776 | |
777 | 777 | // Generate multi line constructor if the signature exceeds 120 characters. |
778 | 778 | if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) { |
779 | - $delimiter = "\n" . $this->spaces; |
|
780 | - $params = $delimiter . implode(',' . $delimiter, $params) . "\n"; |
|
779 | + $delimiter = "\n".$this->spaces; |
|
780 | + $params = $delimiter.implode(','.$delimiter, $params)."\n"; |
|
781 | 781 | } else { |
782 | 782 | $params = implode(', ', $params); |
783 | 783 | } |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | $replacements = [ |
786 | 786 | '<paramTags>' => implode("\n * ", $paramTags), |
787 | 787 | '<params>' => $params, |
788 | - '<fields>' => implode("\n" . $this->spaces, $fields), |
|
788 | + '<fields>' => implode("\n".$this->spaces, $fields), |
|
789 | 789 | ]; |
790 | 790 | |
791 | 791 | $constructor = str_replace( |
@@ -830,7 +830,7 @@ discard block |
||
830 | 830 | |
831 | 831 | if ($inClass) { |
832 | 832 | $inClass = false; |
833 | - $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1]; |
|
833 | + $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1]; |
|
834 | 834 | $this->staticReflection[$lastSeenClass]['properties'] = []; |
835 | 835 | $this->staticReflection[$lastSeenClass]['methods'] = []; |
836 | 836 | } |
@@ -838,16 +838,16 @@ discard block |
||
838 | 838 | if (T_NAMESPACE === $token[0]) { |
839 | 839 | $lastSeenNamespace = ''; |
840 | 840 | $inNamespace = true; |
841 | - } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i-1][0]) { |
|
841 | + } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i - 1][0]) { |
|
842 | 842 | $inClass = true; |
843 | 843 | } elseif (T_FUNCTION === $token[0]) { |
844 | - if (T_STRING === $tokens[$i+2][0]) { |
|
845 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]); |
|
846 | - } elseif ($tokens[$i+2] == '&' && T_STRING === $tokens[$i+3][0]) { |
|
847 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]); |
|
844 | + if (T_STRING === $tokens[$i + 2][0]) { |
|
845 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]); |
|
846 | + } elseif ($tokens[$i + 2] == '&' && T_STRING === $tokens[$i + 3][0]) { |
|
847 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]); |
|
848 | 848 | } |
849 | - } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i+2][0]) { |
|
850 | - $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1); |
|
849 | + } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i + 2][0]) { |
|
850 | + $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1); |
|
851 | 851 | } |
852 | 852 | } |
853 | 853 | } |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | */ |
861 | 861 | protected function hasProperty($property, ClassMetadata $metadata) |
862 | 862 | { |
863 | - if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) { |
|
863 | + if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) { |
|
864 | 864 | // don't generate property if its already on the base class. |
865 | 865 | $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name); |
866 | 866 | if ($reflClass->hasProperty($property)) { |
@@ -889,7 +889,7 @@ discard block |
||
889 | 889 | */ |
890 | 890 | protected function hasMethod($method, ClassMetadata $metadata) |
891 | 891 | { |
892 | - if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) { |
|
892 | + if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) { |
|
893 | 893 | // don't generate method if its already on the base class. |
894 | 894 | $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name); |
895 | 895 | |
@@ -920,7 +920,7 @@ discard block |
||
920 | 920 | */ |
921 | 921 | protected function getTraits(ClassMetadata $metadata) |
922 | 922 | { |
923 | - if (! ($metadata->reflClass !== null || class_exists($metadata->name))) { |
|
923 | + if ( ! ($metadata->reflClass !== null || class_exists($metadata->name))) { |
|
924 | 924 | return []; |
925 | 925 | } |
926 | 926 | |
@@ -970,7 +970,7 @@ discard block |
||
970 | 970 | { |
971 | 971 | $refl = new \ReflectionClass($this->getClassToExtend()); |
972 | 972 | |
973 | - return '\\' . $refl->getName(); |
|
973 | + return '\\'.$refl->getName(); |
|
974 | 974 | } |
975 | 975 | |
976 | 976 | /** |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | { |
1004 | 1004 | $lines = []; |
1005 | 1005 | $lines[] = '/**'; |
1006 | - $lines[] = ' * ' . $this->getClassName($metadata); |
|
1006 | + $lines[] = ' * '.$this->getClassName($metadata); |
|
1007 | 1007 | |
1008 | 1008 | if ($this->generateAnnotations) { |
1009 | 1009 | $lines[] = ' *'; |
@@ -1019,12 +1019,12 @@ discard block |
||
1019 | 1019 | |
1020 | 1020 | foreach ($methods as $method) { |
1021 | 1021 | if ($code = $this->$method($metadata)) { |
1022 | - $lines[] = ' * ' . $code; |
|
1022 | + $lines[] = ' * '.$code; |
|
1023 | 1023 | } |
1024 | 1024 | } |
1025 | 1025 | |
1026 | 1026 | if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) { |
1027 | - $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks'; |
|
1027 | + $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks'; |
|
1028 | 1028 | } |
1029 | 1029 | } |
1030 | 1030 | |
@@ -1040,17 +1040,17 @@ discard block |
||
1040 | 1040 | */ |
1041 | 1041 | protected function generateEntityAnnotation(ClassMetadata $metadata) |
1042 | 1042 | { |
1043 | - $prefix = '@' . $this->annotationsPrefix; |
|
1043 | + $prefix = '@'.$this->annotationsPrefix; |
|
1044 | 1044 | |
1045 | 1045 | if ($metadata->isEmbeddedClass) { |
1046 | - return $prefix . 'Embeddable'; |
|
1046 | + return $prefix.'Embeddable'; |
|
1047 | 1047 | } |
1048 | 1048 | |
1049 | 1049 | $customRepository = $metadata->customRepositoryClassName |
1050 | - ? '(repositoryClass="' . $metadata->customRepositoryClassName . '")' |
|
1050 | + ? '(repositoryClass="'.$metadata->customRepositoryClassName.'")' |
|
1051 | 1051 | : ''; |
1052 | 1052 | |
1053 | - return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository; |
|
1053 | + return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository; |
|
1054 | 1054 | } |
1055 | 1055 | |
1056 | 1056 | /** |
@@ -1067,28 +1067,28 @@ discard block |
||
1067 | 1067 | $table = []; |
1068 | 1068 | |
1069 | 1069 | if (isset($metadata->table['schema'])) { |
1070 | - $table[] = 'schema="' . $metadata->table['schema'] . '"'; |
|
1070 | + $table[] = 'schema="'.$metadata->table['schema'].'"'; |
|
1071 | 1071 | } |
1072 | 1072 | |
1073 | 1073 | if (isset($metadata->table['name'])) { |
1074 | - $table[] = 'name="' . $metadata->table['name'] . '"'; |
|
1074 | + $table[] = 'name="'.$metadata->table['name'].'"'; |
|
1075 | 1075 | } |
1076 | 1076 | |
1077 | 1077 | if (isset($metadata->table['options']) && $metadata->table['options']) { |
1078 | - $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}'; |
|
1078 | + $table[] = 'options={'.$this->exportTableOptions((array) $metadata->table['options']).'}'; |
|
1079 | 1079 | } |
1080 | 1080 | |
1081 | 1081 | if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) { |
1082 | 1082 | $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']); |
1083 | - $table[] = 'uniqueConstraints={' . $constraints . '}'; |
|
1083 | + $table[] = 'uniqueConstraints={'.$constraints.'}'; |
|
1084 | 1084 | } |
1085 | 1085 | |
1086 | 1086 | if (isset($metadata->table['indexes']) && $metadata->table['indexes']) { |
1087 | 1087 | $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']); |
1088 | - $table[] = 'indexes={' . $constraints . '}'; |
|
1088 | + $table[] = 'indexes={'.$constraints.'}'; |
|
1089 | 1089 | } |
1090 | 1090 | |
1091 | - return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')'; |
|
1091 | + return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')'; |
|
1092 | 1092 | } |
1093 | 1093 | |
1094 | 1094 | /** |
@@ -1103,9 +1103,9 @@ discard block |
||
1103 | 1103 | foreach ($constraints as $name => $constraint) { |
1104 | 1104 | $columns = []; |
1105 | 1105 | foreach ($constraint['columns'] as $column) { |
1106 | - $columns[] = '"' . $column . '"'; |
|
1106 | + $columns[] = '"'.$column.'"'; |
|
1107 | 1107 | } |
1108 | - $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})'; |
|
1108 | + $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})'; |
|
1109 | 1109 | } |
1110 | 1110 | |
1111 | 1111 | return implode(', ', $annotations); |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | return ''; |
1123 | 1123 | } |
1124 | 1124 | |
1125 | - return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")'; |
|
1125 | + return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")'; |
|
1126 | 1126 | } |
1127 | 1127 | |
1128 | 1128 | /** |
@@ -1137,11 +1137,11 @@ discard block |
||
1137 | 1137 | } |
1138 | 1138 | |
1139 | 1139 | $discrColumn = $metadata->discriminatorColumn; |
1140 | - $columnDefinition = 'name="' . $discrColumn['name'] |
|
1141 | - . '", type="' . $discrColumn['type'] |
|
1142 | - . '", length=' . $discrColumn['length']; |
|
1140 | + $columnDefinition = 'name="'.$discrColumn['name'] |
|
1141 | + . '", type="'.$discrColumn['type'] |
|
1142 | + . '", length='.$discrColumn['length']; |
|
1143 | 1143 | |
1144 | - return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')'; |
|
1144 | + return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')'; |
|
1145 | 1145 | } |
1146 | 1146 | |
1147 | 1147 | /** |
@@ -1158,10 +1158,10 @@ discard block |
||
1158 | 1158 | $inheritanceClassMap = []; |
1159 | 1159 | |
1160 | 1160 | foreach ($metadata->discriminatorMap as $type => $class) { |
1161 | - $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"'; |
|
1161 | + $inheritanceClassMap[] .= '"'.$type.'" = "'.$class.'"'; |
|
1162 | 1162 | } |
1163 | 1163 | |
1164 | - return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})'; |
|
1164 | + return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})'; |
|
1165 | 1165 | } |
1166 | 1166 | |
1167 | 1167 | /** |
@@ -1180,8 +1180,8 @@ discard block |
||
1180 | 1180 | |
1181 | 1181 | $nullableField = $this->nullableFieldExpression($fieldMapping); |
1182 | 1182 | |
1183 | - if ((!$metadata->isEmbeddedClass || !$this->embeddablesImmutable) |
|
1184 | - && (!isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType === ClassMetadata::GENERATOR_TYPE_NONE) |
|
1183 | + if (( ! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable) |
|
1184 | + && ( ! isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType === ClassMetadata::GENERATOR_TYPE_NONE) |
|
1185 | 1185 | && $code = $this->generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'], $nullableField) |
1186 | 1186 | ) { |
1187 | 1187 | $methods[] = $code; |
@@ -1252,7 +1252,7 @@ discard block |
||
1252 | 1252 | } |
1253 | 1253 | |
1254 | 1254 | foreach ($joinColumns as $joinColumn) { |
1255 | - if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) { |
|
1255 | + if (isset($joinColumn['nullable']) && ! $joinColumn['nullable']) { |
|
1256 | 1256 | return false; |
1257 | 1257 | } |
1258 | 1258 | } |
@@ -1297,8 +1297,8 @@ discard block |
||
1297 | 1297 | } |
1298 | 1298 | |
1299 | 1299 | $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata); |
1300 | - $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName'] |
|
1301 | - . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n"; |
|
1300 | + $lines[] = $this->spaces.$this->fieldVisibility.' $'.$associationMapping['fieldName'] |
|
1301 | + . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null).";\n"; |
|
1302 | 1302 | } |
1303 | 1303 | |
1304 | 1304 | return implode("\n", $lines); |
@@ -1322,8 +1322,8 @@ discard block |
||
1322 | 1322 | } |
1323 | 1323 | |
1324 | 1324 | $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata); |
1325 | - $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName'] |
|
1326 | - . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n"; |
|
1325 | + $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldMapping['fieldName'] |
|
1326 | + . (isset($fieldMapping['options']['default']) ? ' = '.var_export($fieldMapping['options']['default'], true) : null).";\n"; |
|
1327 | 1327 | } |
1328 | 1328 | |
1329 | 1329 | return implode("\n", $lines); |
@@ -1344,7 +1344,7 @@ discard block |
||
1344 | 1344 | } |
1345 | 1345 | |
1346 | 1346 | $lines[] = $this->generateEmbeddedPropertyDocBlock($embeddedClass); |
1347 | - $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . ";\n"; |
|
1347 | + $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.";\n"; |
|
1348 | 1348 | } |
1349 | 1349 | |
1350 | 1350 | return implode("\n", $lines); |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | */ |
1362 | 1362 | protected function generateEntityStubMethod(ClassMetadata $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null) |
1363 | 1363 | { |
1364 | - $methodName = $type . Inflector::classify($fieldName); |
|
1364 | + $methodName = $type.Inflector::classify($fieldName); |
|
1365 | 1365 | $variableName = Inflector::camelize($fieldName); |
1366 | 1366 | if (in_array($type, ["add", "remove"])) { |
1367 | 1367 | $methodName = Inflector::singularize($methodName); |
@@ -1381,18 +1381,18 @@ discard block |
||
1381 | 1381 | $variableType = $typeHint ? $this->getType($typeHint) : null; |
1382 | 1382 | |
1383 | 1383 | if ($typeHint && ! isset($types[$typeHint])) { |
1384 | - $variableType = '\\' . ltrim($variableType, '\\'); |
|
1385 | - $methodTypeHint = '\\' . $typeHint . ' '; |
|
1384 | + $variableType = '\\'.ltrim($variableType, '\\'); |
|
1385 | + $methodTypeHint = '\\'.$typeHint.' '; |
|
1386 | 1386 | } |
1387 | 1387 | |
1388 | 1388 | $replacements = [ |
1389 | - '<description>' => ucfirst($type) . ' ' . $variableName . '.', |
|
1389 | + '<description>' => ucfirst($type).' '.$variableName.'.', |
|
1390 | 1390 | '<methodTypeHint>' => $methodTypeHint, |
1391 | - '<variableType>' => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''), |
|
1391 | + '<variableType>' => $variableType.(null !== $defaultValue ? ('|'.$defaultValue) : ''), |
|
1392 | 1392 | '<variableName>' => $variableName, |
1393 | 1393 | '<methodName>' => $methodName, |
1394 | 1394 | '<fieldName>' => $fieldName, |
1395 | - '<variableDefault>' => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '', |
|
1395 | + '<variableDefault>' => ($defaultValue !== null) ? (' = '.$defaultValue) : '', |
|
1396 | 1396 | '<entity>' => $this->getClassName($metadata) |
1397 | 1397 | ]; |
1398 | 1398 | |
@@ -1421,7 +1421,7 @@ discard block |
||
1421 | 1421 | $this->staticReflection[$metadata->name]['methods'][] = $methodName; |
1422 | 1422 | |
1423 | 1423 | $replacements = [ |
1424 | - '<name>' => $this->annotationsPrefix . ucfirst($name), |
|
1424 | + '<name>' => $this->annotationsPrefix.ucfirst($name), |
|
1425 | 1425 | '<methodName>' => $methodName, |
1426 | 1426 | ]; |
1427 | 1427 | |
@@ -1444,30 +1444,30 @@ discard block |
||
1444 | 1444 | $joinColumnAnnot = []; |
1445 | 1445 | |
1446 | 1446 | if (isset($joinColumn['name'])) { |
1447 | - $joinColumnAnnot[] = 'name="' . $joinColumn['name'] . '"'; |
|
1447 | + $joinColumnAnnot[] = 'name="'.$joinColumn['name'].'"'; |
|
1448 | 1448 | } |
1449 | 1449 | |
1450 | 1450 | if (isset($joinColumn['referencedColumnName'])) { |
1451 | - $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn['referencedColumnName'] . '"'; |
|
1451 | + $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn['referencedColumnName'].'"'; |
|
1452 | 1452 | } |
1453 | 1453 | |
1454 | 1454 | if (isset($joinColumn['unique']) && $joinColumn['unique']) { |
1455 | - $joinColumnAnnot[] = 'unique=' . ($joinColumn['unique'] ? 'true' : 'false'); |
|
1455 | + $joinColumnAnnot[] = 'unique='.($joinColumn['unique'] ? 'true' : 'false'); |
|
1456 | 1456 | } |
1457 | 1457 | |
1458 | 1458 | if (isset($joinColumn['nullable'])) { |
1459 | - $joinColumnAnnot[] = 'nullable=' . ($joinColumn['nullable'] ? 'true' : 'false'); |
|
1459 | + $joinColumnAnnot[] = 'nullable='.($joinColumn['nullable'] ? 'true' : 'false'); |
|
1460 | 1460 | } |
1461 | 1461 | |
1462 | 1462 | if (isset($joinColumn['onDelete'])) { |
1463 | - $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"'); |
|
1463 | + $joinColumnAnnot[] = 'onDelete="'.($joinColumn['onDelete'].'"'); |
|
1464 | 1464 | } |
1465 | 1465 | |
1466 | 1466 | if (isset($joinColumn['columnDefinition'])) { |
1467 | - $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"'; |
|
1467 | + $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn['columnDefinition'].'"'; |
|
1468 | 1468 | } |
1469 | 1469 | |
1470 | - return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')'; |
|
1470 | + return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')'; |
|
1471 | 1471 | } |
1472 | 1472 | |
1473 | 1473 | /** |
@@ -1479,22 +1479,22 @@ discard block |
||
1479 | 1479 | protected function generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadata $metadata) |
1480 | 1480 | { |
1481 | 1481 | $lines = []; |
1482 | - $lines[] = $this->spaces . '/**'; |
|
1482 | + $lines[] = $this->spaces.'/**'; |
|
1483 | 1483 | |
1484 | 1484 | if ($associationMapping['type'] & ClassMetadata::TO_MANY) { |
1485 | - $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection'; |
|
1485 | + $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection'; |
|
1486 | 1486 | } else { |
1487 | - $lines[] = $this->spaces . ' * @var \\' . ltrim($associationMapping['targetEntity'], '\\'); |
|
1487 | + $lines[] = $this->spaces.' * @var \\'.ltrim($associationMapping['targetEntity'], '\\'); |
|
1488 | 1488 | } |
1489 | 1489 | |
1490 | 1490 | if ($this->generateAnnotations) { |
1491 | - $lines[] = $this->spaces . ' *'; |
|
1491 | + $lines[] = $this->spaces.' *'; |
|
1492 | 1492 | |
1493 | 1493 | if (isset($associationMapping['id']) && $associationMapping['id']) { |
1494 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id'; |
|
1494 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id'; |
|
1495 | 1495 | |
1496 | 1496 | if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) { |
1497 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")'; |
|
1497 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")'; |
|
1498 | 1498 | } |
1499 | 1499 | } |
1500 | 1500 | |
@@ -1516,15 +1516,15 @@ discard block |
||
1516 | 1516 | $typeOptions = []; |
1517 | 1517 | |
1518 | 1518 | if (isset($associationMapping['targetEntity'])) { |
1519 | - $typeOptions[] = 'targetEntity="' . $associationMapping['targetEntity'] . '"'; |
|
1519 | + $typeOptions[] = 'targetEntity="'.$associationMapping['targetEntity'].'"'; |
|
1520 | 1520 | } |
1521 | 1521 | |
1522 | 1522 | if (isset($associationMapping['inversedBy'])) { |
1523 | - $typeOptions[] = 'inversedBy="' . $associationMapping['inversedBy'] . '"'; |
|
1523 | + $typeOptions[] = 'inversedBy="'.$associationMapping['inversedBy'].'"'; |
|
1524 | 1524 | } |
1525 | 1525 | |
1526 | 1526 | if (isset($associationMapping['mappedBy'])) { |
1527 | - $typeOptions[] = 'mappedBy="' . $associationMapping['mappedBy'] . '"'; |
|
1527 | + $typeOptions[] = 'mappedBy="'.$associationMapping['mappedBy'].'"'; |
|
1528 | 1528 | } |
1529 | 1529 | |
1530 | 1530 | if ($associationMapping['cascade']) { |
@@ -1540,11 +1540,11 @@ discard block |
||
1540 | 1540 | $cascades = ['"all"']; |
1541 | 1541 | } |
1542 | 1542 | |
1543 | - $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}'; |
|
1543 | + $typeOptions[] = 'cascade={'.implode(',', $cascades).'}'; |
|
1544 | 1544 | } |
1545 | 1545 | |
1546 | 1546 | if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) { |
1547 | - $typeOptions[] = 'orphanRemoval=' . ($associationMapping['orphanRemoval'] ? 'true' : 'false'); |
|
1547 | + $typeOptions[] = 'orphanRemoval='.($associationMapping['orphanRemoval'] ? 'true' : 'false'); |
|
1548 | 1548 | } |
1549 | 1549 | |
1550 | 1550 | if (isset($associationMapping['fetch']) && $associationMapping['fetch'] !== ClassMetadata::FETCH_LAZY) { |
@@ -1553,71 +1553,71 @@ discard block |
||
1553 | 1553 | ClassMetadata::FETCH_EAGER => 'EAGER', |
1554 | 1554 | ]; |
1555 | 1555 | |
1556 | - $typeOptions[] = 'fetch="' . $fetchMap[$associationMapping['fetch']] . '"'; |
|
1556 | + $typeOptions[] = 'fetch="'.$fetchMap[$associationMapping['fetch']].'"'; |
|
1557 | 1557 | } |
1558 | 1558 | |
1559 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')'; |
|
1559 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')'; |
|
1560 | 1560 | |
1561 | 1561 | if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) { |
1562 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({'; |
|
1562 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({'; |
|
1563 | 1563 | |
1564 | 1564 | $joinColumnsLines = []; |
1565 | 1565 | |
1566 | 1566 | foreach ($associationMapping['joinColumns'] as $joinColumn) { |
1567 | 1567 | if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) { |
1568 | - $joinColumnsLines[] = $this->spaces . ' * ' . $joinColumnAnnot; |
|
1568 | + $joinColumnsLines[] = $this->spaces.' * '.$joinColumnAnnot; |
|
1569 | 1569 | } |
1570 | 1570 | } |
1571 | 1571 | |
1572 | 1572 | $lines[] = implode(",\n", $joinColumnsLines); |
1573 | - $lines[] = $this->spaces . ' * })'; |
|
1573 | + $lines[] = $this->spaces.' * })'; |
|
1574 | 1574 | } |
1575 | 1575 | |
1576 | 1576 | if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) { |
1577 | 1577 | $joinTable = []; |
1578 | - $joinTable[] = 'name="' . $associationMapping['joinTable']['name'] . '"'; |
|
1578 | + $joinTable[] = 'name="'.$associationMapping['joinTable']['name'].'"'; |
|
1579 | 1579 | |
1580 | 1580 | if (isset($associationMapping['joinTable']['schema'])) { |
1581 | - $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"'; |
|
1581 | + $joinTable[] = 'schema="'.$associationMapping['joinTable']['schema'].'"'; |
|
1582 | 1582 | } |
1583 | 1583 | |
1584 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ','; |
|
1585 | - $lines[] = $this->spaces . ' * joinColumns={'; |
|
1584 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTable).','; |
|
1585 | + $lines[] = $this->spaces.' * joinColumns={'; |
|
1586 | 1586 | |
1587 | 1587 | $joinColumnsLines = []; |
1588 | 1588 | |
1589 | 1589 | foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) { |
1590 | - $joinColumnsLines[] = $this->spaces . ' * ' . $this->generateJoinColumnAnnotation($joinColumn); |
|
1590 | + $joinColumnsLines[] = $this->spaces.' * '.$this->generateJoinColumnAnnotation($joinColumn); |
|
1591 | 1591 | } |
1592 | 1592 | |
1593 | - $lines[] = implode(",". PHP_EOL, $joinColumnsLines); |
|
1594 | - $lines[] = $this->spaces . ' * },'; |
|
1595 | - $lines[] = $this->spaces . ' * inverseJoinColumns={'; |
|
1593 | + $lines[] = implode(",".PHP_EOL, $joinColumnsLines); |
|
1594 | + $lines[] = $this->spaces.' * },'; |
|
1595 | + $lines[] = $this->spaces.' * inverseJoinColumns={'; |
|
1596 | 1596 | |
1597 | 1597 | $inverseJoinColumnsLines = []; |
1598 | 1598 | |
1599 | 1599 | foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $joinColumn) { |
1600 | - $inverseJoinColumnsLines[] = $this->spaces . ' * ' . $this->generateJoinColumnAnnotation($joinColumn); |
|
1600 | + $inverseJoinColumnsLines[] = $this->spaces.' * '.$this->generateJoinColumnAnnotation($joinColumn); |
|
1601 | 1601 | } |
1602 | 1602 | |
1603 | - $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines); |
|
1604 | - $lines[] = $this->spaces . ' * }'; |
|
1605 | - $lines[] = $this->spaces . ' * )'; |
|
1603 | + $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines); |
|
1604 | + $lines[] = $this->spaces.' * }'; |
|
1605 | + $lines[] = $this->spaces.' * )'; |
|
1606 | 1606 | } |
1607 | 1607 | |
1608 | 1608 | if (isset($associationMapping['orderBy'])) { |
1609 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({'; |
|
1609 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({'; |
|
1610 | 1610 | |
1611 | 1611 | foreach ($associationMapping['orderBy'] as $name => $direction) { |
1612 | - $lines[] = $this->spaces . ' * "' . $name . '"="' . $direction . '",'; |
|
1612 | + $lines[] = $this->spaces.' * "'.$name.'"="'.$direction.'",'; |
|
1613 | 1613 | } |
1614 | 1614 | |
1615 | 1615 | $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1); |
1616 | - $lines[] = $this->spaces . ' * })'; |
|
1616 | + $lines[] = $this->spaces.' * })'; |
|
1617 | 1617 | } |
1618 | 1618 | } |
1619 | 1619 | |
1620 | - $lines[] = $this->spaces . ' */'; |
|
1620 | + $lines[] = $this->spaces.' */'; |
|
1621 | 1621 | |
1622 | 1622 | return implode("\n", $lines); |
1623 | 1623 | } |
@@ -1631,43 +1631,43 @@ discard block |
||
1631 | 1631 | protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, ClassMetadata $metadata) |
1632 | 1632 | { |
1633 | 1633 | $lines = []; |
1634 | - $lines[] = $this->spaces . '/**'; |
|
1635 | - $lines[] = $this->spaces . ' * @var ' |
|
1634 | + $lines[] = $this->spaces.'/**'; |
|
1635 | + $lines[] = $this->spaces.' * @var ' |
|
1636 | 1636 | . $this->getType($fieldMapping['type']) |
1637 | 1637 | . ($this->nullableFieldExpression($fieldMapping) ? '|null' : ''); |
1638 | 1638 | |
1639 | 1639 | if ($this->generateAnnotations) { |
1640 | - $lines[] = $this->spaces . ' *'; |
|
1640 | + $lines[] = $this->spaces.' *'; |
|
1641 | 1641 | |
1642 | 1642 | $column = []; |
1643 | 1643 | if (isset($fieldMapping['columnName'])) { |
1644 | - $column[] = 'name="' . $fieldMapping['columnName'] . '"'; |
|
1644 | + $column[] = 'name="'.$fieldMapping['columnName'].'"'; |
|
1645 | 1645 | } |
1646 | 1646 | |
1647 | 1647 | if (isset($fieldMapping['type'])) { |
1648 | - $column[] = 'type="' . $fieldMapping['type'] . '"'; |
|
1648 | + $column[] = 'type="'.$fieldMapping['type'].'"'; |
|
1649 | 1649 | } |
1650 | 1650 | |
1651 | 1651 | if (isset($fieldMapping['length'])) { |
1652 | - $column[] = 'length=' . $fieldMapping['length']; |
|
1652 | + $column[] = 'length='.$fieldMapping['length']; |
|
1653 | 1653 | } |
1654 | 1654 | |
1655 | 1655 | if (isset($fieldMapping['precision'])) { |
1656 | - $column[] = 'precision=' . $fieldMapping['precision']; |
|
1656 | + $column[] = 'precision='.$fieldMapping['precision']; |
|
1657 | 1657 | } |
1658 | 1658 | |
1659 | 1659 | if (isset($fieldMapping['scale'])) { |
1660 | - $column[] = 'scale=' . $fieldMapping['scale']; |
|
1660 | + $column[] = 'scale='.$fieldMapping['scale']; |
|
1661 | 1661 | } |
1662 | 1662 | |
1663 | 1663 | if (isset($fieldMapping['nullable'])) { |
1664 | - $column[] = 'nullable=' . var_export($fieldMapping['nullable'], true); |
|
1664 | + $column[] = 'nullable='.var_export($fieldMapping['nullable'], true); |
|
1665 | 1665 | } |
1666 | 1666 | |
1667 | 1667 | $options = []; |
1668 | 1668 | |
1669 | 1669 | if (isset($fieldMapping['options']['default']) && $fieldMapping['options']['default']) { |
1670 | - $options[] = '"default"="' . $fieldMapping['options']['default'] .'"'; |
|
1670 | + $options[] = '"default"="'.$fieldMapping['options']['default'].'"'; |
|
1671 | 1671 | } |
1672 | 1672 | |
1673 | 1673 | if (isset($fieldMapping['options']['unsigned']) && $fieldMapping['options']['unsigned']) { |
@@ -1679,15 +1679,15 @@ discard block |
||
1679 | 1679 | } |
1680 | 1680 | |
1681 | 1681 | if (isset($fieldMapping['options']['comment']) && $fieldMapping['options']['comment']) { |
1682 | - $options[] = '"comment"="' . $fieldMapping['options']['comment'] .'"'; |
|
1682 | + $options[] = '"comment"="'.$fieldMapping['options']['comment'].'"'; |
|
1683 | 1683 | } |
1684 | 1684 | |
1685 | 1685 | if (isset($fieldMapping['options']['collation']) && $fieldMapping['options']['collation']) { |
1686 | - $options[] = '"collation"="' . $fieldMapping['options']['collation'] .'"'; |
|
1686 | + $options[] = '"collation"="'.$fieldMapping['options']['collation'].'"'; |
|
1687 | 1687 | } |
1688 | 1688 | |
1689 | 1689 | if (isset($fieldMapping['options']['check']) && $fieldMapping['options']['check']) { |
1690 | - $options[] = '"check"="' . $fieldMapping['options']['check'] .'"'; |
|
1690 | + $options[] = '"check"="'.$fieldMapping['options']['check'].'"'; |
|
1691 | 1691 | } |
1692 | 1692 | |
1693 | 1693 | if ($options) { |
@@ -1695,47 +1695,47 @@ discard block |
||
1695 | 1695 | } |
1696 | 1696 | |
1697 | 1697 | if (isset($fieldMapping['columnDefinition'])) { |
1698 | - $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"'; |
|
1698 | + $column[] = 'columnDefinition="'.$fieldMapping['columnDefinition'].'"'; |
|
1699 | 1699 | } |
1700 | 1700 | |
1701 | 1701 | if (isset($fieldMapping['unique'])) { |
1702 | - $column[] = 'unique=' . var_export($fieldMapping['unique'], true); |
|
1702 | + $column[] = 'unique='.var_export($fieldMapping['unique'], true); |
|
1703 | 1703 | } |
1704 | 1704 | |
1705 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')'; |
|
1705 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')'; |
|
1706 | 1706 | |
1707 | 1707 | if (isset($fieldMapping['id']) && $fieldMapping['id']) { |
1708 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id'; |
|
1708 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id'; |
|
1709 | 1709 | |
1710 | 1710 | if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) { |
1711 | - $lines[] = $this->spaces.' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")'; |
|
1711 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")'; |
|
1712 | 1712 | } |
1713 | 1713 | |
1714 | 1714 | if ($metadata->sequenceGeneratorDefinition) { |
1715 | 1715 | $sequenceGenerator = []; |
1716 | 1716 | |
1717 | 1717 | if (isset($metadata->sequenceGeneratorDefinition['sequenceName'])) { |
1718 | - $sequenceGenerator[] = 'sequenceName="' . $metadata->sequenceGeneratorDefinition['sequenceName'] . '"'; |
|
1718 | + $sequenceGenerator[] = 'sequenceName="'.$metadata->sequenceGeneratorDefinition['sequenceName'].'"'; |
|
1719 | 1719 | } |
1720 | 1720 | |
1721 | 1721 | if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) { |
1722 | - $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize']; |
|
1722 | + $sequenceGenerator[] = 'allocationSize='.$metadata->sequenceGeneratorDefinition['allocationSize']; |
|
1723 | 1723 | } |
1724 | 1724 | |
1725 | 1725 | if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) { |
1726 | - $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue']; |
|
1726 | + $sequenceGenerator[] = 'initialValue='.$metadata->sequenceGeneratorDefinition['initialValue']; |
|
1727 | 1727 | } |
1728 | 1728 | |
1729 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')'; |
|
1729 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $sequenceGenerator).')'; |
|
1730 | 1730 | } |
1731 | 1731 | } |
1732 | 1732 | |
1733 | 1733 | if (isset($fieldMapping['version']) && $fieldMapping['version']) { |
1734 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version'; |
|
1734 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version'; |
|
1735 | 1735 | } |
1736 | 1736 | } |
1737 | 1737 | |
1738 | - $lines[] = $this->spaces . ' */'; |
|
1738 | + $lines[] = $this->spaces.' */'; |
|
1739 | 1739 | |
1740 | 1740 | return implode("\n", $lines); |
1741 | 1741 | } |
@@ -1748,27 +1748,27 @@ discard block |
||
1748 | 1748 | protected function generateEmbeddedPropertyDocBlock(array $embeddedClass) |
1749 | 1749 | { |
1750 | 1750 | $lines = []; |
1751 | - $lines[] = $this->spaces . '/**'; |
|
1752 | - $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\'); |
|
1751 | + $lines[] = $this->spaces.'/**'; |
|
1752 | + $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\'); |
|
1753 | 1753 | |
1754 | 1754 | if ($this->generateAnnotations) { |
1755 | - $lines[] = $this->spaces . ' *'; |
|
1755 | + $lines[] = $this->spaces.' *'; |
|
1756 | 1756 | |
1757 | - $embedded = ['class="' . $embeddedClass['class'] . '"']; |
|
1757 | + $embedded = ['class="'.$embeddedClass['class'].'"']; |
|
1758 | 1758 | |
1759 | 1759 | if (isset($embeddedClass['columnPrefix'])) { |
1760 | 1760 | if (is_string($embeddedClass['columnPrefix'])) { |
1761 | - $embedded[] = 'columnPrefix="' . $embeddedClass['columnPrefix'] . '"'; |
|
1761 | + $embedded[] = 'columnPrefix="'.$embeddedClass['columnPrefix'].'"'; |
|
1762 | 1762 | } else { |
1763 | - $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true); |
|
1763 | + $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true); |
|
1764 | 1764 | } |
1765 | 1765 | } |
1766 | 1766 | |
1767 | - $lines[] = $this->spaces . ' * @' . |
|
1768 | - $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')'; |
|
1767 | + $lines[] = $this->spaces.' * @'. |
|
1768 | + $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')'; |
|
1769 | 1769 | } |
1770 | 1770 | |
1771 | - $lines[] = $this->spaces . ' */'; |
|
1771 | + $lines[] = $this->spaces.' */'; |
|
1772 | 1772 | |
1773 | 1773 | return implode("\n", $lines); |
1774 | 1774 | } |
@@ -1782,13 +1782,13 @@ discard block |
||
1782 | 1782 | $processedClasses = []; |
1783 | 1783 | foreach ($metadata->entityListeners as $event => $eventListeners) { |
1784 | 1784 | foreach ($eventListeners as $eventListener) { |
1785 | - $processedClasses[] = '"' . $eventListener['class'] . '"'; |
|
1785 | + $processedClasses[] = '"'.$eventListener['class'].'"'; |
|
1786 | 1786 | } |
1787 | 1787 | } |
1788 | 1788 | |
1789 | 1789 | return \sprintf( |
1790 | 1790 | '%s%s({%s})', |
1791 | - '@' . $this->annotationsPrefix, |
|
1791 | + '@'.$this->annotationsPrefix, |
|
1792 | 1792 | 'EntityListeners', |
1793 | 1793 | \implode(',', \array_unique($processedClasses)) |
1794 | 1794 | ); |
@@ -1806,7 +1806,7 @@ discard block |
||
1806 | 1806 | |
1807 | 1807 | foreach ($lines as $key => $value) { |
1808 | 1808 | if ( ! empty($value)) { |
1809 | - $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; |
|
1809 | + $lines[$key] = str_repeat($this->spaces, $num).$lines[$key]; |
|
1810 | 1810 | } |
1811 | 1811 | } |
1812 | 1812 | |
@@ -1888,9 +1888,9 @@ discard block |
||
1888 | 1888 | |
1889 | 1889 | foreach ($options as $name => $option) { |
1890 | 1890 | if (is_array($option)) { |
1891 | - $optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}'; |
|
1891 | + $optionsStr[] = '"'.$name.'"={'.$this->exportTableOptions($option).'}'; |
|
1892 | 1892 | } else { |
1893 | - $optionsStr[] = '"' . $name . '"="' . (string) $option . '"'; |
|
1893 | + $optionsStr[] = '"'.$name.'"="'.(string) $option.'"'; |
|
1894 | 1894 | } |
1895 | 1895 | } |
1896 | 1896 |