@@ -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} |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | public function testForeignKeyOnSTIWithMultipleMapping() |
| 15 | 15 | { |
| 16 | 16 | $em = $this->_em; |
| 17 | - if (! $em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 17 | + if ( ! $em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 18 | 18 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 19 | 19 | } |
| 20 | 20 | $schemaTool = new SchemaTool($em); |