Completed
Pull Request — master (#50)
by Jonathan
04:00 queued 01:58
created
lib/Doctrine/Persistence/AbstractManagerRegistry.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/RuntimeReflectionServiceTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/StaticReflectionServiceTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/DefaultFileLocatorTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/ClassMetadataFactoryTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/FileDriverTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/AnnotationDriverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/ManagerRegistryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/TestInit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.