@@ -32,8 +32,8 @@ |
||
| 32 | 32 | $user = new CmsUser; |
| 33 | 33 | $user->id = $i; |
| 34 | 34 | $user->status = 'user'; |
| 35 | - $user->username = 'user' . $i; |
|
| 36 | - $user->name = 'Mr.Smith-' . $i; |
|
| 35 | + $user->username = 'user'.$i; |
|
| 36 | + $user->name = 'Mr.Smith-'.$i; |
|
| 37 | 37 | $this->users[] = $user; |
| 38 | 38 | |
| 39 | 39 | $this->unitOfWork->registerManaged( |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | 'u__status' => 'developer', |
| 67 | 67 | 'u__username' => 'jwage', |
| 68 | 68 | 'u__name' => 'Jonathan', |
| 69 | - 'sclr0' => 'JWAGE' . $i, |
|
| 69 | + 'sclr0' => 'JWAGE'.$i, |
|
| 70 | 70 | 'p__phonenumber' => '91' |
| 71 | 71 | ]; |
| 72 | 72 | } |
@@ -213,8 +213,8 @@ |
||
| 213 | 213 | $this->metadataCache = []; |
| 214 | 214 | |
| 215 | 215 | $this->em |
| 216 | - ->getEventManager() |
|
| 217 | - ->removeEventListener([Events::onClear], $this); |
|
| 216 | + ->getEventManager() |
|
| 217 | + ->removeEventListener([Events::onClear], $this); |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /** |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | { |
| 144 | 144 | $row = $this->stmt->fetch(PDO::FETCH_ASSOC); |
| 145 | 145 | |
| 146 | - if (! $row) { |
|
| 146 | + if ( ! $row) { |
|
| 147 | 147 | $this->cleanup(); |
| 148 | 148 | |
| 149 | 149 | return false; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | : $value; |
| 287 | 287 | |
| 288 | 288 | if ($cacheKeyInfo['isIdentifier'] && $value !== null) { |
| 289 | - $id[$dqlAlias] .= '|' . $value; |
|
| 289 | + $id[$dqlAlias] .= '|'.$value; |
|
| 290 | 290 | $nonemptyComponents[$dqlAlias] = true; |
| 291 | 291 | } |
| 292 | 292 | break; |
@@ -322,10 +322,10 @@ discard block |
||
| 322 | 322 | |
| 323 | 323 | // WARNING: BC break! We know this is the desired behavior to type convert values, but this |
| 324 | 324 | // erroneous behavior exists since 2.0 and we're forced to keep compatibility. |
| 325 | - if (! isset($cacheKeyInfo['isScalar'])) { |
|
| 325 | + if ( ! isset($cacheKeyInfo['isScalar'])) { |
|
| 326 | 326 | $dqlAlias = $cacheKeyInfo['dqlAlias']; |
| 327 | 327 | $type = $cacheKeyInfo['type']; |
| 328 | - $fieldName = $dqlAlias . '_' . $fieldName; |
|
| 328 | + $fieldName = $dqlAlias.'_'.$fieldName; |
|
| 329 | 329 | $value = $type |
| 330 | 330 | ? $type->convertToPHPValue($value, $this->platform) |
| 331 | 331 | : $value; |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | */ |
| 432 | 432 | protected function getClassMetadata($className) |
| 433 | 433 | { |
| 434 | - if (! isset($this->metadataCache[$className])) { |
|
| 434 | + if ( ! isset($this->metadataCache[$className])) { |
|
| 435 | 435 | $this->metadataCache[$className] = $this->em->getClassMetadata($className); |
| 436 | 436 | } |
| 437 | 437 | |
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | $metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE); |
| 11 | 11 | $metadata->setPrimaryTable( |
| 12 | 12 | [ |
| 13 | - 'name' => 'cms_users', |
|
| 14 | - 'options' => ['engine' => 'MyISAM', 'foo' => ['bar' => 'baz']], |
|
| 13 | + 'name' => 'cms_users', |
|
| 14 | + 'options' => ['engine' => 'MyISAM', 'foo' => ['bar' => 'baz']], |
|
| 15 | 15 | ] |
| 16 | 16 | ); |
| 17 | 17 | $metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT); |
@@ -20,35 +20,35 @@ discard block |
||
| 20 | 20 | $metadata->addLifecycleCallback('doStuffOnPostPersist', Events::postPersist); |
| 21 | 21 | $metadata->mapField( |
| 22 | 22 | [ |
| 23 | - 'id' => true, |
|
| 24 | - 'fieldName' => 'id', |
|
| 25 | - 'type' => 'integer', |
|
| 26 | - 'columnName' => 'id', |
|
| 23 | + 'id' => true, |
|
| 24 | + 'fieldName' => 'id', |
|
| 25 | + 'type' => 'integer', |
|
| 26 | + 'columnName' => 'id', |
|
| 27 | 27 | ] |
| 28 | 28 | ); |
| 29 | 29 | $metadata->mapField( |
| 30 | 30 | [ |
| 31 | - 'fieldName' => 'name', |
|
| 32 | - 'type' => 'string', |
|
| 33 | - 'length' => 50, |
|
| 34 | - 'unique' => true, |
|
| 35 | - 'nullable' => true, |
|
| 36 | - 'columnName' => 'name', |
|
| 31 | + 'fieldName' => 'name', |
|
| 32 | + 'type' => 'string', |
|
| 33 | + 'length' => 50, |
|
| 34 | + 'unique' => true, |
|
| 35 | + 'nullable' => true, |
|
| 36 | + 'columnName' => 'name', |
|
| 37 | 37 | ] |
| 38 | 38 | ); |
| 39 | 39 | $metadata->mapField( |
| 40 | 40 | [ |
| 41 | - 'fieldName' => 'email', |
|
| 42 | - 'type' => 'string', |
|
| 43 | - 'columnName' => 'user_email', |
|
| 44 | - 'columnDefinition' => 'CHAR(32) NOT NULL', |
|
| 41 | + 'fieldName' => 'email', |
|
| 42 | + 'type' => 'string', |
|
| 43 | + 'columnName' => 'user_email', |
|
| 44 | + 'columnDefinition' => 'CHAR(32) NOT NULL', |
|
| 45 | 45 | ] |
| 46 | 46 | ); |
| 47 | 47 | $metadata->mapField( |
| 48 | 48 | [ |
| 49 | - 'fieldName' => 'age', |
|
| 50 | - 'type' => 'integer', |
|
| 51 | - 'options' => ["unsigned"=>true], |
|
| 49 | + 'fieldName' => 'age', |
|
| 50 | + 'type' => 'integer', |
|
| 51 | + 'options' => ["unsigned"=>true], |
|
| 52 | 52 | ] |
| 53 | 53 | ); |
| 54 | 54 | $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO); |
@@ -60,25 +60,25 @@ discard block |
||
| 60 | 60 | ); |
| 61 | 61 | $metadata->mapOneToOne( |
| 62 | 62 | [ |
| 63 | - 'fieldName' => 'address', |
|
| 64 | - 'targetEntity' => Export\Address::class, |
|
| 65 | - 'inversedBy' => 'user', |
|
| 66 | - 'cascade' => |
|
| 67 | - [ |
|
| 68 | - 0 => 'persist', |
|
| 69 | - ], |
|
| 70 | - 'mappedBy' => NULL, |
|
| 71 | - 'joinColumns' => |
|
| 72 | - [ |
|
| 73 | - 0 => |
|
| 74 | - [ |
|
| 63 | + 'fieldName' => 'address', |
|
| 64 | + 'targetEntity' => Export\Address::class, |
|
| 65 | + 'inversedBy' => 'user', |
|
| 66 | + 'cascade' => |
|
| 67 | + [ |
|
| 68 | + 0 => 'persist', |
|
| 69 | + ], |
|
| 70 | + 'mappedBy' => NULL, |
|
| 71 | + 'joinColumns' => |
|
| 72 | + [ |
|
| 73 | + 0 => |
|
| 74 | + [ |
|
| 75 | 75 | 'name' => 'address_id', |
| 76 | 76 | 'referencedColumnName' => 'id', |
| 77 | 77 | 'onDelete' => 'CASCADE', |
| 78 | - ], |
|
| 79 | - ], |
|
| 80 | - 'orphanRemoval' => true, |
|
| 81 | - 'fetch' => ClassMetadataInfo::FETCH_EAGER, |
|
| 78 | + ], |
|
| 79 | + ], |
|
| 80 | + 'orphanRemoval' => true, |
|
| 81 | + 'fetch' => ClassMetadataInfo::FETCH_EAGER, |
|
| 82 | 82 | ] |
| 83 | 83 | ); |
| 84 | 84 | $metadata->mapOneToOne( |
@@ -97,41 +97,41 @@ discard block |
||
| 97 | 97 | ); |
| 98 | 98 | $metadata->mapOneToMany( |
| 99 | 99 | [ |
| 100 | - 'fieldName' => 'phonenumbers', |
|
| 101 | - 'targetEntity' => Export\Phonenumber::class, |
|
| 102 | - 'cascade' => |
|
| 103 | - [ |
|
| 104 | - 1 => 'persist', |
|
| 105 | - 2 => 'merge', |
|
| 106 | - ], |
|
| 107 | - 'mappedBy' => 'user', |
|
| 108 | - 'orphanRemoval' => true, |
|
| 109 | - 'fetch' => ClassMetadataInfo::FETCH_LAZY, |
|
| 110 | - 'orderBy' => |
|
| 111 | - [ |
|
| 112 | - 'number' => 'ASC', |
|
| 113 | - ], |
|
| 100 | + 'fieldName' => 'phonenumbers', |
|
| 101 | + 'targetEntity' => Export\Phonenumber::class, |
|
| 102 | + 'cascade' => |
|
| 103 | + [ |
|
| 104 | + 1 => 'persist', |
|
| 105 | + 2 => 'merge', |
|
| 106 | + ], |
|
| 107 | + 'mappedBy' => 'user', |
|
| 108 | + 'orphanRemoval' => true, |
|
| 109 | + 'fetch' => ClassMetadataInfo::FETCH_LAZY, |
|
| 110 | + 'orderBy' => |
|
| 111 | + [ |
|
| 112 | + 'number' => 'ASC', |
|
| 113 | + ], |
|
| 114 | 114 | ] |
| 115 | 115 | ); |
| 116 | 116 | $metadata->mapManyToMany( |
| 117 | 117 | [ |
| 118 | - 'fieldName' => 'groups', |
|
| 119 | - 'targetEntity' => Export\Group::class, |
|
| 120 | - 'fetch' => ClassMetadataInfo::FETCH_EXTRA_LAZY, |
|
| 121 | - 'cascade' => |
|
| 122 | - [ |
|
| 123 | - 0 => 'remove', |
|
| 124 | - 1 => 'persist', |
|
| 125 | - 2 => 'refresh', |
|
| 126 | - 3 => 'merge', |
|
| 127 | - 4 => 'detach', |
|
| 128 | - ], |
|
| 129 | - 'mappedBy' => NULL, |
|
| 130 | - 'joinTable' => |
|
| 131 | - [ |
|
| 132 | - 'name' => 'cms_users_groups', |
|
| 133 | - 'joinColumns' => |
|
| 134 | - [ |
|
| 118 | + 'fieldName' => 'groups', |
|
| 119 | + 'targetEntity' => Export\Group::class, |
|
| 120 | + 'fetch' => ClassMetadataInfo::FETCH_EXTRA_LAZY, |
|
| 121 | + 'cascade' => |
|
| 122 | + [ |
|
| 123 | + 0 => 'remove', |
|
| 124 | + 1 => 'persist', |
|
| 125 | + 2 => 'refresh', |
|
| 126 | + 3 => 'merge', |
|
| 127 | + 4 => 'detach', |
|
| 128 | + ], |
|
| 129 | + 'mappedBy' => NULL, |
|
| 130 | + 'joinTable' => |
|
| 131 | + [ |
|
| 132 | + 'name' => 'cms_users_groups', |
|
| 133 | + 'joinColumns' => |
|
| 134 | + [ |
|
| 135 | 135 | 0 => |
| 136 | 136 | [ |
| 137 | 137 | 'name' => 'user_id', |
@@ -139,18 +139,18 @@ discard block |
||
| 139 | 139 | 'unique' => false, |
| 140 | 140 | 'nullable' => false, |
| 141 | 141 | ], |
| 142 | - ], |
|
| 143 | - 'inverseJoinColumns' => |
|
| 144 | - [ |
|
| 142 | + ], |
|
| 143 | + 'inverseJoinColumns' => |
|
| 144 | + [ |
|
| 145 | 145 | 0 => |
| 146 | 146 | [ |
| 147 | 147 | 'name' => 'group_id', |
| 148 | 148 | 'referencedColumnName' => 'id', |
| 149 | 149 | 'columnDefinition' => 'INT NULL', |
| 150 | 150 | ], |
| 151 | - ], |
|
| 152 | - ], |
|
| 153 | - 'orderBy' => NULL, |
|
| 151 | + ], |
|
| 152 | + ], |
|
| 153 | + 'orderBy' => NULL, |
|
| 154 | 154 | ] |
| 155 | 155 | ); |
| 156 | 156 | $metadata->addEntityListener(Events::prePersist, UserListener::class, 'customPrePersist'); |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $eventManager->addEventListener([Events::postLoad], new DDC2602PostLoadListener()); |
| 49 | 49 | |
| 50 | 50 | $result = $this->_em->createQuery('SELECT u, b FROM Doctrine\Tests\ORM\Functional\Ticket\DDC2602User u JOIN u.biography b') |
| 51 | - ->getResult(); |
|
| 51 | + ->getResult(); |
|
| 52 | 52 | |
| 53 | 53 | self::assertCount(2, $result); |
| 54 | 54 | self::assertCount(2, $result[0]->biography->fieldList); |
@@ -149,10 +149,10 @@ |
||
| 149 | 149 | foreach ($content as $selection) { |
| 150 | 150 | $field = $result[$selection->field]; |
| 151 | 151 | $choiceList = $selection->choiceList; |
| 152 | - $fieldSelection = new DDC2602FieldSelection(); |
|
| 152 | + $fieldSelection = new DDC2602FieldSelection(); |
|
| 153 | 153 | |
| 154 | 154 | $fieldSelection->field = $field; |
| 155 | - $fieldSelection->choiceList = $field->choiceList->filter(function ($choice) use ($choiceList) { |
|
| 155 | + $fieldSelection->choiceList = $field->choiceList->filter(function($choice) use ($choiceList) { |
|
| 156 | 156 | return in_array($choice->id, $choiceList); |
| 157 | 157 | }); |
| 158 | 158 | |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | ->expects(self::once()) |
| 169 | 169 | ->method('loadCollection') |
| 170 | 170 | ->with($this->collection) |
| 171 | - ->willReturnCallback(function (PersistentCollection $persistentCollection) use ($persistedElement) : void { |
|
| 171 | + ->willReturnCallback(function(PersistentCollection $persistentCollection) use ($persistedElement) : void { |
|
| 172 | 172 | $persistentCollection->unwrap()->add($persistedElement); |
| 173 | 173 | }); |
| 174 | 174 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | ->expects(self::once()) |
| 206 | 206 | ->method('loadCollection') |
| 207 | 207 | ->with($this->collection) |
| 208 | - ->willReturnCallback(function (PersistentCollection $persistentCollection) use ( |
|
| 208 | + ->willReturnCallback(function(PersistentCollection $persistentCollection) use ( |
|
| 209 | 209 | $persistedElement, |
| 210 | 210 | $newElementThatIsAlsoPersisted |
| 211 | 211 | ) : void { |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | ->expects(self::once()) |
| 248 | 248 | ->method('loadCollection') |
| 249 | 249 | ->with($this->collection) |
| 250 | - ->willReturnCallback(function (PersistentCollection $persistentCollection) use ( |
|
| 250 | + ->willReturnCallback(function(PersistentCollection $persistentCollection) use ( |
|
| 251 | 251 | $persistedElement, |
| 252 | 252 | $newElementThatIsAlsoPersisted |
| 253 | 253 | ) : void { |
@@ -253,7 +253,7 @@ |
||
| 253 | 253 | private function processEntityListenerConfig(array $array, array $entityListenerConfig, string $event) : array |
| 254 | 254 | { |
| 255 | 255 | foreach ($entityListenerConfig as $entityListener) { |
| 256 | - if (! isset($array['entityListeners'][$entityListener['class']])) { |
|
| 256 | + if ( ! isset($array['entityListeners'][$entityListener['class']])) { |
|
| 257 | 257 | $array['entityListeners'][$entityListener['class']] = []; |
| 258 | 258 | } |
| 259 | 259 | |
@@ -51,27 +51,27 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if ($metadata->inheritanceType) { |
| 54 | - $lines[] = '$metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_' . $this->_getInheritanceTypeString($metadata->inheritanceType) . ');'; |
|
| 54 | + $lines[] = '$metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_'.$this->_getInheritanceTypeString($metadata->inheritanceType).');'; |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | if ($metadata->customRepositoryClassName) { |
| 58 | - $lines[] = "\$metadata->customRepositoryClassName = '" . $metadata->customRepositoryClassName . "';"; |
|
| 58 | + $lines[] = "\$metadata->customRepositoryClassName = '".$metadata->customRepositoryClassName."';"; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if ($metadata->table) { |
| 62 | - $lines[] = '$metadata->setPrimaryTable(' . $this->_varExport($metadata->table) . ');'; |
|
| 62 | + $lines[] = '$metadata->setPrimaryTable('.$this->_varExport($metadata->table).');'; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | if ($metadata->discriminatorColumn) { |
| 66 | - $lines[] = '$metadata->setDiscriminatorColumn(' . $this->_varExport($metadata->discriminatorColumn) . ');'; |
|
| 66 | + $lines[] = '$metadata->setDiscriminatorColumn('.$this->_varExport($metadata->discriminatorColumn).');'; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | if ($metadata->discriminatorMap) { |
| 70 | - $lines[] = '$metadata->setDiscriminatorMap(' . $this->_varExport($metadata->discriminatorMap) . ');'; |
|
| 70 | + $lines[] = '$metadata->setDiscriminatorMap('.$this->_varExport($metadata->discriminatorMap).');'; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | if ($metadata->changeTrackingPolicy) { |
| 74 | - $lines[] = '$metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_' . $this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy) . ');'; |
|
| 74 | + $lines[] = '$metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_'.$this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy).');'; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | if ($metadata->lifecycleCallbacks) { |
@@ -85,11 +85,11 @@ discard block |
||
| 85 | 85 | $lines = array_merge($lines, $this->processEntityListeners($metadata)); |
| 86 | 86 | |
| 87 | 87 | foreach ($metadata->fieldMappings as $fieldMapping) { |
| 88 | - $lines[] = '$metadata->mapField(' . $this->_varExport($fieldMapping) . ');'; |
|
| 88 | + $lines[] = '$metadata->mapField('.$this->_varExport($fieldMapping).');'; |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | if ( ! $metadata->isIdentifierComposite && $generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) { |
| 92 | - $lines[] = '$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_' . $generatorType . ');'; |
|
| 92 | + $lines[] = '$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_'.$generatorType.');'; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | foreach ($metadata->associationMappings as $associationMapping) { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $associationMappingArray = array_merge($associationMappingArray, $manyToManyMappingArray); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - $lines[] = '$metadata->' . $method . '(' . $this->_varExport($associationMappingArray) . ');'; |
|
| 158 | + $lines[] = '$metadata->'.$method.'('.$this->_varExport($associationMappingArray).');'; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | return implode("\n", $lines); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | protected function _varExport($var) |
| 170 | 170 | { |
| 171 | 171 | $export = var_export($var, true); |
| 172 | - $export = str_replace("\n", PHP_EOL . str_repeat(' ', 8), $export); |
|
| 172 | + $export = str_replace("\n", PHP_EOL.str_repeat(' ', 8), $export); |
|
| 173 | 173 | $export = str_replace(' ', ' ', $export); |
| 174 | 174 | $export = str_replace('array (', 'array(', $export); |
| 175 | 175 | $export = str_replace('array( ', 'array(', $export); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | // Evaluate named native queries |
| 110 | 110 | if (isset($element['namedNativeQueries'])) { |
| 111 | 111 | foreach ($element['namedNativeQueries'] as $name => $mappingElement) { |
| 112 | - if (!isset($mappingElement['name'])) { |
|
| 112 | + if ( ! isset($mappingElement['name'])) { |
|
| 113 | 113 | $mappingElement['name'] = $name; |
| 114 | 114 | } |
| 115 | 115 | $metadata->addNamedNativeQuery( |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | // Evaluate sql result set mappings |
| 127 | 127 | if (isset($element['sqlResultSetMappings'])) { |
| 128 | 128 | foreach ($element['sqlResultSetMappings'] as $name => $resultSetMapping) { |
| 129 | - if (!isset($resultSetMapping['name'])) { |
|
| 129 | + if ( ! isset($resultSetMapping['name'])) { |
|
| 130 | 130 | $resultSetMapping['name'] = $name; |
| 131 | 131 | } |
| 132 | 132 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | if (isset($element['inheritanceType'])) { |
| 176 | - $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); |
|
| 176 | + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.strtoupper($element['inheritanceType']))); |
|
| 177 | 177 | |
| 178 | 178 | if ($metadata->inheritanceType != Metadata::INHERITANCE_TYPE_NONE) { |
| 179 | 179 | // Evaluate discriminatorColumn |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | if (isset($oneToOneElement['fetch'])) { |
| 365 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToOneElement['fetch']); |
|
| 365 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$oneToOneElement['fetch']); |
|
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | if (isset($oneToOneElement['mappedBy'])) { |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | ]; |
| 417 | 417 | |
| 418 | 418 | if (isset($oneToManyElement['fetch'])) { |
| 419 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToManyElement['fetch']); |
|
| 419 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$oneToManyElement['fetch']); |
|
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | if (isset($oneToManyElement['cascade'])) { |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | if (isset($manyToOneElement['fetch'])) { |
| 461 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToOneElement['fetch']); |
|
| 461 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$manyToOneElement['fetch']); |
|
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | if (isset($manyToOneElement['inversedBy'])) { |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | ]; |
| 504 | 504 | |
| 505 | 505 | if (isset($manyToManyElement['fetch'])) { |
| 506 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToManyElement['fetch']); |
|
| 506 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.$manyToManyElement['fetch']); |
|
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | if (isset($manyToManyElement['mappedBy'])) { |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | if (isset($element['associationOverride']) && is_array($element['associationOverride'])) { |
| 574 | 574 | |
| 575 | 575 | foreach ($element['associationOverride'] as $fieldName => $associationOverrideElement) { |
| 576 | - $override = []; |
|
| 576 | + $override = []; |
|
| 577 | 577 | |
| 578 | 578 | // Check for joinColumn |
| 579 | 579 | if (isset($associationOverrideElement['joinColumn'])) { |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | if (isset($associationOverrideElement['joinTable'])) { |
| 592 | 592 | |
| 593 | 593 | $joinTableElement = $associationOverrideElement['joinTable']; |
| 594 | - $joinTable = [ |
|
| 594 | + $joinTable = [ |
|
| 595 | 595 | 'name' => $joinTableElement['name'] |
| 596 | 596 | ]; |
| 597 | 597 | |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | |
| 626 | 626 | // Check for `fetch` |
| 627 | 627 | if (isset($associationOverrideElement['fetch'])) { |
| 628 | - $override['fetch'] = constant(Metadata::class . '::FETCH_' . $associationOverrideElement['fetch']); |
|
| 628 | + $override['fetch'] = constant(Metadata::class.'::FETCH_'.$associationOverrideElement['fetch']); |
|
| 629 | 629 | } |
| 630 | 630 | |
| 631 | 631 | $metadata->setAssociationOverride($fieldName, $override); |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | if (isset($element['lifecycleCallbacks'])) { |
| 646 | 646 | foreach ($element['lifecycleCallbacks'] as $type => $methods) { |
| 647 | 647 | foreach ($methods as $method) { |
| 648 | - $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::' . $type)); |
|
| 648 | + $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::'.$type)); |
|
| 649 | 649 | } |
| 650 | 650 | } |
| 651 | 651 | } |
@@ -787,12 +787,12 @@ discard block |
||
| 787 | 787 | $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; |
| 788 | 788 | $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; |
| 789 | 789 | |
| 790 | - if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { |
|
| 790 | + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) { |
|
| 791 | 791 | throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); |
| 792 | 792 | } |
| 793 | 793 | |
| 794 | 794 | if ($usage) { |
| 795 | - $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); |
|
| 795 | + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage); |
|
| 796 | 796 | } |
| 797 | 797 | |
| 798 | 798 | return [ |