@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function getParentClasses(string $class) : array |
| 24 | 24 | { |
| 25 | - if (! class_exists($class)) { |
|
| 25 | + if (!class_exists($class)) { |
|
| 26 | 26 | throw MappingException::nonExistingClass($class); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | */ |
| 90 | 90 | private function assertValidField(string $field) : void |
| 91 | 91 | { |
| 92 | - if (! isset($this->entityChangeSet[$field])) { |
|
| 92 | + if (!isset($this->entityChangeSet[$field])) { |
|
| 93 | 93 | throw new InvalidArgumentException(sprintf( |
| 94 | 94 | 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', |
| 95 | 95 | $field, |
@@ -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 |
@@ -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 | |
@@ -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 | |
@@ -16,12 +16,12 @@ |
||
| 16 | 16 | error_reporting(E_ALL | E_STRICT); |
| 17 | 17 | |
| 18 | 18 | // register silently failing autoloader |
| 19 | -spl_autoload_register(static function ($class) : bool { |
|
| 19 | +spl_autoload_register(static function($class) : bool { |
|
| 20 | 20 | if (strpos($class, 'Doctrine\Tests\\') !== 0) { |
| 21 | 21 | return false; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - $path = __DIR__ . '/../../' . strtr($class, '\\', '/') . '.php'; |
|
| 24 | + $path = __DIR__.'/../../'.strtr($class, '\\', '/').'.php'; |
|
| 25 | 25 | if (is_file($path) && is_readable($path)) { |
| 26 | 26 | require_once $path; |
| 27 | 27 | |