@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM; |
6 | 6 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | public function getParameter($key) |
307 | 307 | { |
308 | 308 | $filteredParameters = $this->parameters->filter( |
309 | - function ($parameter) use ($key) |
|
309 | + function($parameter) use ($key) |
|
310 | 310 | { |
311 | 311 | // Must not be identical because of string to integer conversion |
312 | 312 | return ($key == $parameter->getName()); |
@@ -355,14 +355,14 @@ discard block |
||
355 | 355 | public function setParameter($key, $value, $type = null) |
356 | 356 | { |
357 | 357 | $filteredParameters = $this->parameters->filter( |
358 | - function ($parameter) use ($key) |
|
358 | + function($parameter) use ($key) |
|
359 | 359 | { |
360 | 360 | // Must not be identical because of string to integer conversion |
361 | 361 | return ($key == $parameter->getName()); |
362 | 362 | } |
363 | 363 | ); |
364 | 364 | |
365 | - if (! $filteredParameters->isEmpty()) { |
|
365 | + if ( ! $filteredParameters->isEmpty()) { |
|
366 | 366 | $parameter = $filteredParameters->first(); |
367 | 367 | $parameter->setValue($value, $type); |
368 | 368 | |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | */ |
452 | 452 | private function translateNamespaces(Query\ResultSetMapping $rsm) |
453 | 453 | { |
454 | - $translate = function ($alias) { |
|
454 | + $translate = function($alias) { |
|
455 | 455 | return $this->em->getClassMetadata($alias)->getClassName(); |
456 | 456 | }; |
457 | 457 | |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | */ |
514 | 514 | public function setResultCacheProfile(QueryCacheProfile $profile = null) |
515 | 515 | { |
516 | - if (! $profile->getResultCacheDriver()) { |
|
516 | + if ( ! $profile->getResultCacheDriver()) { |
|
517 | 517 | $resultCacheDriver = $this->em->getConfiguration()->getResultCacheImpl(); |
518 | 518 | $profile = $profile->setResultCacheDriver($resultCacheDriver); |
519 | 519 | } |
@@ -981,7 +981,7 @@ discard block |
||
981 | 981 | $this->getTimestampKey() |
982 | 982 | ); |
983 | 983 | |
984 | - $result = $queryCache->get($queryKey, $rsm, $this->hints); |
|
984 | + $result = $queryCache->get($queryKey, $rsm, $this->hints); |
|
985 | 985 | |
986 | 986 | if ($result !== null) { |
987 | 987 | if ($this->cacheLogger) { |
@@ -1115,6 +1115,6 @@ discard block |
||
1115 | 1115 | |
1116 | 1116 | ksort($hints); |
1117 | 1117 | |
1118 | - return sha1($query . '-' . serialize($params) . '-' . serialize($hints)); |
|
1118 | + return sha1($query.'-'.serialize($params).'-'.serialize($hints)); |
|
1119 | 1119 | } |
1120 | 1120 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | public function __toString() |
310 | 310 | { |
311 | - return __CLASS__ . '@' . spl_object_hash($this); |
|
311 | + return __CLASS__.'@'.spl_object_hash($this); |
|
312 | 312 | } |
313 | 313 | |
314 | 314 | /** |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | // Restore ReflectionClass and properties |
412 | 412 | $this->reflectionClass = $reflectionService->getClass($this->className); |
413 | 413 | |
414 | - if (! $this->reflectionClass) { |
|
414 | + if ( ! $this->reflectionClass) { |
|
415 | 415 | return; |
416 | 416 | } |
417 | 417 | |
@@ -437,11 +437,11 @@ discard block |
||
437 | 437 | } |
438 | 438 | |
439 | 439 | // Verify & complete identifier mapping |
440 | - if (! $this->identifier) { |
|
440 | + if ( ! $this->identifier) { |
|
441 | 441 | throw MappingException::identifierRequired($this->className); |
442 | 442 | } |
443 | 443 | |
444 | - $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function (Property $property) : bool { |
|
444 | + $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function(Property $property) : bool { |
|
445 | 445 | return $property instanceof FieldMetadata |
446 | 446 | && $property->isPrimaryKey() |
447 | 447 | && $property->hasValueGenerator(); |
@@ -462,14 +462,14 @@ discard block |
||
462 | 462 | public function validateAssociations() : void |
463 | 463 | { |
464 | 464 | array_map( |
465 | - function (Property $property) { |
|
466 | - if (! ($property instanceof AssociationMetadata)) { |
|
465 | + function(Property $property) { |
|
466 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
467 | 467 | return; |
468 | 468 | } |
469 | 469 | |
470 | 470 | $targetEntity = $property->getTargetEntity(); |
471 | 471 | |
472 | - if (! class_exists($targetEntity)) { |
|
472 | + if ( ! class_exists($targetEntity)) { |
|
473 | 473 | throw MappingException::invalidTargetEntityClass($targetEntity, $this->className, $property->getName()); |
474 | 474 | } |
475 | 475 | }, |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | foreach ($this->lifecycleCallbacks as $callbacks) { |
492 | 492 | /** @var array $callbacks */ |
493 | 493 | foreach ($callbacks as $callbackFuncName) { |
494 | - if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
494 | + if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
495 | 495 | throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName); |
496 | 496 | } |
497 | 497 | } |
@@ -519,11 +519,11 @@ discard block |
||
519 | 519 | */ |
520 | 520 | public function isIdentifier(string $fieldName) : bool |
521 | 521 | { |
522 | - if (! $this->identifier) { |
|
522 | + if ( ! $this->identifier) { |
|
523 | 523 | return false; |
524 | 524 | } |
525 | 525 | |
526 | - if (! $this->isIdentifierComposite()) { |
|
526 | + if ( ! $this->isIdentifierComposite()) { |
|
527 | 527 | return $fieldName === $this->identifier[0]; |
528 | 528 | } |
529 | 529 | |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | */ |
552 | 552 | public function getNamedQuery($queryName) : string |
553 | 553 | { |
554 | - if (! isset($this->namedQueries[$queryName])) { |
|
554 | + if ( ! isset($this->namedQueries[$queryName])) { |
|
555 | 555 | throw MappingException::queryNotFound($this->className, $queryName); |
556 | 556 | } |
557 | 557 | |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | */ |
612 | 612 | public function getSqlResultSetMapping($name) |
613 | 613 | { |
614 | - if (! isset($this->sqlResultSetMappings[$name])) { |
|
614 | + if ( ! isset($this->sqlResultSetMappings[$name])) { |
|
615 | 615 | throw MappingException::resultMappingNotFound($this->className, $name); |
616 | 616 | } |
617 | 617 | |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | $property->setColumnName($columnName); |
647 | 647 | } |
648 | 648 | |
649 | - if (! $this->isMappedSuperclass) { |
|
649 | + if ( ! $this->isMappedSuperclass) { |
|
650 | 650 | $property->setTableName($this->getTableName()); |
651 | 651 | } |
652 | 652 | |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | throw MappingException::sqlConversionNotAllowedForPrimaryKeyProperties($property); |
667 | 667 | } |
668 | 668 | |
669 | - if (! in_array($fieldName, $this->identifier)) { |
|
669 | + if ( ! in_array($fieldName, $this->identifier)) { |
|
670 | 670 | $this->identifier[] = $fieldName; |
671 | 671 | } |
672 | 672 | } |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | $fieldName = $property->getName(); |
721 | 721 | $targetEntity = $property->getTargetEntity(); |
722 | 722 | |
723 | - if (! $targetEntity) { |
|
723 | + if ( ! $targetEntity) { |
|
724 | 724 | throw MappingException::missingTargetEntity($fieldName); |
725 | 725 | } |
726 | 726 | |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | $this->identifier[] = $property->getName(); |
747 | 747 | } |
748 | 748 | |
749 | - if ($this->cache && !$property->getCache()) { |
|
749 | + if ($this->cache && ! $property->getCache()) { |
|
750 | 750 | throw CacheException::nonCacheableEntityAssociation($this->className, $fieldName); |
751 | 751 | } |
752 | 752 | |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | /** @var JoinColumnMetadata $joinColumn */ |
801 | 801 | if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) { |
802 | 802 | if (1 === count($property->getJoinColumns())) { |
803 | - if (! $property->isPrimaryKey()) { |
|
803 | + if ( ! $property->isPrimaryKey()) { |
|
804 | 804 | $joinColumn->setUnique(true); |
805 | 805 | } |
806 | 806 | } else { |
@@ -808,13 +808,13 @@ discard block |
||
808 | 808 | } |
809 | 809 | } |
810 | 810 | |
811 | - $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null); |
|
811 | + $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null); |
|
812 | 812 | |
813 | - if (! $joinColumn->getColumnName()) { |
|
813 | + if ( ! $joinColumn->getColumnName()) { |
|
814 | 814 | $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->className)); |
815 | 815 | } |
816 | 816 | |
817 | - if (! $joinColumn->getReferencedColumnName()) { |
|
817 | + if ( ! $joinColumn->getReferencedColumnName()) { |
|
818 | 818 | $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
819 | 819 | } |
820 | 820 | |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | if ($property->isOrphanRemoval()) { |
843 | 843 | $cascades = $property->getCascade(); |
844 | 844 | |
845 | - if (! in_array('remove', $cascades)) { |
|
845 | + if ( ! in_array('remove', $cascades)) { |
|
846 | 846 | $cascades[] = 'remove'; |
847 | 847 | |
848 | 848 | $property->setCascade($cascades); |
@@ -908,14 +908,14 @@ discard block |
||
908 | 908 | $property->setOwningSide(false); |
909 | 909 | |
910 | 910 | // OneToMany MUST have mappedBy |
911 | - if (! $property->getMappedBy()) { |
|
911 | + if ( ! $property->getMappedBy()) { |
|
912 | 912 | throw MappingException::oneToManyRequiresMappedBy($property->getName()); |
913 | 913 | } |
914 | 914 | |
915 | 915 | if ($property->isOrphanRemoval()) { |
916 | 916 | $cascades = $property->getCascade(); |
917 | 917 | |
918 | - if (! in_array('remove', $cascades)) { |
|
918 | + if ( ! in_array('remove', $cascades)) { |
|
919 | 919 | $cascades[] = 'remove'; |
920 | 920 | |
921 | 921 | $property->setCascade($cascades); |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | |
939 | 939 | $property->setJoinTable($joinTable); |
940 | 940 | |
941 | - if (! $joinTable->getName()) { |
|
941 | + if ( ! $joinTable->getName()) { |
|
942 | 942 | $joinTableName = $this->namingStrategy->joinTableName( |
943 | 943 | $property->getSourceEntity(), |
944 | 944 | $property->getTargetEntity(), |
@@ -950,7 +950,7 @@ discard block |
||
950 | 950 | |
951 | 951 | $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() == $property->getTargetEntity() && ! $joinTable->hasColumns(); |
952 | 952 | |
953 | - if (! $joinTable->getJoinColumns()) { |
|
953 | + if ( ! $joinTable->getJoinColumns()) { |
|
954 | 954 | $referencedColumnName = $this->namingStrategy->referenceColumnName(); |
955 | 955 | $sourceReferenceName = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName; |
956 | 956 | $columnName = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName); |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | $joinTable->addJoinColumn($joinColumn); |
964 | 964 | } |
965 | 965 | |
966 | - if (! $joinTable->getInverseJoinColumns()) { |
|
966 | + if ( ! $joinTable->getInverseJoinColumns()) { |
|
967 | 967 | $referencedColumnName = $this->namingStrategy->referenceColumnName(); |
968 | 968 | $targetReferenceName = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName; |
969 | 969 | $columnName = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName); |
@@ -978,13 +978,13 @@ discard block |
||
978 | 978 | |
979 | 979 | foreach ($joinTable->getJoinColumns() as $joinColumn) { |
980 | 980 | /** @var JoinColumnMetadata $joinColumn */ |
981 | - if (! $joinColumn->getReferencedColumnName()) { |
|
981 | + if ( ! $joinColumn->getReferencedColumnName()) { |
|
982 | 982 | $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
983 | 983 | } |
984 | 984 | |
985 | 985 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
986 | 986 | |
987 | - if (! $joinColumn->getColumnName()) { |
|
987 | + if ( ! $joinColumn->getColumnName()) { |
|
988 | 988 | $columnName = $this->namingStrategy->joinKeyColumnName( |
989 | 989 | $property->getSourceEntity(), |
990 | 990 | $referencedColumnName |
@@ -996,13 +996,13 @@ discard block |
||
996 | 996 | |
997 | 997 | foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) { |
998 | 998 | /** @var JoinColumnMetadata $inverseJoinColumn */ |
999 | - if (! $inverseJoinColumn->getReferencedColumnName()) { |
|
999 | + if ( ! $inverseJoinColumn->getReferencedColumnName()) { |
|
1000 | 1000 | $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
1001 | 1001 | } |
1002 | 1002 | |
1003 | 1003 | $referencedColumnName = $inverseJoinColumn->getReferencedColumnName(); |
1004 | 1004 | |
1005 | - if (! $inverseJoinColumn->getColumnName()) { |
|
1005 | + if ( ! $inverseJoinColumn->getColumnName()) { |
|
1006 | 1006 | $columnName = $this->namingStrategy->joinKeyColumnName( |
1007 | 1007 | $property->getTargetEntity(), |
1008 | 1008 | $referencedColumnName |
@@ -1099,7 +1099,7 @@ discard block |
||
1099 | 1099 | // Association defined as Id field |
1100 | 1100 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
1101 | 1101 | |
1102 | - if (! $property->isOwningSide()) { |
|
1102 | + if ( ! $property->isOwningSide()) { |
|
1103 | 1103 | $property = $targetClass->getProperty($property->getMappedBy()); |
1104 | 1104 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
1105 | 1105 | } |
@@ -1114,7 +1114,7 @@ discard block |
||
1114 | 1114 | $columnName = $joinColumn->getColumnName(); |
1115 | 1115 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
1116 | 1116 | |
1117 | - if (! $joinColumn->getType()) { |
|
1117 | + if ( ! $joinColumn->getType()) { |
|
1118 | 1118 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em)); |
1119 | 1119 | } |
1120 | 1120 | |
@@ -1154,11 +1154,11 @@ discard block |
||
1154 | 1154 | { |
1155 | 1155 | $schema = null === $this->getSchemaName() |
1156 | 1156 | ? '' |
1157 | - : $this->getSchemaName() . '_' |
|
1157 | + : $this->getSchemaName().'_' |
|
1158 | 1158 | ; |
1159 | 1159 | |
1160 | 1160 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
1161 | - return $schema . $this->getTableName() . '_id_tmp'; |
|
1161 | + return $schema.$this->getTableName().'_id_tmp'; |
|
1162 | 1162 | } |
1163 | 1163 | |
1164 | 1164 | /** |
@@ -1218,7 +1218,7 @@ discard block |
||
1218 | 1218 | { |
1219 | 1219 | $fieldName = $property->getName(); |
1220 | 1220 | |
1221 | - if (! isset($this->declaredProperties[$fieldName])) { |
|
1221 | + if ( ! isset($this->declaredProperties[$fieldName])) { |
|
1222 | 1222 | throw MappingException::invalidOverrideFieldName($this->className, $fieldName); |
1223 | 1223 | } |
1224 | 1224 | |
@@ -1426,7 +1426,7 @@ discard block |
||
1426 | 1426 | $declaringClass = $property->getDeclaringClass(); |
1427 | 1427 | |
1428 | 1428 | if ($inheritedProperty instanceof FieldMetadata) { |
1429 | - if (! $declaringClass->isMappedSuperclass) { |
|
1429 | + if ( ! $declaringClass->isMappedSuperclass) { |
|
1430 | 1430 | $inheritedProperty->setTableName($property->getTableName()); |
1431 | 1431 | } |
1432 | 1432 | |
@@ -1494,7 +1494,7 @@ discard block |
||
1494 | 1494 | throw MappingException::duplicateQueryMapping($this->className, $name); |
1495 | 1495 | } |
1496 | 1496 | |
1497 | - if (! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
1497 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
1498 | 1498 | throw MappingException::missingQueryMapping($this->className, $name); |
1499 | 1499 | } |
1500 | 1500 | |
@@ -1517,7 +1517,7 @@ discard block |
||
1517 | 1517 | */ |
1518 | 1518 | public function addSqlResultSetMapping(array $resultMapping) |
1519 | 1519 | { |
1520 | - if (!isset($resultMapping['name'])) { |
|
1520 | + if ( ! isset($resultMapping['name'])) { |
|
1521 | 1521 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->className); |
1522 | 1522 | } |
1523 | 1523 | |
@@ -1527,7 +1527,7 @@ discard block |
||
1527 | 1527 | |
1528 | 1528 | if (isset($resultMapping['entities'])) { |
1529 | 1529 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
1530 | - if (! isset($entityResult['entityClass'])) { |
|
1530 | + if ( ! isset($entityResult['entityClass'])) { |
|
1531 | 1531 | throw MappingException::missingResultSetMappingEntity($this->className, $resultMapping['name']); |
1532 | 1532 | } |
1533 | 1533 | |
@@ -1540,11 +1540,11 @@ discard block |
||
1540 | 1540 | |
1541 | 1541 | if (isset($entityResult['fields'])) { |
1542 | 1542 | foreach ($entityResult['fields'] as $k => $field) { |
1543 | - if (! isset($field['name'])) { |
|
1543 | + if ( ! isset($field['name'])) { |
|
1544 | 1544 | throw MappingException::missingResultSetMappingFieldName($this->className, $resultMapping['name']); |
1545 | 1545 | } |
1546 | 1546 | |
1547 | - if (! isset($field['column'])) { |
|
1547 | + if ( ! isset($field['column'])) { |
|
1548 | 1548 | $fieldName = $field['name']; |
1549 | 1549 | |
1550 | 1550 | if (strpos($fieldName, '.')) { |
@@ -1653,11 +1653,11 @@ discard block |
||
1653 | 1653 | 'method' => $method, |
1654 | 1654 | ]; |
1655 | 1655 | |
1656 | - if (! class_exists($class)) { |
|
1656 | + if ( ! class_exists($class)) { |
|
1657 | 1657 | throw MappingException::entityListenerClassNotFound($class, $this->className); |
1658 | 1658 | } |
1659 | 1659 | |
1660 | - if (! method_exists($class, $method)) { |
|
1660 | + if ( ! method_exists($class, $method)) { |
|
1661 | 1661 | throw MappingException::entityListenerMethodNotFound($class, $method, $this->className); |
1662 | 1662 | } |
1663 | 1663 | |
@@ -1733,7 +1733,7 @@ discard block |
||
1733 | 1733 | return; |
1734 | 1734 | } |
1735 | 1735 | |
1736 | - if (! (class_exists($className) || interface_exists($className))) { |
|
1736 | + if ( ! (class_exists($className) || interface_exists($className))) { |
|
1737 | 1737 | throw MappingException::invalidClassInDiscriminatorMap($className, $this->className); |
1738 | 1738 | } |
1739 | 1739 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $this->em->getClassMetadata(DDC3027Dog::class), |
33 | 33 | ] |
34 | 34 | ); |
35 | - } catch(\Exception $e) { |
|
35 | + } catch (\Exception $e) { |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $this->em->flush(); |
112 | 112 | $this->em->clear(); |
113 | 113 | |
114 | - $dql = "SELECT p FROM " . __NAMESPACE__ . "\DDC93Person p"; |
|
114 | + $dql = "SELECT p FROM ".__NAMESPACE__."\DDC93Person p"; |
|
115 | 115 | $persons = $this->em->createQuery($dql)->getResult(); |
116 | 116 | |
117 | 117 | self::assertCount(3, $persons); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | self::assertEquals('United States of America', $person->address->country->name); |
125 | 125 | } |
126 | 126 | |
127 | - $dql = "SELECT p FROM " . __NAMESPACE__ . "\DDC93Person p"; |
|
127 | + $dql = "SELECT p FROM ".__NAMESPACE__."\DDC93Person p"; |
|
128 | 128 | $persons = $this->em->createQuery($dql)->getArrayResult(); |
129 | 129 | |
130 | 130 | foreach ($persons as $person) { |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->em->flush(); |
150 | 150 | |
151 | 151 | // SELECT |
152 | - $selectDql = "SELECT p FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country"; |
|
152 | + $selectDql = "SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country"; |
|
153 | 153 | $loadedPerson = $this->em->createQuery($selectDql) |
154 | 154 | ->setParameter('city', 'Karlsruhe') |
155 | 155 | ->setParameter('country', 'Germany') |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | ); |
165 | 165 | |
166 | 166 | // UPDATE |
167 | - $updateDql = "UPDATE " . __NAMESPACE__ . "\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city"; |
|
167 | + $updateDql = "UPDATE ".__NAMESPACE__."\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city"; |
|
168 | 168 | $this->em->createQuery($updateDql) |
169 | 169 | ->setParameter('street', 'Boo') |
170 | 170 | ->setParameter('country', 'DE') |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | self::assertEquals('DE', $person->address->country->name); |
177 | 177 | |
178 | 178 | // DELETE |
179 | - $this->em->createQuery("DELETE " . __NAMESPACE__ . "\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country") |
|
179 | + $this->em->createQuery("DELETE ".__NAMESPACE__."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country") |
|
180 | 180 | ->setParameter('city', 'Karlsruhe') |
181 | 181 | ->setParameter('country', 'DE') |
182 | 182 | ->execute(); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $this->em->clear(); |
194 | 194 | |
195 | 195 | // Prove that the entity was persisted correctly. |
196 | - $dql = "SELECT p FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
196 | + $dql = "SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
197 | 197 | |
198 | 198 | $person = $this->em->createQuery($dql) |
199 | 199 | ->setParameter('name', 'Karl') |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | // Clear the EM and prove that the embeddable can be the subject of a partial query. |
208 | 208 | $this->em->clear(); |
209 | 209 | |
210 | - $dql = "SELECT PARTIAL p.{id,address.city} FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
210 | + $dql = "SELECT PARTIAL p.{id,address.city} FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
211 | 211 | |
212 | 212 | $person = $this->em->createQuery($dql) |
213 | 213 | ->setParameter('name', 'Karl') |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | // Clear the EM and prove that the embeddable can be the subject of a partial query regardless of attributes positions. |
224 | 224 | $this->em->clear(); |
225 | 225 | |
226 | - $dql = "SELECT PARTIAL p.{address.city, id} FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
226 | + $dql = "SELECT PARTIAL p.{address.city, id} FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
227 | 227 | |
228 | 228 | $person = $this->em->createQuery($dql) |
229 | 229 | ->setParameter('name', 'Karl') |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $this->expectException(QueryException::class); |
243 | 243 | $this->expectExceptionMessage('no field or association named address.asdfasdf'); |
244 | 244 | |
245 | - $this->em->createQuery("SELECT p FROM " . __NAMESPACE__ . "\\DDC93Person p WHERE p.address.asdfasdf IS NULL") |
|
245 | + $this->em->createQuery("SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.address.asdfasdf IS NULL") |
|
246 | 246 | ->execute(); |
247 | 247 | } |
248 | 248 | |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | $this->expectException(QueryException::class); |
252 | 252 | $this->expectExceptionMessage("no mapped field named 'address.asdfasdf'"); |
253 | 253 | |
254 | - $this->em->createQuery("SELECT PARTIAL p.{id,address.asdfasdf} FROM " . __NAMESPACE__ . "\\DDC93Person p") |
|
254 | + $this->em->createQuery("SELECT PARTIAL p.{id,address.asdfasdf} FROM ".__NAMESPACE__."\\DDC93Person p") |
|
255 | 255 | ->execute(); |
256 | 256 | } |
257 | 257 | |
@@ -313,15 +313,15 @@ discard block |
||
313 | 313 | $this->expectException(MappingException::class); |
314 | 314 | $this->expectExceptionMessage( |
315 | 315 | sprintf( |
316 | - 'Infinite nesting detected for embedded property %s::nested. ' . |
|
316 | + 'Infinite nesting detected for embedded property %s::nested. '. |
|
317 | 317 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
318 | - __NAMESPACE__ . '\\' . $declaredEmbeddableClassName |
|
318 | + __NAMESPACE__.'\\'.$declaredEmbeddableClassName |
|
319 | 319 | ) |
320 | 320 | ); |
321 | 321 | |
322 | 322 | $this->schemaTool->createSchema( |
323 | 323 | [ |
324 | - $this->em->getClassMetadata(__NAMESPACE__ . '\\' . $embeddableClassName), |
|
324 | + $this->em->getClassMetadata(__NAMESPACE__.'\\'.$embeddableClassName), |
|
325 | 325 | ] |
326 | 326 | ); |
327 | 327 | } |