Passed
Push — master ( 9e6266...33fd51 )
by Jonathan
33s
created
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(function ($class) {
19
+spl_autoload_register(function($class) {
20 20
     if (strpos($class, 'Doctrine\Tests\\') !== 0) {
21 21
         return;
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.
tests/Doctrine/Tests/Common/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()
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()
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()
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()
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()
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()
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()
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/Common/Persistence/Mapping/SymfonyFileLocatorTest.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 {
14 14
     public function testGetPaths()
15 15
     {
16
-        $path   = __DIR__ . '/_files';
16
+        $path   = __DIR__.'/_files';
17 17
         $prefix = 'Foo';
18 18
 
19 19
         $locator = new SymfonyFileLocator([$path => $prefix]);
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function testGetPrefixes()
27 27
     {
28
-        $path   = __DIR__ . '/_files';
28
+        $path   = __DIR__.'/_files';
29 29
         $prefix = 'Foo';
30 30
 
31 31
         $locator = new SymfonyFileLocator([$path => $prefix]);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function testFileExists()
44 44
     {
45
-        $path   = __DIR__ . '/_files';
45
+        $path   = __DIR__.'/_files';
46 46
         $prefix = 'Foo';
47 47
 
48 48
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml');
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function testGetAllClassNames()
57 57
     {
58
-        $path   = __DIR__ . '/_files';
58
+        $path   = __DIR__.'/_files';
59 59
         $prefix = 'Foo';
60 60
 
61 61
         $locator       = new SymfonyFileLocator([$path => $prefix], '.yml');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function testInvalidCustomNamespaceSeparator()
82 82
     {
83
-        $path   = __DIR__ . '/_files';
83
+        $path   = __DIR__.'/_files';
84 84
         $prefix = 'Foo';
85 85
 
86 86
         new SymfonyFileLocator([$path => $prefix], '.yml', null);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
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);
@@ -147,30 +147,30 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function testFindMappingFileWithCustomNsSeparator($separator, $dir, $files)
149 149
     {
150
-        $path   = __DIR__ . $dir;
150
+        $path   = __DIR__.$dir;
151 151
         $prefix = 'Foo';
152 152
 
153 153
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml', $separator);
154 154
 
155 155
         foreach ($files as $filePath => $className) {
156
-            self::assertSame(realpath($path . '/' . $filePath), realpath($locator->findMappingFile($className)));
156
+            self::assertSame(realpath($path.'/'.$filePath), realpath($locator->findMappingFile($className)));
157 157
         }
158 158
     }
159 159
 
160 160
 
161 161
     public function testFindMappingFile()
162 162
     {
163
-        $path   = __DIR__ . '/_files';
163
+        $path   = __DIR__.'/_files';
164 164
         $prefix = 'Foo';
165 165
 
166 166
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml');
167 167
 
168
-        self::assertSame(__DIR__ . '/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass'));
168
+        self::assertSame(__DIR__.'/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass'));
169 169
     }
170 170
 
171 171
     public function testFindMappingFileNotFound()
172 172
     {
173
-        $path   = __DIR__ . '/_files';
173
+        $path   = __DIR__.'/_files';
174 174
         $prefix = 'Foo';
175 175
 
176 176
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml');
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
     {
185 185
         // Low -> High
186 186
         $prefixes                             = [];
187
-        $prefixes[__DIR__ . '/_match_ns']     = 'Foo';
188
-        $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar';
187
+        $prefixes[__DIR__.'/_match_ns']     = 'Foo';
188
+        $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar';
189 189
 
190 190
         $locator = new SymfonyFileLocator($prefixes, '.yml');
191 191
 
192 192
         self::assertSame(
193
-            __DIR__ . '/_match_ns/Bar/barEntity.yml',
193
+            __DIR__.'/_match_ns/Bar/barEntity.yml',
194 194
             $locator->findMappingFile("Foo\\Bar\\barEntity")
195 195
         );
196 196
     }
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
     public function testFindMappingFileMostSpecificNamespaceFirst()
199 199
     {
200 200
         $prefixes                             = [];
201
-        $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar';
202
-        $prefixes[__DIR__ . '/_match_ns']     = 'Foo';
201
+        $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar';
202
+        $prefixes[__DIR__.'/_match_ns']     = 'Foo';
203 203
 
204 204
         $locator = new SymfonyFileLocator($prefixes, '.yml');
205 205
 
206 206
         self::assertSame(
207
-            __DIR__ . '/_match_ns/Bar/barEntity.yml',
207
+            __DIR__.'/_match_ns/Bar/barEntity.yml',
208 208
             $locator->findMappingFile("Foo\\Bar\\barEntity")
209 209
         );
210 210
     }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                             null
188 188
                         );
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         } catch (MappingException $loadingException) {
195 195
             $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName);
196 196
 
197
-            if (! $fallbackMetadataResponse) {
197
+            if (!$fallbackMetadataResponse) {
198 198
                 throw $loadingException;
199 199
             }
200 200
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      */
276 276
     protected function loadMetadata($name)
277 277
     {
278
-        if (! $this->initialized) {
278
+        if (!$this->initialized) {
279 279
             $this->initialize();
280 280
         }
281 281
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.