Failed Conditions
Push — master ( 8be1e3...e3936d )
by Marco
14s
created
lib/Doctrine/ORM/Reflection/StaticReflectionService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Reflection;
6 6
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function getClassShortName(string $className) : string
24 24
     {
25 25
         if (strpos($className, '\\') !== false) {
26
-            $className = substr($className, strrpos($className, '\\')+1);
26
+            $className = substr($className, strrpos($className, '\\') + 1);
27 27
         }
28 28
         return $className;
29 29
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $namespace = '';
37 37
 
38 38
         if (strpos($className, '\\') !== false) {
39
-            $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\')+1));
39
+            $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\') + 1));
40 40
         }
41 41
 
42 42
         return $namespace;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/CollectionCacheKey.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache;
6 6
 
@@ -42,6 +42,6 @@  discard block
 block discarded – undo
42 42
         $this->ownerIdentifier = $ownerIdentifier;
43 43
         $this->entityClass     = (string) $entityClass;
44 44
         $this->association     = (string) $association;
45
-        $this->hash            = str_replace('\\', '.', strtolower($entityClass)) . '_' . implode(' ', $ownerIdentifier) . '__' . $association;
45
+        $this->hash            = str_replace('\\', '.', strtolower($entityClass)).'_'.implode(' ', $ownerIdentifier).'__'.$association;
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultCache.php 1 patch
Spacing   +16 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache;
6 6
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $metadata  = $this->em->getClassMetadata($className);
63 63
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
64 64
 
65
-        if (! ($persister instanceof CachedPersister)) {
65
+        if ( ! ($persister instanceof CachedPersister)) {
66 66
             return null;
67 67
         }
68 68
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $metadata  = $this->em->getClassMetadata($className);
78 78
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
79 79
 
80
-        if (! ($persister instanceof CachedPersister)) {
80
+        if ( ! ($persister instanceof CachedPersister)) {
81 81
             return null;
82 82
         }
83 83
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $metadata  = $this->em->getClassMetadata($className);
93 93
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
94 94
 
95
-        if (! ($persister instanceof CachedPersister)) {
95
+        if ( ! ($persister instanceof CachedPersister)) {
96 96
             return false;
97 97
         }
98 98
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $metadata  = $this->em->getClassMetadata($className);
108 108
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
109 109
 
110
-        if (! ($persister instanceof CachedPersister)) {
110
+        if ( ! ($persister instanceof CachedPersister)) {
111 111
             return;
112 112
         }
113 113
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $metadata  = $this->em->getClassMetadata($className);
123 123
         $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
124 124
 
125
-        if (! ($persister instanceof CachedPersister)) {
125
+        if ( ! ($persister instanceof CachedPersister)) {
126 126
             return;
127 127
         }
128 128
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         foreach ($metadatas as $metadata) {
140 140
             $persister = $this->uow->getEntityPersister($metadata->getRootClassName());
141 141
 
142
-            if (! ($persister instanceof CachedPersister)) {
142
+            if ( ! ($persister instanceof CachedPersister)) {
143 143
                 continue;
144 144
             }
145 145
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $metadata  = $this->em->getClassMetadata($className);
156 156
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
157 157
 
158
-        if (! ($persister instanceof CachedPersister)) {
158
+        if ( ! ($persister instanceof CachedPersister)) {
159 159
             return false;
160 160
         }
161 161
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $metadata  = $this->em->getClassMetadata($className);
171 171
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
172 172
 
173
-        if (! ($persister instanceof CachedPersister)) {
173
+        if ( ! ($persister instanceof CachedPersister)) {
174 174
             return;
175 175
         }
176 176
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $metadata  = $this->em->getClassMetadata($className);
186 186
         $persister = $this->uow->getCollectionPersister($metadata->getProperty($association));
187 187
 
188
-        if (! ($persister instanceof CachedPersister)) {
188
+        if ( ! ($persister instanceof CachedPersister)) {
189 189
             return;
190 190
         }
191 191
 
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
 
202 202
         foreach ($metadatas as $metadata) {
203 203
             foreach ($metadata->getDeclaredPropertiesIterator() as $association) {
204
-                if (! $association instanceof ToManyAssociationMetadata) {
204
+                if ( ! $association instanceof ToManyAssociationMetadata) {
205 205
                     continue;
206 206
                 }
207 207
 
208 208
                 $persister = $this->uow->getCollectionPersister($association);
209 209
 
210
-                if (! ($persister instanceof CachedPersister)) {
210
+                if ( ! ($persister instanceof CachedPersister)) {
211 211
                     continue;
212 212
                 }
213 213
 
@@ -258,11 +258,10 @@  discard block
 block discarded – undo
258 258
     public function getQueryCache($regionName = null)
259 259
     {
260 260
         if ($regionName === null) {
261
-            return $this->defaultQueryCache ?:
262
-                $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em);
261
+            return $this->defaultQueryCache ?: $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em);
263 262
         }
264 263
 
265
-        if (! isset($this->queryCaches[$regionName])) {
264
+        if ( ! isset($this->queryCaches[$regionName])) {
266 265
             $this->queryCaches[$regionName] = $this->cacheFactory->buildQueryCache($this->em, $regionName);
267 266
         }
268 267
 
@@ -277,7 +276,7 @@  discard block
 block discarded – undo
277 276
      */
278 277
     private function buildEntityCacheKey(ClassMetadata $metadata, $identifier)
279 278
     {
280
-        if (! is_array($identifier)) {
279
+        if ( ! is_array($identifier)) {
281 280
             $identifier = $this->toIdentifierArray($metadata, $identifier);
282 281
         }
283 282
 
@@ -293,7 +292,7 @@  discard block
 block discarded – undo
293 292
      */
294 293
     private function buildCollectionCacheKey(ClassMetadata $metadata, $association, $ownerIdentifier)
295 294
     {
296
-        if (! is_array($ownerIdentifier)) {
295
+        if ( ! is_array($ownerIdentifier)) {
297 296
             $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier);
298 297
         }
299 298
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache;
6 6
 
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
         $data = array_merge($data, $persister->getIdentifier($entity)); // why update has no identifier values ?
55 55
 
56 56
         foreach ($metadata->getDeclaredPropertiesIterator() as $name => $association) {
57
-            if (! isset($data[$name]) || $association instanceof FieldMetadata) {
57
+            if ( ! isset($data[$name]) || $association instanceof FieldMetadata) {
58 58
                 continue;
59 59
             }
60 60
 
61
-            if (! $association instanceof ToOneAssociationMetadata) {
61
+            if ( ! $association instanceof ToOneAssociationMetadata) {
62 62
                 unset($data[$name]);
63 63
 
64 64
                 continue;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $targetClassMetadata = $this->em->getClassMetadata($targetEntity);
69 69
             $targetPersister     = $this->uow->getEntityPersister($targetEntity);
70 70
 
71
-            if (! $association->getCache()) {
71
+            if ( ! $association->getCache()) {
72 72
                 $owningAssociation = ! $association->isOwningSide()
73 73
                     ? $targetClassMetadata->getProperty($association->getMappedBy())
74 74
                     : $association;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 continue;
117 117
             }
118 118
 
119
-            if (! $association->isPrimaryKey()) {
119
+            if ( ! $association->isPrimaryKey()) {
120 120
                 $targetClass = StaticClassNameConverter::getClass($data[$name]);
121 121
                 $targetId    = $this->uow->getEntityIdentifier($data[$name]);
122 122
                 $data[$name] = new AssociationCacheEntry($targetClass, $targetId);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                 ($association instanceof OneToOneAssociationMetadata && ! $association->isOwningSide())
166 166
             );
167 167
 
168
-            if (! $isEagerLoad) {
168
+            if ( ! $isEagerLoad) {
169 169
                 $data[$name] = $this->em->getReference($assocClass, $assocId);
170 170
 
171 171
                 continue;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/EntityCacheEntry.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache;
6 6
 
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function resolveAssociationEntries(EntityManagerInterface $em)
58 58
     {
59
-        return array_map(function ($value) use ($em) {
60
-            if (! ($value instanceof AssociationCacheEntry)) {
59
+        return array_map(function($value) use ($em) {
60
+            if ( ! ($value instanceof AssociationCacheEntry)) {
61 61
                 return $value;
62 62
             }
63 63
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache\Persister\Entity;
6 6
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             ? $this->persister->expandCriteriaParameters($criteria)
278 278
             : $this->persister->expandParameters($criteria);
279 279
 
280
-        return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset);
280
+        return sha1($query.serialize($params).serialize($orderBy).$limit.$offset);
281 281
     }
282 282
 
283 283
     /**
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
         $hasCache  = ($persister instanceof CachedPersister);
576 576
         $key       = null;
577 577
 
578
-        if (! $hasCache) {
578
+        if ( ! $hasCache) {
579 579
             return $this->persister->loadManyToManyCollection($association, $sourceEntity, $collection);
580 580
         }
581 581
 
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         $persister = $uow->getCollectionPersister($association);
615 615
         $hasCache  = ($persister instanceof CachedPersister);
616 616
 
617
-        if (! $hasCache) {
617
+        if ( ! $hasCache) {
618 618
             return $this->persister->loadOneToManyCollection($association, $sourceEntity, $collection);
619 619
         }
620 620
 
Please login to merge, or discard this patch.
Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache\Persister\Collection;
6 6
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $isInitialized = $collection->isInitialized();
61 61
         $isDirty       = $collection->isDirty();
62 62
 
63
-        if (! $isInitialized && ! $isDirty) {
63
+        if ( ! $isInitialized && ! $isDirty) {
64 64
             return;
65 65
         }
66 66
 
Please login to merge, or discard this patch.
ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache\Persister\Collection;
6 6
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $isInitialized = $collection->isInitialized();
98 98
         $isDirty       = $collection->isDirty();
99 99
 
100
-        if (! $isInitialized && ! $isDirty) {
100
+        if ( ! $isInitialized && ! $isDirty) {
101 101
             return;
102 102
         }
103 103
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultCacheFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Cache;
6 6
 
@@ -189,14 +189,14 @@  discard block
 block discarded – undo
189 189
         ;
190 190
 
191 191
         if ($cache->getUsage() === CacheUsage::READ_WRITE) {
192
-            if (! $this->fileLockRegionDirectory) {
192
+            if ( ! $this->fileLockRegionDirectory) {
193 193
                 throw new \LogicException(
194
-                    'If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" is required, ' .
194
+                    'If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" is required, '.
195 195
                     'The default implementation provided by doctrine is "Doctrine\ORM\Cache\Region\FileLockRegion" if you want to use it please provide a valid directory, DefaultCacheFactory#setFileLockRegionDirectory(). '
196 196
                 );
197 197
             }
198 198
 
199
-            $directory = $this->fileLockRegionDirectory . DIRECTORY_SEPARATOR . $regionName;
199
+            $directory = $this->fileLockRegionDirectory.DIRECTORY_SEPARATOR.$regionName;
200 200
             $region    = new FileLockRegion($region, $directory, $this->regionsConfig->getLockLifetime($regionName));
201 201
         }
202 202
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     {
213 213
         $cacheAdapter = clone $this->cache;
214 214
 
215
-        if (! $cacheAdapter instanceof CacheProvider) {
215
+        if ( ! $cacheAdapter instanceof CacheProvider) {
216 216
             return $cacheAdapter;
217 217
         }
218 218
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             $namespace .= ':';
223 223
         }
224 224
 
225
-        $cacheAdapter->setNamespace($namespace . $name);
225
+        $cacheAdapter->setNamespace($namespace.$name);
226 226
 
227 227
         return $cacheAdapter;
228 228
     }
Please login to merge, or discard this patch.