Completed
Pull Request — 2.6 (#8015)
by
unknown
06:46
created
lib/Doctrine/ORM/Proxy/ProxyFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $wakeupProxy = $classMetadata->getReflectionClass()->hasMethod('__wakeup');
127 127
 
128
-        return function (BaseProxy $proxy) use ($entityPersister, $classMetadata, $wakeupProxy) {
128
+        return function(BaseProxy $proxy) use ($entityPersister, $classMetadata, $wakeupProxy) {
129 129
             $initializer = $proxy->__getInitializer();
130 130
             $cloner      = $proxy->__getCloner();
131 131
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      */
178 178
     private function createCloner(ClassMetadata $classMetadata, EntityPersister $entityPersister)
179 179
     {
180
-        return function (BaseProxy $proxy) use ($entityPersister, $classMetadata) {
180
+        return function(BaseProxy $proxy) use ($entityPersister, $classMetadata) {
181 181
             if ($proxy->__isInitialized()) {
182 182
                 return;
183 183
             }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/AbstractQuery.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -212,10 +212,10 @@
 block discarded – undo
212 212
     }
213 213
 
214 214
     /**
215
-    * Obtain the name of the second level query cache region in which query results will be stored
216
-    *
217
-    * @return string|null The cache region name; NULL indicates the default region.
218
-    */
215
+     * Obtain the name of the second level query cache region in which query results will be stored
216
+     *
217
+     * @return string|null The cache region name; NULL indicates the default region.
218
+     */
219 219
     public function getCacheRegion()
220 220
     {
221 221
         return $this->cacheRegion;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     public function getParameter($key)
324 324
     {
325 325
         $filteredParameters = $this->parameters->filter(
326
-            function (Query\Parameter $parameter) use ($key) : bool {
326
+            function(Query\Parameter $parameter) use ($key) : bool {
327 327
                 $parameterName = $parameter->getName();
328 328
 
329 329
                 return $key === $parameterName || (string) $key === (string) $parameterName;
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
             return $value->name;
417 417
         }
418 418
 
419
-        if (! is_object($value)) {
419
+        if ( ! is_object($value)) {
420 420
             return $value;
421 421
         }
422 422
 
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
      */
470 470
     private function translateNamespaces(Query\ResultSetMapping $rsm)
471 471
     {
472
-        $translate = function ($alias) {
472
+        $translate = function($alias) {
473 473
             return $this->_em->getClassMetadata($alias)->getName();
474 474
         };
475 475
 
@@ -999,7 +999,7 @@  discard block
 block discarded – undo
999 999
             $this->getTimestampKey()
1000 1000
         );
1001 1001
 
1002
-        $result     = $queryCache->get($queryKey, $rsm, $this->_hints);
1002
+        $result = $queryCache->get($queryKey, $rsm, $this->_hints);
1003 1003
 
1004 1004
         if ($result !== null) {
1005 1005
             if ($this->cacheLogger) {
@@ -1135,6 +1135,6 @@  discard block
 block discarded – undo
1135 1135
 
1136 1136
         ksort($hints);
1137 1137
 
1138
-        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
1138
+        return sha1($query.'-'.serialize($params).'-'.serialize($hints));
1139 1139
     }
1140 1140
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultCache.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
      */
46 46
     private $uow;
47 47
 
48
-     /**
49
-     * @var \Doctrine\ORM\Cache\CacheFactory
50
-     */
48
+        /**
49
+         * @var \Doctrine\ORM\Cache\CacheFactory
50
+         */
51 51
     private $cacheFactory;
52 52
 
53 53
     /**
@@ -289,12 +289,12 @@  discard block
 block discarded – undo
289 289
         return $this->queryCaches[$regionName];
290 290
     }
291 291
 
292
-     /**
293
-     * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata   The entity metadata.
294
-     * @param mixed                               $identifier The entity identifier.
295
-     *
296
-     * @return \Doctrine\ORM\Cache\EntityCacheKey
297
-     */
292
+        /**
293
+         * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata   The entity metadata.
294
+         * @param mixed                               $identifier The entity identifier.
295
+         *
296
+         * @return \Doctrine\ORM\Cache\EntityCacheKey
297
+         */
298 298
     private function buildEntityCacheKey(ClassMetadata $metadata, $identifier)
299 299
     {
300 300
         if ( ! is_array($identifier)) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -278,8 +278,7 @@
 block discarded – undo
278 278
     public function getQueryCache($regionName = null)
279 279
     {
280 280
         if ($regionName === null) {
281
-            return $this->defaultQueryCache ?:
282
-                $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em);
281
+            return $this->defaultQueryCache ?: $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em);
283 282
         }
284 283
 
285 284
         if ( ! isset($this->queryCaches[$regionName])) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Region/FileLockRegion.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     private function getLockFileName(CacheKey $key)
120 120
     {
121
-        return $this->directory . DIRECTORY_SEPARATOR . $key->hash . '.' . self::LOCK_EXTENSION;
121
+        return $this->directory.DIRECTORY_SEPARATOR.$key->hash.'.'.self::LOCK_EXTENSION;
122 122
     }
123 123
 
124 124
     /**
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     {
217 217
         // The check below is necessary because on some platforms glob returns false
218 218
         // when nothing matched (even though no errors occurred)
219
-        $filenames = glob(sprintf("%s/*.%s" , $this->directory, self::LOCK_EXTENSION));
219
+        $filenames = glob(sprintf("%s/*.%s", $this->directory, self::LOCK_EXTENSION));
220 220
 
221 221
         if ($filenames) {
222 222
             foreach ($filenames as $filename) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultQueryCache.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
  */
39 39
 class DefaultQueryCache implements QueryCache
40 40
 {
41
-     /**
42
-     * @var \Doctrine\ORM\EntityManagerInterface
43
-     */
41
+        /**
42
+         * @var \Doctrine\ORM\EntityManagerInterface
43
+         */
44 44
     private $em;
45 45
 
46 46
     /**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         $cm = $this->em->getClassMetadata($entityName);
119 119
 
120
-        $generateKeys = static function (array $entry) use ($cm) : EntityCacheKey {
120
+        $generateKeys = static function(array $entry) use ($cm) : EntityCacheKey {
121 121
             return new EntityCacheKey($cm->rootEntityName, $entry['identifier']);
122 122
         };
123 123
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         foreach ($cacheEntry->result as $index => $entry) {
129 129
             $entityEntry = $entries[$index] ?? null;
130 130
 
131
-            if (! $entityEntry instanceof EntityCacheEntry) {
131
+            if ( ! $entityEntry instanceof EntityCacheEntry) {
132 132
                 if ($this->cacheLogger !== null) {
133 133
                     $this->cacheLogger->entityCacheMiss($regionName, $cacheKeys->identifiers[$index]);
134 134
                 }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             }
142 142
 
143 143
             if ( ! $hasRelation) {
144
-                $result[$index]  = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints);
144
+                $result[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints);
145 145
 
146 146
                 continue;
147 147
             }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                     continue;
180 180
                 }
181 181
 
182
-                $generateKeys = function ($id) use ($assocMetadata): EntityCacheKey {
182
+                $generateKeys = function($id) use ($assocMetadata): EntityCacheKey {
183 183
                     return new EntityCacheKey($assocMetadata->rootEntityName, $id);
184 184
                 };
185 185
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         $rootAlias   = key($rsm->aliasMap);
272 272
         $persister   = $this->uow->getEntityPersister($entityName);
273 273
 
274
-        if (! $persister instanceof CachedEntityPersister) {
274
+        if ( ! $persister instanceof CachedEntityPersister) {
275 275
             throw CacheException::nonCacheableEntity($entityName);
276 276
         }
277 277
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                 // root entity association
307 307
                 if ($rootAlias === $parentAlias) {
308 308
                     // Cancel put result if association put fail
309
-                    if ( ($assocInfo = $this->storeAssociationCache($key, $assoc, $assocValue)) === null) {
309
+                    if (($assocInfo = $this->storeAssociationCache($key, $assoc, $assocValue)) === null) {
310 310
                         return false;
311 311
                     }
312 312
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
                     $targetAssoc = $targetClassMetadata->associationMappings[$fieldName];
111 111
 
112
-                    foreach($assoc['targetToSourceKeyColumns'] as $referencedColumn => $localColumn) {
112
+                    foreach ($assoc['targetToSourceKeyColumns'] as $referencedColumn => $localColumn) {
113 113
                         if (isset($targetAssoc['sourceToTargetKeyColumns'][$referencedColumn])) {
114 114
                             $data[$localColumn] = $fieldValue;
115 115
                         }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         }
162 162
 
163 163
         foreach ($metadata->associationMappings as $name => $assoc) {
164
-            if ( ! isset($assoc['cache']) ||  ! isset($data[$name])) {
164
+            if ( ! isset($assoc['cache']) || ! isset($data[$name])) {
165 165
                 continue;
166 166
             }
167 167
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Logging/CacheLogger.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,12 +56,12 @@
 block discarded – undo
56 56
      */
57 57
     public function entityCacheMiss($regionName, EntityCacheKey $key);
58 58
 
59
-     /**
60
-     * Log an entity put into second level cache.
61
-     *
62
-     * @param string                                 $regionName The name of the cache region.
63
-     * @param \Doctrine\ORM\Cache\CollectionCacheKey $key        The cache key of the collection.
64
-     */
59
+        /**
60
+         * Log an entity put into second level cache.
61
+         *
62
+         * @param string                                 $regionName The name of the cache region.
63
+         * @param \Doctrine\ORM\Cache\CollectionCacheKey $key        The cache key of the collection.
64
+         */
65 65
     public function collectionCachePut($regionName, CollectionCacheKey $key);
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
         $ownerId = $this->uow->getEntityIdentifier($collection->getOwner());
86 86
         $key     = new CollectionCacheKey($this->sourceEntity->rootEntityName, $this->association['fieldName'], $ownerId);
87 87
 
88
-       // Invalidate non initialized collections OR ordered collection
88
+        // Invalidate non initialized collections OR ordered collection
89 89
         if ($isDirty && ! $isInitialized || isset($this->association['orderBy'])) {
90 90
             $this->persister->update($collection);
91 91
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/CollectionCacheKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,6 +61,6 @@
 block discarded – undo
61 61
         $this->ownerIdentifier  = $ownerIdentifier;
62 62
         $this->entityClass      = (string) $entityClass;
63 63
         $this->association      = (string) $association;
64
-        $this->hash             = str_replace('\\', '.', strtolower($entityClass)) . '_' . implode(' ', $ownerIdentifier) . '__' .  $association;
64
+        $this->hash             = str_replace('\\', '.', strtolower($entityClass)).'_'.implode(' ', $ownerIdentifier).'__'.$association;
65 65
     }
66 66
 }
Please login to merge, or discard this patch.