@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $this->_em->getClassMetadata(DDC3027Dog::class), |
29 | 29 | $this->_em->getClassMetadata(DDC3529Event::class), |
30 | 30 | ]); |
31 | - } catch(\Exception $e) { |
|
31 | + } catch (\Exception $e) { |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $this->assertEquals('United States of America', $person->address->country->name); |
84 | 84 | |
85 | 85 | // 4. check deleting works |
86 | - $personId = $person->id;; |
|
86 | + $personId = $person->id; ; |
|
87 | 87 | $this->_em->remove($person); |
88 | 88 | $this->_em->flush(); |
89 | 89 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->_em->flush(); |
108 | 108 | $this->_em->clear(); |
109 | 109 | |
110 | - $dql = "SELECT p FROM " . __NAMESPACE__ . "\DDC93Person p"; |
|
110 | + $dql = "SELECT p FROM ".__NAMESPACE__."\DDC93Person p"; |
|
111 | 111 | $persons = $this->_em->createQuery($dql)->getResult(); |
112 | 112 | |
113 | 113 | $this->assertCount(3, $persons); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $this->assertEquals('United States of America', $person->address->country->name); |
121 | 121 | } |
122 | 122 | |
123 | - $dql = "SELECT p FROM " . __NAMESPACE__ . "\DDC93Person p"; |
|
123 | + $dql = "SELECT p FROM ".__NAMESPACE__."\DDC93Person p"; |
|
124 | 124 | $persons = $this->_em->createQuery($dql)->getArrayResult(); |
125 | 125 | |
126 | 126 | foreach ($persons as $person) { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $this->_em->flush(); |
146 | 146 | |
147 | 147 | // SELECT |
148 | - $selectDql = "SELECT p FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country"; |
|
148 | + $selectDql = "SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country"; |
|
149 | 149 | $loadedPerson = $this->_em->createQuery($selectDql) |
150 | 150 | ->setParameter('city', 'Karlsruhe') |
151 | 151 | ->setParameter('country', 'Germany') |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | ); |
161 | 161 | |
162 | 162 | // UPDATE |
163 | - $updateDql = "UPDATE " . __NAMESPACE__ . "\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city"; |
|
163 | + $updateDql = "UPDATE ".__NAMESPACE__."\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city"; |
|
164 | 164 | $this->_em->createQuery($updateDql) |
165 | 165 | ->setParameter('street', 'Boo') |
166 | 166 | ->setParameter('country', 'DE') |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $this->assertEquals('DE', $person->address->country->name); |
173 | 173 | |
174 | 174 | // DELETE |
175 | - $this->_em->createQuery("DELETE " . __NAMESPACE__ . "\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country") |
|
175 | + $this->_em->createQuery("DELETE ".__NAMESPACE__."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country") |
|
176 | 176 | ->setParameter('city', 'Karlsruhe') |
177 | 177 | ->setParameter('country', 'DE') |
178 | 178 | ->execute(); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $this->_em->clear(); |
190 | 190 | |
191 | 191 | // Prove that the entity was persisted correctly. |
192 | - $dql = "SELECT p FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
192 | + $dql = "SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
193 | 193 | |
194 | 194 | $person = $this->_em->createQuery($dql) |
195 | 195 | ->setParameter('name', 'Karl') |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | // Clear the EM and prove that the embeddable can be the subject of a partial query. |
204 | 204 | $this->_em->clear(); |
205 | 205 | |
206 | - $dql = "SELECT PARTIAL p.{id,address.city} FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
206 | + $dql = "SELECT PARTIAL p.{id,address.city} FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
207 | 207 | |
208 | 208 | $person = $this->_em->createQuery($dql) |
209 | 209 | ->setParameter('name', 'Karl') |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | // Clear the EM and prove that the embeddable can be the subject of a partial query regardless of attributes positions. |
220 | 220 | $this->_em->clear(); |
221 | 221 | |
222 | - $dql = "SELECT PARTIAL p.{address.city, id} FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
222 | + $dql = "SELECT PARTIAL p.{address.city, id} FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
223 | 223 | |
224 | 224 | $person = $this->_em->createQuery($dql) |
225 | 225 | ->setParameter('name', 'Karl') |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | $this->expectException(QueryException::class); |
239 | 239 | $this->expectExceptionMessage('no field or association named address.asdfasdf'); |
240 | 240 | |
241 | - $this->_em->createQuery("SELECT p FROM " . __NAMESPACE__ . "\\DDC93Person p WHERE p.address.asdfasdf IS NULL") |
|
241 | + $this->_em->createQuery("SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.address.asdfasdf IS NULL") |
|
242 | 242 | ->execute(); |
243 | 243 | } |
244 | 244 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $this->expectException(QueryException::class); |
248 | 248 | $this->expectExceptionMessage("no mapped field named 'address.asdfasdf'"); |
249 | 249 | |
250 | - $this->_em->createQuery("SELECT PARTIAL p.{id,address.asdfasdf} FROM " . __NAMESPACE__ . "\\DDC93Person p") |
|
250 | + $this->_em->createQuery("SELECT PARTIAL p.{id,address.asdfasdf} FROM ".__NAMESPACE__."\\DDC93Person p") |
|
251 | 251 | ->execute(); |
252 | 252 | } |
253 | 253 | |
@@ -309,15 +309,15 @@ discard block |
||
309 | 309 | $this->expectException(MappingException::class); |
310 | 310 | $this->expectExceptionMessage( |
311 | 311 | sprintf( |
312 | - 'Infinite nesting detected for embedded property %s::nested. ' . |
|
312 | + 'Infinite nesting detected for embedded property %s::nested. '. |
|
313 | 313 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
314 | - __NAMESPACE__ . '\\' . $declaredEmbeddableClassName |
|
314 | + __NAMESPACE__.'\\'.$declaredEmbeddableClassName |
|
315 | 315 | ) |
316 | 316 | ); |
317 | 317 | |
318 | 318 | $this->_schemaTool->createSchema( |
319 | 319 | [ |
320 | - $this->_em->getClassMetadata(__NAMESPACE__ . '\\' . $embeddableClassName), |
|
320 | + $this->_em->getClassMetadata(__NAMESPACE__.'\\'.$embeddableClassName), |
|
321 | 321 | ] |
322 | 322 | ); |
323 | 323 | } |
@@ -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,12 +477,12 @@ 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 | 'nullable' => $embeddableClass['nullable'], |
484 | 484 | 'declaredField' => $embeddableClass['declaredField'] |
485 | - ? $prefix . '.' . $embeddableClass['declaredField'] |
|
485 | + ? $prefix.'.'.$embeddableClass['declaredField'] |
|
486 | 486 | : $prefix, |
487 | 487 | 'originalField' => $embeddableClass['originalField'] ?: $property, |
488 | 488 | ] |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | */ |
501 | 501 | private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass) |
502 | 502 | { |
503 | - if (! $parentClass->isMappedSuperclass) { |
|
503 | + if ( ! $parentClass->isMappedSuperclass) { |
|
504 | 504 | return; |
505 | 505 | } |
506 | 506 | |
@@ -708,14 +708,14 @@ discard block |
||
708 | 708 | throw new ORMException("Can't instantiate custom generator : no custom generator definition"); |
709 | 709 | } |
710 | 710 | if ( ! class_exists($definition['class'])) { |
711 | - throw new ORMException("Can't instantiate custom generator : " . |
|
711 | + throw new ORMException("Can't instantiate custom generator : ". |
|
712 | 712 | $definition['class']); |
713 | 713 | } |
714 | 714 | $class->setIdGenerator(new $definition['class']); |
715 | 715 | break; |
716 | 716 | |
717 | 717 | default: |
718 | - throw new ORMException("Unknown generator type: " . $class->generatorType); |
|
718 | + throw new ORMException("Unknown generator type: ".$class->generatorType); |
|
719 | 719 | } |
720 | 720 | } |
721 | 721 | |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | */ |
766 | 766 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) |
767 | 767 | { |
768 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
768 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
769 | 769 | } |
770 | 770 | |
771 | 771 | /** |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | */ |
790 | 790 | private function getTargetPlatform() |
791 | 791 | { |
792 | - if (!$this->targetPlatform) { |
|
792 | + if ( ! $this->targetPlatform) { |
|
793 | 793 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
794 | 794 | } |
795 | 795 |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | public function getSingleIdReflectionProperty() |
696 | 696 | { |
697 | 697 | if ($this->isIdentifierComposite) { |
698 | - throw new BadMethodCallException("Class " . $this->name . " has a composite identifier."); |
|
698 | + throw new BadMethodCallException("Class ".$this->name." has a composite identifier."); |
|
699 | 699 | } |
700 | 700 | |
701 | 701 | return $this->reflFields[$this->identifier[0]]; |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | */ |
791 | 791 | public function __toString() |
792 | 792 | { |
793 | - return __CLASS__ . '@' . spl_object_hash($this); |
|
793 | + return __CLASS__.'@'.spl_object_hash($this); |
|
794 | 794 | } |
795 | 795 | |
796 | 796 | /** |
@@ -1108,7 +1108,7 @@ discard block |
||
1108 | 1108 | } |
1109 | 1109 | |
1110 | 1110 | if ( ! isset($cache['region'])) { |
1111 | - $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; |
|
1111 | + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName; |
|
1112 | 1112 | } |
1113 | 1113 | |
1114 | 1114 | return $cache; |
@@ -1388,7 +1388,7 @@ discard block |
||
1388 | 1388 | protected function _validateAndCompleteFieldMapping(array &$mapping) |
1389 | 1389 | { |
1390 | 1390 | // Check mandatory fields |
1391 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1391 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1392 | 1392 | throw MappingException::missingFieldName($this->name); |
1393 | 1393 | } |
1394 | 1394 | |
@@ -1501,14 +1501,14 @@ discard block |
||
1501 | 1501 | $this->isIdentifierComposite = true; |
1502 | 1502 | } |
1503 | 1503 | |
1504 | - if ($this->cache && !isset($mapping['cache'])) { |
|
1504 | + if ($this->cache && ! isset($mapping['cache'])) { |
|
1505 | 1505 | throw CacheException::nonCacheableEntityAssociation($this->name, $mapping['fieldName']); |
1506 | 1506 | } |
1507 | 1507 | } |
1508 | 1508 | |
1509 | 1509 | // Mandatory attributes for both sides |
1510 | 1510 | // Mandatory: fieldName, targetEntity |
1511 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1511 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1512 | 1512 | throw MappingException::missingFieldName($this->name); |
1513 | 1513 | } |
1514 | 1514 | |
@@ -1630,7 +1630,7 @@ discard block |
||
1630 | 1630 | throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); |
1631 | 1631 | } |
1632 | 1632 | |
1633 | - $this->table['uniqueConstraints'][$mapping['fieldName'] . "_uniq"] = [ |
|
1633 | + $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = [ |
|
1634 | 1634 | 'columns' => $uniqueConstraintColumns |
1635 | 1635 | ]; |
1636 | 1636 | } |
@@ -1645,7 +1645,7 @@ discard block |
||
1645 | 1645 | unset($mapping['unique']); |
1646 | 1646 | } |
1647 | 1647 | |
1648 | - if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
|
1648 | + if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) { |
|
1649 | 1649 | throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
1650 | 1650 | } |
1651 | 1651 | |
@@ -1699,7 +1699,7 @@ discard block |
||
1699 | 1699 | } |
1700 | 1700 | |
1701 | 1701 | $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
1702 | - && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1702 | + && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1703 | 1703 | |
1704 | 1704 | if ( ! isset($mapping['joinTable']['joinColumns'])) { |
1705 | 1705 | $mapping['joinTable']['joinColumns'] = [ |
@@ -1892,7 +1892,7 @@ discard block |
||
1892 | 1892 | |
1893 | 1893 | // Association defined as Id field |
1894 | 1894 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
1895 | - $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1895 | + $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1896 | 1896 | |
1897 | 1897 | $columnNames = array_merge($columnNames, $assocColumnNames); |
1898 | 1898 | } |
@@ -2073,7 +2073,7 @@ discard block |
||
2073 | 2073 | public function getTemporaryIdTableName() |
2074 | 2074 | { |
2075 | 2075 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
2076 | - return str_replace('.', '_', $this->getTableName() . '_id_tmp'); |
|
2076 | + return str_replace('.', '_', $this->getTableName().'_id_tmp'); |
|
2077 | 2077 | } |
2078 | 2078 | |
2079 | 2079 | /** |
@@ -2410,7 +2410,7 @@ discard block |
||
2410 | 2410 | */ |
2411 | 2411 | public function addNamedQuery(array $queryMapping) |
2412 | 2412 | { |
2413 | - if (!isset($queryMapping['name'])) { |
|
2413 | + if ( ! isset($queryMapping['name'])) { |
|
2414 | 2414 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2415 | 2415 | } |
2416 | 2416 | |
@@ -2418,7 +2418,7 @@ discard block |
||
2418 | 2418 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2419 | 2419 | } |
2420 | 2420 | |
2421 | - if (!isset($queryMapping['query'])) { |
|
2421 | + if ( ! isset($queryMapping['query'])) { |
|
2422 | 2422 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2423 | 2423 | } |
2424 | 2424 | |
@@ -2445,7 +2445,7 @@ discard block |
||
2445 | 2445 | */ |
2446 | 2446 | public function addNamedNativeQuery(array $queryMapping) |
2447 | 2447 | { |
2448 | - if (!isset($queryMapping['name'])) { |
|
2448 | + if ( ! isset($queryMapping['name'])) { |
|
2449 | 2449 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2450 | 2450 | } |
2451 | 2451 | |
@@ -2453,11 +2453,11 @@ discard block |
||
2453 | 2453 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2454 | 2454 | } |
2455 | 2455 | |
2456 | - if (!isset($queryMapping['query'])) { |
|
2456 | + if ( ! isset($queryMapping['query'])) { |
|
2457 | 2457 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2458 | 2458 | } |
2459 | 2459 | |
2460 | - if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) { |
|
2460 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
2461 | 2461 | throw MappingException::missingQueryMapping($this->name, $queryMapping['name']); |
2462 | 2462 | } |
2463 | 2463 | |
@@ -2489,7 +2489,7 @@ discard block |
||
2489 | 2489 | */ |
2490 | 2490 | public function addSqlResultSetMapping(array $resultMapping) |
2491 | 2491 | { |
2492 | - if (!isset($resultMapping['name'])) { |
|
2492 | + if ( ! isset($resultMapping['name'])) { |
|
2493 | 2493 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name); |
2494 | 2494 | } |
2495 | 2495 | |
@@ -2499,7 +2499,7 @@ discard block |
||
2499 | 2499 | |
2500 | 2500 | if (isset($resultMapping['entities'])) { |
2501 | 2501 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
2502 | - if (!isset($entityResult['entityClass'])) { |
|
2502 | + if ( ! isset($entityResult['entityClass'])) { |
|
2503 | 2503 | throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']); |
2504 | 2504 | } |
2505 | 2505 | |
@@ -2518,11 +2518,11 @@ discard block |
||
2518 | 2518 | |
2519 | 2519 | if (isset($entityResult['fields'])) { |
2520 | 2520 | foreach ($entityResult['fields'] as $k => $field) { |
2521 | - if (!isset($field['name'])) { |
|
2521 | + if ( ! isset($field['name'])) { |
|
2522 | 2522 | throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']); |
2523 | 2523 | } |
2524 | 2524 | |
2525 | - if (!isset($field['column'])) { |
|
2525 | + if ( ! isset($field['column'])) { |
|
2526 | 2526 | $fieldName = $field['name']; |
2527 | 2527 | if (strpos($fieldName, '.')) { |
2528 | 2528 | list(, $fieldName) = explode('.', $fieldName); |
@@ -3013,7 +3013,7 @@ discard block |
||
3013 | 3013 | } |
3014 | 3014 | |
3015 | 3015 | if ($definition['sequenceName'][0] == '`') { |
3016 | - $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3016 | + $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3017 | 3017 | $definition['quoted'] = true; |
3018 | 3018 | } |
3019 | 3019 | |
@@ -3113,7 +3113,7 @@ discard block |
||
3113 | 3113 | public function getAssociationTargetClass($assocName) |
3114 | 3114 | { |
3115 | 3115 | if ( ! isset($this->associationMappings[$assocName])) { |
3116 | - throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); |
|
3116 | + throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association."); |
|
3117 | 3117 | } |
3118 | 3118 | |
3119 | 3119 | return $this->associationMappings[$assocName]['targetEntity']; |
@@ -3152,7 +3152,7 @@ discard block |
||
3152 | 3152 | // Association defined as Id field |
3153 | 3153 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
3154 | 3154 | $assocQuotedColumnNames = array_map( |
3155 | - function ($joinColumn) use ($platform) { |
|
3155 | + function($joinColumn) use ($platform) { |
|
3156 | 3156 | return isset($joinColumn['quoted']) |
3157 | 3157 | ? $platform->quoteIdentifier($joinColumn['name']) |
3158 | 3158 | : $joinColumn['name']; |
@@ -3263,7 +3263,7 @@ discard block |
||
3263 | 3263 | } |
3264 | 3264 | |
3265 | 3265 | if ($className !== null && strpos($className, '\\') === false && $this->namespace) { |
3266 | - return $this->namespace . '\\' . $className; |
|
3266 | + return $this->namespace.'\\'.$className; |
|
3267 | 3267 | } |
3268 | 3268 | |
3269 | 3269 | return $className; |
@@ -3316,17 +3316,17 @@ discard block |
||
3316 | 3316 | foreach ($embeddable->fieldMappings as $fieldMapping) { |
3317 | 3317 | $fieldMapping['originalClass'] = $fieldMapping['originalClass'] ?? $embeddable->name; |
3318 | 3318 | $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) |
3319 | - ? $property . '.' . $fieldMapping['declaredField'] |
|
3319 | + ? $property.'.'.$fieldMapping['declaredField'] |
|
3320 | 3320 | : $property; |
3321 | 3321 | $fieldMapping['originalField'] = $fieldMapping['originalField'] ?? $fieldMapping['fieldName']; |
3322 | - $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName']; |
|
3322 | + $fieldMapping['fieldName'] = $property.".".$fieldMapping['fieldName']; |
|
3323 | 3323 | |
3324 | 3324 | if ($this->embeddedClasses[$property]['nullable'] === true) { |
3325 | 3325 | $fieldMapping['nullable'] = $this->embeddedClasses[$property]['nullable']; |
3326 | 3326 | } |
3327 | 3327 | |
3328 | - if (! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3329 | - $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName']; |
|
3328 | + if ( ! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3329 | + $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'].$fieldMapping['columnName']; |
|
3330 | 3330 | } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) { |
3331 | 3331 | $fieldMapping['columnName'] = $this->namingStrategy |
3332 | 3332 | ->embeddedFieldToColumnName( |
@@ -3367,7 +3367,7 @@ discard block |
||
3367 | 3367 | { |
3368 | 3368 | $sequencePrefix = $this->getSequencePrefix($platform); |
3369 | 3369 | $columnName = $this->getSingleIdentifierColumnName(); |
3370 | - $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; |
|
3370 | + $sequenceName = $sequencePrefix.'_'.$columnName.'_seq'; |
|
3371 | 3371 | |
3372 | 3372 | return $sequenceName; |
3373 | 3373 | } |
@@ -3387,10 +3387,10 @@ discard block |
||
3387 | 3387 | |
3388 | 3388 | // Prepend the schema name to the table name if there is one |
3389 | 3389 | if ($schemaName = $this->getSchemaName()) { |
3390 | - $sequencePrefix = $schemaName . '.' . $tableName; |
|
3390 | + $sequencePrefix = $schemaName.'.'.$tableName; |
|
3391 | 3391 | |
3392 | 3392 | if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { |
3393 | - $sequencePrefix = $schemaName . '__' . $tableName; |
|
3393 | + $sequencePrefix = $schemaName.'__'.$tableName; |
|
3394 | 3394 | } |
3395 | 3395 | } |
3396 | 3396 | |
@@ -3402,8 +3402,8 @@ discard block |
||
3402 | 3402 | */ |
3403 | 3403 | private function assertMappingOrderBy(array $mapping) |
3404 | 3404 | { |
3405 | - if (isset($mapping['orderBy']) && !is_array($mapping['orderBy'])) { |
|
3406 | - throw new InvalidArgumentException("'orderBy' is expected to be an array, not " . gettype($mapping['orderBy'])); |
|
3405 | + if (isset($mapping['orderBy']) && ! is_array($mapping['orderBy'])) { |
|
3406 | + throw new InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy'])); |
|
3407 | 3407 | } |
3408 | 3408 | } |
3409 | 3409 | } |