Completed
Pull Request — master (#6500)
by Mathew
17:49 queued 08:41
created
lib/Doctrine/ORM/Utility/PersisterHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
         $assoc = $class->associationMappings[$fieldName];
57 57
 
58
-        if (! $assoc['isOwningSide']) {
58
+        if ( ! $assoc['isOwningSide']) {
59 59
             return self::getTypeOfField($assoc['mappedBy'], $em->getClassMetadata($assoc['targetEntity']), $em);
60 60
         }
61 61
 
Please login to merge, or discard this patch.
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 4 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
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     public function getParameter($key)
325 325
     {
326 326
         $filteredParameters = $this->parameters->filter(
327
-            function ($parameter) use ($key)
327
+            function($parameter) use ($key)
328 328
             {
329 329
                 // Must not be identical because of string to integer conversion
330 330
                 return ($key == $parameter->getName());
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
     public function setParameter($key, $value, $type = null)
374 374
     {
375 375
         $filteredParameters = $this->parameters->filter(
376
-            function ($parameter) use ($key)
376
+            function($parameter) use ($key)
377 377
             {
378 378
                 // Must not be identical because of string to integer conversion
379 379
                 return ($key == $parameter->getName());
@@ -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
 
@@ -1000,7 +1000,7 @@  discard block
 block discarded – undo
1000 1000
             $this->getTimestampKey()
1001 1001
         );
1002 1002
 
1003
-        $result     = $queryCache->get($queryKey, $rsm, $this->_hints);
1003
+        $result = $queryCache->get($queryKey, $rsm, $this->_hints);
1004 1004
 
1005 1005
         if ($result !== null) {
1006 1006
             if ($this->cacheLogger) {
@@ -1136,6 +1136,6 @@  discard block
 block discarded – undo
1136 1136
 
1137 1137
         ksort($hints);
1138 1138
 
1139
-        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
1139
+        return sha1($query.'-'.serialize($params).'-'.serialize($hints));
1140 1140
     }
1141 1141
 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1044,7 +1044,7 @@
 block discarded – undo
1044 1044
      * Will return the configured id if it exists otherwise a hash will be
1045 1045
      * automatically generated for you.
1046 1046
      *
1047
-     * @return array ($key, $hash)
1047
+     * @return string[] ($key, $hash)
1048 1048
      */
1049 1049
     protected function getHydrationCacheId()
1050 1050
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@
 block discarded – undo
22 22
 use Doctrine\Common\Util\ClassUtils;
23 23
 use Doctrine\Common\Collections\Collection;
24 24
 use Doctrine\Common\Collections\ArrayCollection;
25
-
26 25
 use Doctrine\ORM\Query\Parameter;
27 26
 use Doctrine\ORM\Cache\QueryCacheKey;
28 27
 use Doctrine\DBAL\Cache\QueryCacheProfile;
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/DefaultRegion.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     protected function getCacheEntryKey(CacheKey $key)
126 126
     {
127
-        return $this->name . self::REGION_KEY_SEPARATOR . $key->hash;
127
+        return $this->name.self::REGION_KEY_SEPARATOR.$key->hash;
128 128
     }
129 129
 
130 130
     /**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function evictAll()
150 150
     {
151
-        if (! $this->cache instanceof ClearableCache) {
151
+        if ( ! $this->cache instanceof ClearableCache) {
152 152
             throw new \BadMethodCallException(sprintf(
153 153
                 'Clearing all cache entries is not supported by the supplied cache adapter of type %s',
154 154
                 get_class($this->cache)
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   +4 added lines, -4 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
             }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     continue;
179 179
                 }
180 180
 
181
-                $collection  = new PersistentCollection($this->em, $assocMetadata, new ArrayCollection());
181
+                $collection = new PersistentCollection($this->em, $assocMetadata, new ArrayCollection());
182 182
 
183 183
                 foreach ($assoc['list'] as $assocIndex => $assocId) {
184 184
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                 // root entity association
285 285
                 if ($rootAlias === $parentAlias) {
286 286
                     // Cancel put result if association put fail
287
-                    if ( ($assocInfo = $this->storeAssociationCache($key, $assoc, $assocValue)) === null) {
287
+                    if (($assocInfo = $this->storeAssociationCache($key, $assoc, $assocValue)) === null) {
288 288
                         return false;
289 289
                     }
290 290
 
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.