@@ -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 | |
@@ -707,14 +707,14 @@ discard block |
||
707 | 707 | throw new ORMException("Can't instantiate custom generator : no custom generator definition"); |
708 | 708 | } |
709 | 709 | if ( ! class_exists($definition['class'])) { |
710 | - throw new ORMException("Can't instantiate custom generator : " . |
|
710 | + throw new ORMException("Can't instantiate custom generator : ". |
|
711 | 711 | $definition['class']); |
712 | 712 | } |
713 | 713 | $class->setIdGenerator(new $definition['class']); |
714 | 714 | break; |
715 | 715 | |
716 | 716 | default: |
717 | - throw new ORMException("Unknown generator type: " . $class->generatorType); |
|
717 | + throw new ORMException("Unknown generator type: ".$class->generatorType); |
|
718 | 718 | } |
719 | 719 | } |
720 | 720 | |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | */ |
765 | 765 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) |
766 | 766 | { |
767 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
767 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
768 | 768 | } |
769 | 769 | |
770 | 770 | /** |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | */ |
789 | 789 | private function getTargetPlatform() |
790 | 790 | { |
791 | - if (!$this->targetPlatform) { |
|
791 | + if ( ! $this->targetPlatform) { |
|
792 | 792 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
793 | 793 | } |
794 | 794 |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $returnableItems = []; |
71 | 71 | |
72 | 72 | foreach ($keysToRetrieve as $index => $key) { |
73 | - if (! $items[$key] instanceof CacheEntry) { |
|
73 | + if ( ! $items[$key] instanceof CacheEntry) { |
|
74 | 74 | return null; |
75 | 75 | } |
76 | 76 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | $entry = $this->cache->fetch($this->getCacheEntryKey($key)); |
98 | 98 | |
99 | - if (! $entry instanceof CacheEntry) { |
|
99 | + if ( ! $entry instanceof CacheEntry) { |
|
100 | 100 | return null; |
101 | 101 | } |
102 | 102 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $entryKey = $this->getCacheEntryKey($key); |
115 | 115 | $entryValue = $this->cache->fetch($entryKey); |
116 | 116 | |
117 | - if (! $entryValue instanceof CacheEntry) { |
|
117 | + if ( ! $entryValue instanceof CacheEntry) { |
|
118 | 118 | return null; |
119 | 119 | } |
120 | 120 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | protected function getCacheEntryKey(CacheKey $key) |
132 | 132 | { |
133 | - return $this->name . self::REGION_KEY_SEPARATOR . $key->hash; |
|
133 | + return $this->name.self::REGION_KEY_SEPARATOR.$key->hash; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function evictAll() |
156 | 156 | { |
157 | - if (! $this->cache instanceof ClearableCache) { |
|
157 | + if ( ! $this->cache instanceof ClearableCache) { |
|
158 | 158 | throw new \BadMethodCallException(sprintf( |
159 | 159 | 'Clearing all cache entries is not supported by the supplied cache adapter of type %s', |
160 | 160 | get_class($this->cache) |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | public function corruptedDataDoesNotLeakIntoApplicationWhenGettingSingleEntry() : void |
104 | 104 | { |
105 | 105 | $key1 = new CacheKeyMock('key.1'); |
106 | - $this->cache->save($this->region->getName() . '_' . $key1->hash, 'a-very-invalid-value'); |
|
106 | + $this->cache->save($this->region->getName().'_'.$key1->hash, 'a-very-invalid-value'); |
|
107 | 107 | |
108 | 108 | self::assertTrue($this->region->contains($key1)); |
109 | 109 | self::assertNull($this->region->get($key1)); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | public function corruptedDataDoesNotLeakIntoApplicationWhenGettingMultipleEntries() : void |
117 | 117 | { |
118 | 118 | $key1 = new CacheKeyMock('key.1'); |
119 | - $this->cache->save($this->region->getName() . '_' . $key1->hash, 'a-very-invalid-value'); |
|
119 | + $this->cache->save($this->region->getName().'_'.$key1->hash, 'a-very-invalid-value'); |
|
120 | 120 | |
121 | 121 | self::assertTrue($this->region->contains($key1)); |
122 | 122 | self::assertNull($this->region->getMultiple(new CollectionCacheEntry([$key1]))); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public function corruptedDataDoesNotLeakIntoApplication() : void |
48 | 48 | { |
49 | 49 | $key1 = new CacheKeyMock('key.1'); |
50 | - $this->cache->save($this->region->getName() . '_' . $key1->hash, 'a-very-invalid-value'); |
|
50 | + $this->cache->save($this->region->getName().'_'.$key1->hash, 'a-very-invalid-value'); |
|
51 | 51 | |
52 | 52 | self::assertTrue($this->region->contains($key1)); |
53 | 53 | self::assertNull($this->region->getMultiple(new CollectionCacheEntry([$key1]))); |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | $tokenStr = substr($dql, $token['position'], $length); |
488 | 488 | |
489 | 489 | // Building informative message |
490 | - $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; |
|
490 | + $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message; |
|
491 | 491 | |
492 | 492 | throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL())); |
493 | 493 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | // If the namespace is not given then assumes the first FROM entity namespace |
635 | 635 | if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { |
636 | 636 | $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\')); |
637 | - $fqcn = $namespace . '\\' . $className; |
|
637 | + $fqcn = $namespace.'\\'.$className; |
|
638 | 638 | |
639 | 639 | if (class_exists($fqcn)) { |
640 | 640 | $expression->className = $fqcn; |
@@ -686,13 +686,13 @@ discard block |
||
686 | 686 | } |
687 | 687 | |
688 | 688 | $this->semanticalError( |
689 | - "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token'] |
|
689 | + "There is no mapped field named '$field' on class ".$class->name.".", $deferredItem['token'] |
|
690 | 690 | ); |
691 | 691 | } |
692 | 692 | |
693 | 693 | if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) { |
694 | 694 | $this->semanticalError( |
695 | - "The partial field selection of class " . $class->name . " must contain the identifier.", |
|
695 | + "The partial field selection of class ".$class->name." must contain the identifier.", |
|
696 | 696 | $deferredItem['token'] |
697 | 697 | ); |
698 | 698 | } |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | // Check if field or association exists |
762 | 762 | if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) { |
763 | 763 | $this->semanticalError( |
764 | - 'Class ' . $class->name . ' has no field or association named ' . $field, |
|
764 | + 'Class '.$class->name.' has no field or association named '.$field, |
|
765 | 765 | $deferredItem['token'] |
766 | 766 | ); |
767 | 767 | } |
@@ -801,8 +801,8 @@ discard block |
||
801 | 801 | // Build the error message |
802 | 802 | $semanticalError = 'Invalid PathExpression. '; |
803 | 803 | $semanticalError .= (count($expectedStringTypes) == 1) |
804 | - ? 'Must be a ' . $expectedStringTypes[0] . '.' |
|
805 | - : implode(' or ', $expectedStringTypes) . ' expected.'; |
|
804 | + ? 'Must be a '.$expectedStringTypes[0].'.' |
|
805 | + : implode(' or ', $expectedStringTypes).' expected.'; |
|
806 | 806 | |
807 | 807 | $this->semanticalError($semanticalError, $deferredItem['token']); |
808 | 808 | } |
@@ -976,7 +976,7 @@ discard block |
||
976 | 976 | |
977 | 977 | [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']); |
978 | 978 | |
979 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
979 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
980 | 980 | } |
981 | 981 | |
982 | 982 | /** |
@@ -988,7 +988,7 @@ discard block |
||
988 | 988 | */ |
989 | 989 | private function validateAbstractSchemaName($schemaName) |
990 | 990 | { |
991 | - if (! (class_exists($schemaName, true) || interface_exists($schemaName, true))) { |
|
991 | + if ( ! (class_exists($schemaName, true) || interface_exists($schemaName, true))) { |
|
992 | 992 | $this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token); |
993 | 993 | } |
994 | 994 | } |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | |
1045 | 1045 | if ( ! isset($this->queryComponents[$identVariable])) { |
1046 | 1046 | $this->semanticalError( |
1047 | - 'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.' |
|
1047 | + 'Identification Variable '.$identVariable.' used in join path expression but was not defined before.' |
|
1048 | 1048 | ); |
1049 | 1049 | } |
1050 | 1050 | |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | $class = $qComp['metadata']; |
1059 | 1059 | |
1060 | 1060 | if ( ! $class->hasAssociation($field)) { |
1061 | - $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field); |
|
1061 | + $this->semanticalError('Class '.$class->name.' has no association named '.$field); |
|
1062 | 1062 | } |
1063 | 1063 | |
1064 | 1064 | return new AST\JoinAssociationPathExpression($identVariable, $field); |
@@ -2587,7 +2587,7 @@ discard block |
||
2587 | 2587 | return $this->NullComparisonExpression(); |
2588 | 2588 | } |
2589 | 2589 | |
2590 | - if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
2590 | + if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
2591 | 2591 | return $this->EmptyCollectionComparisonExpression(); |
2592 | 2592 | } |
2593 | 2593 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | parent::setUp(); |
20 | 20 | |
21 | - if (! Type::hasType('rot13')) { |
|
21 | + if ( ! Type::hasType('rot13')) { |
|
22 | 22 | Type::addType('rot13', Rot13Type::class); |
23 | 23 | } |
24 | 24 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function testWhereInQueryWithArbitraryJoin_NoWhere() |
190 | 190 | { |
191 | - $whereInQuery = $this->entityManager->createQuery( |
|
191 | + $whereInQuery = $this->entityManager->createQuery( |
|
192 | 192 | 'SELECT p FROM Doctrine\Tests\ORM\Tools\Pagination\BlogPost p JOIN Doctrine\Tests\ORM\Tools\Pagination\Category c WITH p.category = c' |
193 | 193 | ); |
194 | 194 | $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | public function testWillReplaceBoundQueryIdentifiersWithConvertedTypesAsPerIdentifierMapping() : void |
228 | 228 | { |
229 | 229 | $whereInQuery = $this->entityManager->createQuery( |
230 | - 'SELECT e.id4 FROM ' . AuxiliaryEntity::class . ' e' |
|
230 | + 'SELECT e.id4 FROM '.AuxiliaryEntity::class.' e' |
|
231 | 231 | ); |
232 | 232 | $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]); |
233 | 233 | $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, 3); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | public function testWillReplaceBoundQueryIdentifiersWithConvertedTypesAsPerAssociatedEntityIdentifierMapping() : void |
243 | 243 | { |
244 | 244 | $whereInQuery = $this->entityManager->createQuery( |
245 | - 'SELECT e FROM ' . OwningManyToOneIdForeignKeyEntity::class . ' e' |
|
245 | + 'SELECT e FROM '.OwningManyToOneIdForeignKeyEntity::class.' e' |
|
246 | 246 | ); |
247 | 247 | $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]); |
248 | 248 | $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, 3); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | [$pathExpression] |
109 | 109 | ); |
110 | 110 | $expression = new InExpression($arithmeticExpression); |
111 | - $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS); |
|
111 | + $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS); |
|
112 | 112 | |
113 | 113 | $this->convertWhereInIdentifiersToDatabaseValue( |
114 | 114 | PersisterHelper::getTypeOfField( |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | ->getEntityManager() |
178 | 178 | ->getConnection(); |
179 | 179 | |
180 | - $query->setParameter(self::PAGINATOR_ID_ALIAS, array_map(static function ($id) use ($connection, $type) { |
|
180 | + $query->setParameter(self::PAGINATOR_ID_ALIAS, array_map(static function($id) use ($connection, $type) { |
|
181 | 181 | return $connection->convertToDatabaseValue($id, $type); |
182 | 182 | }, $identifiers)); |
183 | 183 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | parent::setUp(); |
23 | 23 | |
24 | - if (! DBALType::hasType(GH5988CustomIdObjectHashType::class)) { |
|
24 | + if ( ! DBALType::hasType(GH5988CustomIdObjectHashType::class)) { |
|
25 | 25 | DBALType::addType(GH5988CustomIdObjectHashType::class, GH5988CustomIdObjectHashType::class); |
26 | 26 | } |
27 | 27 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
56 | 56 | { |
57 | - return $value->id . '_test'; |
|
57 | + return $value->id.'_test'; |
|
58 | 58 | } |
59 | 59 | /** |
60 | 60 | * {@inheritdoc} |