Completed
Pull Request — master (#6243)
by Jáchym
15:16
created
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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
         $cm = $this->em->getClassMetadata($entityName);
115 115
 
116
-        $generateKeys = function (array $entry) use ($cm): EntityCacheKey {
116
+        $generateKeys = function(array $entry) use ($cm): EntityCacheKey {
117 117
             return new EntityCacheKey($cm->rootEntityName, $entry['identifier']);
118 118
         };
119 119
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
             if ( ! $hasRelation) {
142 142
 
143
-                $result[$index]  = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints);
143
+                $result[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints);
144 144
 
145 145
                 continue;
146 146
             }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 // root entity association
286 286
                 if ($rootAlias === $parentAlias) {
287 287
                     // Cancel put result if association put fail
288
-                    if ( ($assocInfo = $this->storeAssociationCache($key, $assoc, $assocValue)) === null) {
288
+                    if (($assocInfo = $this->storeAssociationCache($key, $assoc, $assocValue)) === null) {
289 289
                         return false;
290 290
                     }
291 291
 
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/Persister/Entity/AbstractEntityPersister.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
  */
42 42
 abstract class AbstractEntityPersister implements CachedEntityPersister
43 43
 {
44
-     /**
45
-     * @var \Doctrine\ORM\UnitOfWork
46
-     */
44
+        /**
45
+         * @var \Doctrine\ORM\UnitOfWork
46
+         */
47 47
     protected $uow;
48 48
 
49 49
     /**
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected $class;
63 63
 
64
-     /**
65
-     * @var array
66
-     */
64
+        /**
65
+         * @var array
66
+         */
67 67
     protected $queuedCache = array();
68 68
 
69 69
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
296 296
             ? $this->persister->expandCriteriaParameters($criteria)
297 297
             : $this->persister->expandParameters($criteria);
298 298
 
299
-        return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset);
299
+        return sha1($query.serialize($params).serialize($orderBy).$limit.$offset);
300 300
     }
301 301
 
302 302
     /**
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.
lib/Doctrine/ORM/Cache/EntityCacheKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,6 +52,6 @@
 block discarded – undo
52 52
 
53 53
         $this->identifier  = $identifier;
54 54
         $this->entityClass = $entityClass;
55
-        $this->hash        = str_replace('\\', '.', strtolower($entityClass) . '_' . implode(' ', $identifier));
55
+        $this->hash        = str_replace('\\', '.', strtolower($entityClass).'_'.implode(' ', $identifier));
56 56
     }
57 57
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Lock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     public function __construct($value, $time = null)
46 46
     {
47 47
         $this->value = $value;
48
-        $this->time  = $time ? : time();
48
+        $this->time  = $time ?: time();
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/LazyCriteriaCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
             return $this->collection->isEmpty();
94 94
         }
95 95
 
96
-        return !$this->count();
96
+        return ! $this->count();
97 97
     }
98 98
 
99 99
     /**
Please login to merge, or discard this patch.