@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $name = $this->defaultConnection; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if (! isset($this->connections[$name])) { |
|
| 92 | + if (!isset($this->connections[$name])) { |
|
| 93 | 93 | throw new InvalidArgumentException( |
| 94 | 94 | sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name) |
| 95 | 95 | ); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $name = $this->defaultManager; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - if (! isset($this->managers[$name])) { |
|
| 149 | + if (!isset($this->managers[$name])) { |
|
| 150 | 150 | throw new InvalidArgumentException( |
| 151 | 151 | sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name) |
| 152 | 152 | ); |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | if (strpos($class, ':') !== false) { |
| 168 | 168 | [$namespaceAlias, $simpleClassName] = explode(':', $class, 2); |
| 169 | 169 | |
| 170 | - $class = $this->getAliasNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
| 170 | + $class = $this->getAliasNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | $proxyClass = new ReflectionClass($class); |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { |
| 176 | 176 | $parentClass = $proxyClass->getParentClass(); |
| 177 | 177 | |
| 178 | - if (! $parentClass) { |
|
| 178 | + if (!$parentClass) { |
|
| 179 | 179 | return null; |
| 180 | 180 | } |
| 181 | 181 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | /** @var ObjectManager $manager */ |
| 187 | 187 | $manager = $this->getService($id); |
| 188 | 188 | |
| 189 | - if (! $manager->getMetadataFactory()->isTransient($class)) { |
|
| 189 | + if (!$manager->getMetadataFactory()->isTransient($class)) { |
|
| 190 | 190 | return $manager; |
| 191 | 191 | } |
| 192 | 192 | } |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $name = $this->defaultManager; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - if (! isset($this->managers[$name])) { |
|
| 248 | + if (!isset($this->managers[$name])) { |
|
| 249 | 249 | throw new InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); |
| 250 | 250 | } |
| 251 | 251 | |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | public function testGetParentClasses() : void |
| 39 | 39 | { |
| 40 | 40 | $classes = $this->reflectionService->getParentClasses(self::class); |
| 41 | - self::assertTrue(count($classes) >= 1, 'The test class ' . self::class . ' should have at least one parent.'); |
|
| 41 | + self::assertTrue(count($classes) >= 1, 'The test class '.self::class.' should have at least one parent.'); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function testGetParentClassesForAbsentClass() : void |
| 45 | 45 | { |
| 46 | 46 | $this->expectException(MappingException::class); |
| 47 | - $this->reflectionService->getParentClasses(__NAMESPACE__ . '\AbsentClass'); |
|
| 47 | + $this->reflectionService->getParentClasses(__NAMESPACE__.'\AbsentClass'); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function testGetReflectionClass() : void |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | public function testGetPaths() : void |
| 16 | 16 | { |
| 17 | - $path = __DIR__ . '/_files'; |
|
| 17 | + $path = __DIR__.'/_files'; |
|
| 18 | 18 | $prefix = 'Foo'; |
| 19 | 19 | |
| 20 | 20 | $locator = new SymfonyFileLocator([$path => $prefix]); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | public function testGetPrefixes() : void |
| 28 | 28 | { |
| 29 | - $path = __DIR__ . '/_files'; |
|
| 29 | + $path = __DIR__.'/_files'; |
|
| 30 | 30 | $prefix = 'Foo'; |
| 31 | 31 | |
| 32 | 32 | $locator = new SymfonyFileLocator([$path => $prefix]); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function testFileExists() : void |
| 45 | 45 | { |
| 46 | - $path = __DIR__ . '/_files'; |
|
| 46 | + $path = __DIR__.'/_files'; |
|
| 47 | 47 | $prefix = 'Foo'; |
| 48 | 48 | |
| 49 | 49 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml'); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | public function testGetAllClassNames() : void |
| 58 | 58 | { |
| 59 | - $path = __DIR__ . '/_files'; |
|
| 59 | + $path = __DIR__.'/_files'; |
|
| 60 | 60 | $prefix = 'Foo'; |
| 61 | 61 | |
| 62 | 62 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml'); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | public function testInvalidCustomNamespaceSeparator() : void |
| 79 | 79 | { |
| 80 | - $path = __DIR__ . '/_files'; |
|
| 80 | + $path = __DIR__.'/_files'; |
|
| 81 | 81 | $prefix = 'Foo'; |
| 82 | 82 | |
| 83 | 83 | $this->expectException(InvalidArgumentException::class); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function testGetClassNamesWithCustomNsSeparator($separator, $dir) : void |
| 109 | 109 | { |
| 110 | - $path = __DIR__ . $dir; |
|
| 110 | + $path = __DIR__.$dir; |
|
| 111 | 111 | $prefix = 'Foo'; |
| 112 | 112 | |
| 113 | 113 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml', $separator); |
@@ -155,29 +155,29 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public function testFindMappingFileWithCustomNsSeparator($separator, $dir, $files) : void |
| 157 | 157 | { |
| 158 | - $path = __DIR__ . $dir; |
|
| 158 | + $path = __DIR__.$dir; |
|
| 159 | 159 | $prefix = 'Foo'; |
| 160 | 160 | |
| 161 | 161 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml', $separator); |
| 162 | 162 | |
| 163 | 163 | foreach ($files as $filePath => $className) { |
| 164 | - self::assertSame(realpath($path . '/' . $filePath), realpath($locator->findMappingFile($className))); |
|
| 164 | + self::assertSame(realpath($path.'/'.$filePath), realpath($locator->findMappingFile($className))); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | public function testFindMappingFile() : void |
| 169 | 169 | { |
| 170 | - $path = __DIR__ . '/_files'; |
|
| 170 | + $path = __DIR__.'/_files'; |
|
| 171 | 171 | $prefix = 'Foo'; |
| 172 | 172 | |
| 173 | 173 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml'); |
| 174 | 174 | |
| 175 | - self::assertSame(__DIR__ . '/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass')); |
|
| 175 | + self::assertSame(__DIR__.'/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass')); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | public function testFindMappingFileNotFound() : void |
| 179 | 179 | { |
| 180 | - $path = __DIR__ . '/_files'; |
|
| 180 | + $path = __DIR__.'/_files'; |
|
| 181 | 181 | $prefix = 'Foo'; |
| 182 | 182 | |
| 183 | 183 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml'); |
@@ -191,13 +191,13 @@ discard block |
||
| 191 | 191 | { |
| 192 | 192 | // Low -> High |
| 193 | 193 | $prefixes = []; |
| 194 | - $prefixes[__DIR__ . '/_match_ns'] = 'Foo'; |
|
| 195 | - $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 194 | + $prefixes[__DIR__.'/_match_ns'] = 'Foo'; |
|
| 195 | + $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 196 | 196 | |
| 197 | 197 | $locator = new SymfonyFileLocator($prefixes, '.yml'); |
| 198 | 198 | |
| 199 | 199 | self::assertSame( |
| 200 | - __DIR__ . '/_match_ns/Bar/barEntity.yml', |
|
| 200 | + __DIR__.'/_match_ns/Bar/barEntity.yml', |
|
| 201 | 201 | $locator->findMappingFile("Foo\\Bar\\barEntity") |
| 202 | 202 | ); |
| 203 | 203 | } |
@@ -205,13 +205,13 @@ discard block |
||
| 205 | 205 | public function testFindMappingFileMostSpecificNamespaceFirst() : void |
| 206 | 206 | { |
| 207 | 207 | $prefixes = []; |
| 208 | - $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 209 | - $prefixes[__DIR__ . '/_match_ns'] = 'Foo'; |
|
| 208 | + $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 209 | + $prefixes[__DIR__.'/_match_ns'] = 'Foo'; |
|
| 210 | 210 | |
| 211 | 211 | $locator = new SymfonyFileLocator($prefixes, '.yml'); |
| 212 | 212 | |
| 213 | 213 | self::assertSame( |
| 214 | - __DIR__ . '/_match_ns/Bar/barEntity.yml', |
|
| 214 | + __DIR__.'/_match_ns/Bar/barEntity.yml', |
|
| 215 | 215 | $locator->findMappingFile("Foo\\Bar\\barEntity") |
| 216 | 216 | ); |
| 217 | 217 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function testGetParentClasses() : void |
| 35 | 35 | { |
| 36 | 36 | $classes = $this->reflectionService->getParentClasses(self::class); |
| 37 | - self::assertTrue(count($classes) === 0, 'The test class ' . self::class . ' should have no parents according to static reflection.'); |
|
| 37 | + self::assertTrue(count($classes) === 0, 'The test class '.self::class.' should have no parents according to static reflection.'); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function testGetReflectionClass() : void |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function testGetPaths() : void |
| 14 | 14 | { |
| 15 | - $path = __DIR__ . '/_files'; |
|
| 15 | + $path = __DIR__.'/_files'; |
|
| 16 | 16 | |
| 17 | 17 | $locator = new DefaultFileLocator([$path]); |
| 18 | 18 | self::assertSame([$path], $locator->getPaths()); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | public function testUniquePaths() : void |
| 33 | 33 | { |
| 34 | - $path = __DIR__ . '/_files'; |
|
| 34 | + $path = __DIR__.'/_files'; |
|
| 35 | 35 | |
| 36 | 36 | $locator = new DefaultFileLocator([$path, $path]); |
| 37 | 37 | self::assertSame([$path], $locator->getPaths()); |
@@ -39,16 +39,16 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function testFindMappingFile() : void |
| 41 | 41 | { |
| 42 | - $path = __DIR__ . '/_files'; |
|
| 42 | + $path = __DIR__.'/_files'; |
|
| 43 | 43 | |
| 44 | 44 | $locator = new DefaultFileLocator([$path], '.yml'); |
| 45 | 45 | |
| 46 | - self::assertSame(__DIR__ . '/_files' . DIRECTORY_SEPARATOR . 'stdClass.yml', $locator->findMappingFile('stdClass')); |
|
| 46 | + self::assertSame(__DIR__.'/_files'.DIRECTORY_SEPARATOR.'stdClass.yml', $locator->findMappingFile('stdClass')); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | public function testFindMappingFileNotFound() : void |
| 50 | 50 | { |
| 51 | - $path = __DIR__ . '/_files'; |
|
| 51 | + $path = __DIR__.'/_files'; |
|
| 52 | 52 | |
| 53 | 53 | $locator = new DefaultFileLocator([$path], '.yml'); |
| 54 | 54 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | public function testGetAllClassNames() : void |
| 61 | 61 | { |
| 62 | - $path = __DIR__ . '/_files'; |
|
| 62 | + $path = __DIR__.'/_files'; |
|
| 63 | 63 | |
| 64 | 64 | $locator = new DefaultFileLocator([$path], '.yml'); |
| 65 | 65 | $allClasses = $locator->getAllClassNames(null); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | public function testGetAllClassNamesNonMatchingFileExtension() : void |
| 81 | 81 | { |
| 82 | - $path = __DIR__ . '/_files'; |
|
| 82 | + $path = __DIR__.'/_files'; |
|
| 83 | 83 | |
| 84 | 84 | $locator = new DefaultFileLocator([$path], '.xml'); |
| 85 | 85 | self::assertSame([], $locator->getAllClassNames('global')); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | public function testFileExists() : void |
| 89 | 89 | { |
| 90 | - $path = __DIR__ . '/_files'; |
|
| 90 | + $path = __DIR__.'/_files'; |
|
| 91 | 91 | |
| 92 | 92 | $locator = new DefaultFileLocator([$path], '.yml'); |
| 93 | 93 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | public function testGetMetadataForAbsentClass() : void |
| 52 | 52 | { |
| 53 | 53 | $this->expectException(MappingException::class); |
| 54 | - $this->cmf->getMetadataFor(__NAMESPACE__ . '\AbsentClass'); |
|
| 54 | + $this->cmf->getMetadataFor(__NAMESPACE__.'\AbsentClass'); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | public function testGetParentMetadata() : void |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $metadata = $this->createMock(ClassMetadata::class); |
| 69 | 69 | $cache = new ArrayCache(); |
| 70 | - $cache->save(ChildEntity::class . '$CLASSMETADATA', $metadata); |
|
| 70 | + $cache->save(ChildEntity::class.'$CLASSMETADATA', $metadata); |
|
| 71 | 71 | |
| 72 | 72 | $this->cmf->setCacheDriver($cache); |
| 73 | 73 | |
@@ -81,14 +81,14 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $loadedMetadata = $this->cmf->getMetadataFor(ChildEntity::class); |
| 83 | 83 | |
| 84 | - self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class . '$CLASSMETADATA')); |
|
| 84 | + self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class.'$CLASSMETADATA')); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | public function testGetAliasedMetadata() : void |
| 88 | 88 | { |
| 89 | 89 | $this->cmf->getMetadataFor('prefix:ChildEntity'); |
| 90 | 90 | |
| 91 | - self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__ . '\ChildEntity')); |
|
| 91 | + self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__.'\ChildEntity')); |
|
| 92 | 92 | self::assertTrue($this->cmf->hasMetadataFor('prefix:ChildEntity')); |
| 93 | 93 | } |
| 94 | 94 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | { |
| 118 | 118 | $classMetadata = $this->createMock(ClassMetadata::class); |
| 119 | 119 | |
| 120 | - $this->cmf->fallbackCallback = static function () use ($classMetadata) { |
|
| 120 | + $this->cmf->fallbackCallback = static function() use ($classMetadata) { |
|
| 121 | 121 | return $classMetadata; |
| 122 | 122 | }; |
| 123 | 123 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | public function testWillFailOnFallbackFailureWithNotLoadedMetadata() : void |
| 131 | 131 | { |
| 132 | - $this->cmf->fallbackCallback = static function () { |
|
| 132 | + $this->cmf->fallbackCallback = static function() { |
|
| 133 | 133 | return null; |
| 134 | 134 | }; |
| 135 | 135 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $locator->expects($this->once()) |
| 39 | 39 | ->method('findMappingFile') |
| 40 | 40 | ->with($this->equalTo('stdClass')) |
| 41 | - ->will($this->returnValue(__DIR__ . '/_files/stdClass.yml')); |
|
| 41 | + ->will($this->returnValue(__DIR__.'/_files/stdClass.yml')); |
|
| 42 | 42 | |
| 43 | 43 | $driver = $this->createTestFileDriver($locator); |
| 44 | 44 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $locator->expects($this->once()) |
| 54 | 54 | ->method('findMappingFile') |
| 55 | 55 | ->with($this->equalTo('stdClass')) |
| 56 | - ->will($this->returnValue(__DIR__ . '/_files/stdClass.yml')); |
|
| 56 | + ->will($this->returnValue(__DIR__.'/_files/stdClass.yml')); |
|
| 57 | 57 | |
| 58 | 58 | $driver = $this->createTestFileDriver($locator); |
| 59 | 59 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | public function testNonLocatorFallback() : void |
| 138 | 138 | { |
| 139 | - $driver = $this->createTestFileDriver(__DIR__ . '/_files', '.yml'); |
|
| 139 | + $driver = $this->createTestFileDriver(__DIR__.'/_files', '.yml'); |
|
| 140 | 140 | self::assertTrue($driver->isTransient('stdClass2')); |
| 141 | 141 | self::assertFalse($driver->isTransient('stdClass')); |
| 142 | 142 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | { |
| 149 | 149 | $locator = $this->createMock(FileLocator::class); |
| 150 | 150 | $locator->expects($this->any())->method('getFileExtension')->will($this->returnValue('.yml')); |
| 151 | - $locator->expects($this->any())->method('getPaths')->will($this->returnValue([__DIR__ . '/_files'])); |
|
| 151 | + $locator->expects($this->any())->method('getPaths')->will($this->returnValue([__DIR__.'/_files'])); |
|
| 152 | 152 | |
| 153 | 153 | return $locator; |
| 154 | 154 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | public function testGetAllClassNames() : void |
| 17 | 17 | { |
| 18 | 18 | $reader = new AnnotationReader(); |
| 19 | - $driver = new SimpleAnnotationDriver($reader, [__DIR__ . '/_files/annotation']); |
|
| 19 | + $driver = new SimpleAnnotationDriver($reader, [__DIR__.'/_files/annotation']); |
|
| 20 | 20 | |
| 21 | 21 | $classes = $driver->getAllClassNames(); |
| 22 | 22 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | private function getManagerFactory() : callable |
| 168 | 168 | { |
| 169 | - return function (string $name) { |
|
| 169 | + return function(string $name) { |
|
| 170 | 170 | $mock = $this->createMock(ObjectManager::class); |
| 171 | 171 | |
| 172 | 172 | $driver = $this->createMock(MappingDriver::class); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | protected function getService(string $name) : object |
| 214 | 214 | { |
| 215 | - if (! isset($this->services[$name])) { |
|
| 215 | + if (!isset($this->services[$name])) { |
|
| 216 | 216 | $this->services[$name] = call_user_func($this->managerFactory, $name); |
| 217 | 217 | } |
| 218 | 218 | |