@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | public function testGetPaths() |
| 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() |
| 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() |
| 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() |
| 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() |
| 79 | 79 | { |
| 80 | - $path = __DIR__ . '/_files'; |
|
| 80 | + $path = __DIR__.'/_files'; |
|
| 81 | 81 | $prefix = 'Foo'; |
| 82 | 82 | |
| 83 | 83 | $this->expectException(InvalidArgumentException::class); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function testGetClassNamesWithCustomNsSeparator($separator, $dir) |
| 106 | 106 | { |
| 107 | - $path = __DIR__ . $dir; |
|
| 107 | + $path = __DIR__.$dir; |
|
| 108 | 108 | $prefix = 'Foo'; |
| 109 | 109 | |
| 110 | 110 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml', $separator); |
@@ -149,29 +149,29 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function testFindMappingFileWithCustomNsSeparator($separator, $dir, $files) |
| 151 | 151 | { |
| 152 | - $path = __DIR__ . $dir; |
|
| 152 | + $path = __DIR__.$dir; |
|
| 153 | 153 | $prefix = 'Foo'; |
| 154 | 154 | |
| 155 | 155 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml', $separator); |
| 156 | 156 | |
| 157 | 157 | foreach ($files as $filePath => $className) { |
| 158 | - self::assertSame(realpath($path . '/' . $filePath), realpath($locator->findMappingFile($className))); |
|
| 158 | + self::assertSame(realpath($path.'/'.$filePath), realpath($locator->findMappingFile($className))); |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | public function testFindMappingFile() |
| 163 | 163 | { |
| 164 | - $path = __DIR__ . '/_files'; |
|
| 164 | + $path = __DIR__.'/_files'; |
|
| 165 | 165 | $prefix = 'Foo'; |
| 166 | 166 | |
| 167 | 167 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml'); |
| 168 | 168 | |
| 169 | - self::assertSame(__DIR__ . '/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass')); |
|
| 169 | + self::assertSame(__DIR__.'/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass')); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | public function testFindMappingFileNotFound() |
| 173 | 173 | { |
| 174 | - $path = __DIR__ . '/_files'; |
|
| 174 | + $path = __DIR__.'/_files'; |
|
| 175 | 175 | $prefix = 'Foo'; |
| 176 | 176 | |
| 177 | 177 | $locator = new SymfonyFileLocator([$path => $prefix], '.yml'); |
@@ -185,13 +185,13 @@ discard block |
||
| 185 | 185 | { |
| 186 | 186 | // Low -> High |
| 187 | 187 | $prefixes = []; |
| 188 | - $prefixes[__DIR__ . '/_match_ns'] = 'Foo'; |
|
| 189 | - $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 188 | + $prefixes[__DIR__.'/_match_ns'] = 'Foo'; |
|
| 189 | + $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 190 | 190 | |
| 191 | 191 | $locator = new SymfonyFileLocator($prefixes, '.yml'); |
| 192 | 192 | |
| 193 | 193 | self::assertSame( |
| 194 | - __DIR__ . '/_match_ns/Bar/barEntity.yml', |
|
| 194 | + __DIR__.'/_match_ns/Bar/barEntity.yml', |
|
| 195 | 195 | $locator->findMappingFile("Foo\\Bar\\barEntity") |
| 196 | 196 | ); |
| 197 | 197 | } |
@@ -199,13 +199,13 @@ discard block |
||
| 199 | 199 | public function testFindMappingFileMostSpecificNamespaceFirst() |
| 200 | 200 | { |
| 201 | 201 | $prefixes = []; |
| 202 | - $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 203 | - $prefixes[__DIR__ . '/_match_ns'] = 'Foo'; |
|
| 202 | + $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar'; |
|
| 203 | + $prefixes[__DIR__.'/_match_ns'] = 'Foo'; |
|
| 204 | 204 | |
| 205 | 205 | $locator = new SymfonyFileLocator($prefixes, '.yml'); |
| 206 | 206 | |
| 207 | 207 | self::assertSame( |
| 208 | - __DIR__ . '/_match_ns/Bar/barEntity.yml', |
|
| 208 | + __DIR__.'/_match_ns/Bar/barEntity.yml', |
|
| 209 | 209 | $locator->findMappingFile("Foo\\Bar\\barEntity") |
| 210 | 210 | ); |
| 211 | 211 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | protected function getFqcnFromAlias(string $namespaceAlias, string $simpleClassName) : string |
| 37 | 37 | { |
| 38 | - return __NAMESPACE__ . '\\' . $simpleClassName; |
|
| 38 | + return __NAMESPACE__.'\\'.$simpleClassName; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | protected function initialize() : void |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | protected function onNotFoundMetadata($className) |
| 69 | 69 | { |
| 70 | - if (! $this->fallbackCallback) { |
|
| 70 | + if (!$this->fallbackCallback) { |
|
| 71 | 71 | return null; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | private function getManagerFactory() |
| 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 | |