Completed
Pull Request — master (#5626)
by Gary
09:09
created
lib/Shitty/ORM/Cache/CacheConfiguration.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function getCacheLogger()
75 75
     {
76
-         return $this->cacheLogger;
76
+            return $this->cacheLogger;
77 77
     }
78 78
 
79 79
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $this->queryValidator = new TimestampQueryCacheValidator();
114 114
         }
115 115
 
116
-         return $this->queryValidator;
116
+            return $this->queryValidator;
117 117
     }
118 118
 
119 119
     /**
Please login to merge, or discard this patch.
lib/Shitty/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 \Shitty\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 \Shitty\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.
lib/Shitty/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
  */
38 38
 abstract class AbstractCollectionPersister implements CachedCollectionPersister
39 39
 {
40
-     /**
41
-     * @var \Shitty\ORM\UnitOfWork
42
-     */
40
+        /**
41
+         * @var \Shitty\ORM\UnitOfWork
42
+         */
43 43
     protected $uow;
44 44
 
45 45
     /**
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
      */
68 68
     protected $association;
69 69
 
70
-     /**
71
-     * @var array
72
-     */
70
+        /**
71
+         * @var array
72
+         */
73 73
     protected $queuedCache = array();
74 74
 
75 75
     /**
Please login to merge, or discard this patch.
Shitty/ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -715,9 +715,9 @@
 block discarded – undo
715 715
         );
716 716
     }
717 717
 
718
-     /**
719
-     * {@inheritdoc}
720
-     */
718
+        /**
719
+         * {@inheritdoc}
720
+         */
721 721
     protected function getHash()
722 722
     {
723 723
         return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults);
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/Shitty/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 \Shitty\ORM\Cache\CacheFactory
50
-     */
48
+        /**
49
+         * @var \Shitty\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 \Shitty\ORM\Mapping\ClassMetadata $metadata   The entity metadata.
294
-     * @param mixed                               $identifier The entity identifier.
295
-     *
296
-     * @return \Shitty\ORM\Cache\EntityCacheKey
297
-     */
292
+        /**
293
+         * @param \Shitty\ORM\Mapping\ClassMetadata $metadata   The entity metadata.
294
+         * @param mixed                               $identifier The entity identifier.
295
+         *
296
+         * @return \Shitty\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   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -278,8 +278,7 @@  discard block
 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])) {
@@ -314,7 +313,7 @@  discard block
 block discarded – undo
314 313
     private function buildCollectionCacheKey(ClassMetadata $metadata, $association, $ownerIdentifier)
315 314
     {
316 315
         if ( ! is_array($ownerIdentifier)) {
317
-            $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier);;
316
+            $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier); ;
318 317
         }
319 318
 
320 319
         return new CollectionCacheKey($metadata->rootEntityName, $association, $ownerIdentifier);
Please login to merge, or discard this patch.
lib/Shitty/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/Shitty/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/Shitty/ORM/OptimisticLockException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion;
77 77
         $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion;
78 78
 
79
-        return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity);
79
+        return new self("The optimistic lock failed, version ".$expectedLockVersion." was expected, but is actually ".$actualLockVersion, $entity);
80 80
     }
81 81
 
82 82
     /**
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public static function notVersioned($entityName)
88 88
     {
89
-        return new self("Cannot obtain optimistic lock on unversioned entity " . $entityName, null);
89
+        return new self("Cannot obtain optimistic lock on unversioned entity ".$entityName, null);
90 90
     }
91 91
 }
Please login to merge, or discard this patch.