Completed
Pull Request — master (#21)
by
unknown
04:32
created
lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function getAllMetadata()
81 81
     {
82
-        if (! $this->initialized) {
82
+        if (!$this->initialized) {
83 83
             $this->initialize();
84 84
         }
85 85
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         try {
178 178
             if ($this->cacheDriver) {
179
-                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);
179
+                $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt);
180 180
                 if ($cached instanceof ClassMetadata) {
181 181
                     $this->loadedMetadata[$realClassName] = $cached;
182 182
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         } catch (MappingException $loadingException) {
191 191
             $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName);
192 192
 
193
-            if (! $fallbackMetadataResponse) {
193
+            if (!$fallbackMetadataResponse) {
194 194
                 throw $loadingException;
195 195
             }
196 196
 
@@ -231,12 +231,12 @@  discard block
 block discarded – undo
231 231
     {
232 232
         $this->loadedMetadata[$className] = $class;
233 233
 
234
-        if (! $this->cacheDriver) {
234
+        if (!$this->cacheDriver) {
235 235
             return;
236 236
         }
237 237
 
238 238
         $this->cacheDriver->save(
239
-            $className . $this->cacheSalt,
239
+            $className.$this->cacheSalt,
240 240
             $this->loadedMetadata[$className],
241 241
             null
242 242
         );
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      */
282 282
     protected function loadMetadata($name)
283 283
     {
284
-        if (! $this->initialized) {
284
+        if (!$this->initialized) {
285 285
             $this->initialize();
286 286
         }
287 287
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
      */
368 368
     public function isTransient($class)
369 369
     {
370
-        if (! $this->initialized) {
370
+        if (!$this->initialized) {
371 371
             $this->initialize();
372 372
         }
373 373
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
      */
409 409
     private function getRealClass(string $class) : string
410 410
     {
411
-        $pos = strrpos($class, '\\' . Proxy::MARKER . '\\');
411
+        $pos = strrpos($class, '\\'.Proxy::MARKER.'\\');
412 412
 
413 413
         if ($pos === false) {
414 414
             return $class;
Please login to merge, or discard this patch.
Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function testGetMetadataForAbsentClass()
48 48
     {
49 49
         $this->expectException(MappingException::class);
50
-        $this->cmf->getMetadataFor(__NAMESPACE__ . '\AbsentClass');
50
+        $this->cmf->getMetadataFor(__NAMESPACE__.'\AbsentClass');
51 51
     }
52 52
 
53 53
     public function testGetParentMetadata()
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $metadata = $this->createMock(ClassMetadata::class);
65 65
         $cache    = new ArrayCache();
66
-        $cache->save(ChildEntity::class . '$CLASSMETADATA', $metadata);
66
+        $cache->save(ChildEntity::class.'$CLASSMETADATA', $metadata);
67 67
 
68 68
         $this->cmf->setCacheDriver($cache);
69 69
 
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
 
78 78
         $loadedMetadata = $this->cmf->getMetadataFor(ChildEntity::class);
79 79
 
80
-        self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class . '$CLASSMETADATA'));
80
+        self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class.'$CLASSMETADATA'));
81 81
     }
82 82
 
83 83
     public function testGetAliasedMetadata()
84 84
     {
85 85
         $this->cmf->getMetadataFor('prefix:ChildEntity');
86 86
 
87
-        self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__ . '\ChildEntity'));
87
+        self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__.'\ChildEntity'));
88 88
         self::assertTrue($this->cmf->hasMetadataFor('prefix:ChildEntity'));
89 89
     }
90 90
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         $classMetadata = $this->createMock(ClassMetadata::class);
115 115
 
116
-        $this->cmf->fallbackCallback = static function () use ($classMetadata) {
116
+        $this->cmf->fallbackCallback = static function() use ($classMetadata) {
117 117
             return $classMetadata;
118 118
         };
119 119
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
     public function testWillFailOnFallbackFailureWithNotLoadedMetadata()
126 126
     {
127
-        $this->cmf->fallbackCallback = static function () {
127
+        $this->cmf->fallbackCallback = static function() {
128 128
             return null;
129 129
         };
130 130
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
         $classMetadata = $this->createMock(ClassMetadata::class);
172 172
 
173
-        $this->cmf->fallbackCallback = static function () use ($classMetadata) {
173
+        $this->cmf->fallbackCallback = static function() use ($classMetadata) {
174 174
             return $classMetadata;
175 175
         };
176 176
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
     protected function getFqcnFromAlias($namespaceAlias, $simpleClassName)
218 218
     {
219
-        return __NAMESPACE__ . '\\' . $simpleClassName;
219
+        return __NAMESPACE__.'\\'.$simpleClassName;
220 220
     }
221 221
 
222 222
     protected function initialize()
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
     protected function onNotFoundMetadata($className)
249 249
     {
250
-        if (! $this->fallbackCallback) {
250
+        if (!$this->fallbackCallback) {
251 251
             return null;
252 252
         }
253 253
 
Please login to merge, or discard this patch.