@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $name = $this->defaultConnection; |
91 | 91 | } |
92 | 92 | |
93 | - if (! isset($this->connections[$name])) { |
|
93 | + if (!isset($this->connections[$name])) { |
|
94 | 94 | throw new InvalidArgumentException(sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name)); |
95 | 95 | } |
96 | 96 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $name = $this->defaultManager; |
146 | 146 | } |
147 | 147 | |
148 | - if (! isset($this->managers[$name])) { |
|
148 | + if (!isset($this->managers[$name])) { |
|
149 | 149 | throw new InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); |
150 | 150 | } |
151 | 151 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | // Check for namespace alias |
161 | 161 | if (strpos($class, ':') !== false) { |
162 | 162 | [$namespaceAlias, $simpleClassName] = explode(':', $class, 2); |
163 | - $class = $this->getAliasNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
163 | + $class = $this->getAliasNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | $proxyClass = new ReflectionClass($class); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { |
169 | 169 | $parentClass = $proxyClass->getParentClass(); |
170 | 170 | |
171 | - if (! $parentClass) { |
|
171 | + if (!$parentClass) { |
|
172 | 172 | return null; |
173 | 173 | } |
174 | 174 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | foreach ($this->managers as $id) { |
179 | 179 | $manager = $this->getService($id); |
180 | 180 | |
181 | - if (! $manager->getMetadataFactory()->isTransient($class)) { |
|
181 | + if (!$manager->getMetadataFactory()->isTransient($class)) { |
|
182 | 182 | return $manager; |
183 | 183 | } |
184 | 184 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $name = $this->defaultManager; |
223 | 223 | } |
224 | 224 | |
225 | - if (! isset($this->managers[$name])) { |
|
225 | + if (!isset($this->managers[$name])) { |
|
226 | 226 | throw new InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); |
227 | 227 | } |
228 | 228 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function testGetMetadataForAbsentClass() |
46 | 46 | { |
47 | 47 | $this->expectException(MappingException::class); |
48 | - $this->cmf->getMetadataFor(__NAMESPACE__ . '\AbsentClass'); |
|
48 | + $this->cmf->getMetadataFor(__NAMESPACE__.'\AbsentClass'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function testGetParentMetadata() |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | { |
62 | 62 | $metadata = $this->createMock(ClassMetadata::class); |
63 | 63 | $cache = new ArrayCache(); |
64 | - $cache->save(ChildEntity::class . '$CLASSMETADATA', $metadata); |
|
64 | + $cache->save(ChildEntity::class.'$CLASSMETADATA', $metadata); |
|
65 | 65 | |
66 | 66 | $this->cmf->setCacheDriver($cache); |
67 | 67 | |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | |
76 | 76 | $loadedMetadata = $this->cmf->getMetadataFor(ChildEntity::class); |
77 | 77 | |
78 | - self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class . '$CLASSMETADATA')); |
|
78 | + self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class.'$CLASSMETADATA')); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function testGetAliasedMetadata() |
82 | 82 | { |
83 | 83 | $this->cmf->getMetadataFor('prefix:ChildEntity'); |
84 | 84 | |
85 | - self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__ . '\ChildEntity')); |
|
85 | + self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__.'\ChildEntity')); |
|
86 | 86 | self::assertTrue($this->cmf->hasMetadataFor('prefix:ChildEntity')); |
87 | 87 | } |
88 | 88 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | { |
112 | 112 | $classMetadata = $this->createMock(ClassMetadata::class); |
113 | 113 | |
114 | - $this->cmf->fallbackCallback = static function () use ($classMetadata) { |
|
114 | + $this->cmf->fallbackCallback = static function() use ($classMetadata) { |
|
115 | 115 | return $classMetadata; |
116 | 116 | }; |
117 | 117 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | public function testWillFailOnFallbackFailureWithNotLoadedMetadata() |
124 | 124 | { |
125 | - $this->cmf->fallbackCallback = static function () { |
|
125 | + $this->cmf->fallbackCallback = static function() { |
|
126 | 126 | return null; |
127 | 127 | }; |
128 | 128 |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | private function getManagerFactory() |
162 | 162 | { |
163 | - return function (string $name) { |
|
163 | + return function(string $name) { |
|
164 | 164 | $mock = $this->createMock(ObjectManager::class); |
165 | 165 | $driver = $this->createMock(MappingDriver::class); |
166 | 166 | $metadata = $this->createMock(ClassMetadata::class); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | protected function getService($name) |
207 | 207 | { |
208 | - if (! isset($this->services[$name])) { |
|
208 | + if (!isset($this->services[$name])) { |
|
209 | 209 | $this->services[$name] = call_user_func($this->managerFactory, $name); |
210 | 210 | } |
211 | 211 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) |
37 | 37 | { |
38 | - return __NAMESPACE__ . '\\' . $simpleClassName; |
|
38 | + return __NAMESPACE__.'\\'.$simpleClassName; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | protected function initialize() |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | protected function onNotFoundMetadata($className) |
68 | 68 | { |
69 | - if (! $this->fallbackCallback) { |
|
69 | + if (!$this->fallbackCallback) { |
|
70 | 70 | return null; |
71 | 71 | } |
72 | 72 |
@@ -79,7 +79,7 @@ discard block |
||
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 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | try { |
176 | 176 | if ($this->cacheDriver) { |
177 | - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); |
|
177 | + $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt); |
|
178 | 178 | if ($cached instanceof ClassMetadata) { |
179 | 179 | $this->loadedMetadata[$realClassName] = $cached; |
180 | 180 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } else { |
183 | 183 | foreach ($this->loadMetadata($realClassName) as $loadedClassName) { |
184 | 184 | $this->cacheDriver->save( |
185 | - $loadedClassName . $this->cacheSalt, |
|
185 | + $loadedClassName.$this->cacheSalt, |
|
186 | 186 | $this->loadedMetadata[$loadedClassName] |
187 | 187 | ); |
188 | 188 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } catch (MappingException $loadingException) { |
194 | 194 | $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName); |
195 | 195 | |
196 | - if (! $fallbackMetadataResponse) { |
|
196 | + if (!$fallbackMetadataResponse) { |
|
197 | 197 | throw $loadingException; |
198 | 198 | } |
199 | 199 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | protected function loadMetadata($name) |
276 | 276 | { |
277 | - if (! $this->initialized) { |
|
277 | + if (!$this->initialized) { |
|
278 | 278 | $this->initialize(); |
279 | 279 | } |
280 | 280 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | */ |
362 | 362 | public function isTransient($class) |
363 | 363 | { |
364 | - if (! $this->initialized) { |
|
364 | + if (!$this->initialized) { |
|
365 | 365 | $this->initialize(); |
366 | 366 | } |
367 | 367 | |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | */ |
403 | 403 | private function getRealClass(string $class) : string |
404 | 404 | { |
405 | - $pos = strrpos($class, '\\' . Proxy::MARKER . '\\'); |
|
405 | + $pos = strrpos($class, '\\'.Proxy::MARKER.'\\'); |
|
406 | 406 | |
407 | 407 | if ($pos === false) { |
408 | 408 | return $class; |