Passed
Pull Request — master (#21)
by
unknown
03:59
created
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 = function () use ($classMetadata) {
173
+        $this->cmf->fallbackCallback = 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.
lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
         if (null !== $this->cacheDriver) {
235 235
             $this->cacheDriver->save(
236
-                $className . $this->cacheSalt,
236
+                $className.$this->cacheSalt,
237 237
                 $this->loadedMetadata[$className],
238 238
                 null
239 239
             );
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      */
280 280
     protected function loadMetadata($name)
281 281
     {
282
-        if (! $this->initialized) {
282
+        if (!$this->initialized) {
283 283
             $this->initialize();
284 284
         }
285 285
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
      */
366 366
     public function isTransient($class)
367 367
     {
368
-        if (! $this->initialized) {
368
+        if (!$this->initialized) {
369 369
             $this->initialize();
370 370
         }
371 371
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      */
407 407
     private function getRealClass(string $class) : string
408 408
     {
409
-        $pos = strrpos($class, '\\' . Proxy::MARKER . '\\');
409
+        $pos = strrpos($class, '\\'.Proxy::MARKER.'\\');
410 410
 
411 411
         if ($pos === false) {
412 412
             return $class;
Please login to merge, or discard this patch.