@@ -62,17 +62,17 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function get(QueryCacheKey $key, ResultSetMapping $rsm, array $hints = []) |
| 64 | 64 | { |
| 65 | - if (! ($key->cacheMode & Cache::MODE_GET)) { |
|
| 65 | + if ( ! ($key->cacheMode & Cache::MODE_GET)) { |
|
| 66 | 66 | return null; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $cacheEntry = $this->region->get($key); |
| 70 | 70 | |
| 71 | - if (! $cacheEntry instanceof QueryCacheEntry) { |
|
| 71 | + if ( ! $cacheEntry instanceof QueryCacheEntry) { |
|
| 72 | 72 | return null; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - if (! $this->validator->isValid($key, $cacheEntry)) { |
|
| 75 | + if ( ! $this->validator->isValid($key, $cacheEntry)) { |
|
| 76 | 76 | $this->region->evict($key); |
| 77 | 77 | |
| 78 | 78 | return null; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | $cm = $this->em->getClassMetadata($entityName); |
| 90 | 90 | |
| 91 | - $generateKeys = static function (array $entry) use ($cm) : EntityCacheKey { |
|
| 91 | + $generateKeys = static function(array $entry) use ($cm) : EntityCacheKey { |
|
| 92 | 92 | return new EntityCacheKey($cm->getRootClassName(), $entry['identifier']); |
| 93 | 93 | }; |
| 94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | foreach ($cacheEntry->result as $index => $entry) { |
| 100 | 100 | $entityEntry = is_array($entries) ? ($entries[$index] ?? null) : null; |
| 101 | 101 | |
| 102 | - if (!$entityEntry) { |
|
| 102 | + if ( ! $entityEntry) { |
|
| 103 | 103 | if ($this->cacheLogger !== null) { |
| 104 | 104 | $this->cacheLogger->entityCacheMiss($regionName, $cacheKeys->identifiers[$index]); |
| 105 | 105 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $this->cacheLogger->entityCacheHit($regionName, $cacheKeys->identifiers[$index]); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - if (! $hasRelation) { |
|
| 114 | + if ( ! $hasRelation) { |
|
| 115 | 115 | $result[$index] = $unitOfWork->createEntity( |
| 116 | 116 | $entityEntry->class, |
| 117 | 117 | $entityEntry->resolveAssociationEntries($this->em), |
@@ -156,11 +156,11 @@ discard block |
||
| 156 | 156 | continue; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - if (! isset($assoc['list']) || empty($assoc['list'])) { |
|
| 159 | + if ( ! isset($assoc['list']) || empty($assoc['list'])) { |
|
| 160 | 160 | continue; |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - $generateKeys = static function ($id) use ($assocMetadata) : EntityCacheKey { |
|
| 163 | + $generateKeys = static function($id) use ($assocMetadata) : EntityCacheKey { |
|
| 164 | 164 | return new EntityCacheKey($assocMetadata->getRootClassName(), $id); |
| 165 | 165 | }; |
| 166 | 166 | |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | throw FeatureNotImplemented::multipleRootEntities(); |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | - if (! $rsm->isSelect) { |
|
| 242 | + if ( ! $rsm->isSelect) { |
|
| 243 | 243 | throw FeatureNotImplemented::nonSelectStatements(); |
| 244 | 244 | } |
| 245 | 245 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | throw FeatureNotImplemented::partialEntities(); |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | - if (! ($key->cacheMode & Cache::MODE_PUT)) { |
|
| 250 | + if ( ! ($key->cacheMode & Cache::MODE_PUT)) { |
|
| 251 | 251 | return false; |
| 252 | 252 | } |
| 253 | 253 | |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | $unitOfWork = $this->em->getUnitOfWork(); |
| 258 | 258 | $persister = $unitOfWork->getEntityPersister($entityName); |
| 259 | 259 | |
| 260 | - if (! ($persister instanceof CachedPersister)) { |
|
| 260 | + if ( ! ($persister instanceof CachedPersister)) { |
|
| 261 | 261 | throw NonCacheableEntity::fromEntity($entityName); |
| 262 | 262 | } |
| 263 | 263 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | |
| 270 | 270 | if (($key->cacheMode & Cache::MODE_REFRESH) || ! $region->contains($entityKey)) { |
| 271 | 271 | // Cancel put result if entity put fail |
| 272 | - if (! $persister->storeEntityCache($entity, $entityKey)) { |
|
| 272 | + if ( ! $persister->storeEntityCache($entity, $entityKey)) { |
|
| 273 | 273 | return false; |
| 274 | 274 | } |
| 275 | 275 | } |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | // store single nested association |
| 306 | - if (! is_array($assocValue)) { |
|
| 306 | + if ( ! is_array($assocValue)) { |
|
| 307 | 307 | // Cancel put result if association put fail |
| 308 | 308 | if ($this->storeAssociationCache($key, $association, $assocValue) === null) { |
| 309 | 309 | return false; |
@@ -342,9 +342,9 @@ discard block |
||
| 342 | 342 | $assocIdentifier = $unitOfWork->getEntityIdentifier($assocValue); |
| 343 | 343 | $entityKey = new EntityCacheKey($assocMetadata->getRootClassName(), $assocIdentifier); |
| 344 | 344 | |
| 345 | - if ((! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
| 345 | + if (( ! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
| 346 | 346 | // Entity put fail |
| 347 | - if (! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
| 347 | + if ( ! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
| 348 | 348 | return null; |
| 349 | 349 | } |
| 350 | 350 | } |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | if (($key->cacheMode & Cache::MODE_REFRESH) || ! $assocRegion->contains($entityKey)) { |
| 366 | 366 | // Entity put fail |
| 367 | - if (! $assocPersister->storeEntityCache($assocItem, $entityKey)) { |
|
| 367 | + if ( ! $assocPersister->storeEntityCache($assocItem, $entityKey)) { |
|
| 368 | 368 | return null; |
| 369 | 369 | } |
| 370 | 370 | } |