Completed
Pull Request — master (#50)
by Jonathan
04:44 queued 02:30
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(static function ($class) {
19
+spl_autoload_register(static 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.
lib/Doctrine/Persistence/Mapping/Driver/MappingDriverChain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
         foreach ($this->drivers as $namespace => $driver) {
94 94
             $oid = spl_object_hash($driver);
95 95
 
96
-            if (! isset($driverClasses[$oid])) {
96
+            if (!isset($driverClasses[$oid])) {
97 97
                 $driverClasses[$oid] = $driver->getAllClassNames();
98 98
             }
99 99
 
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         $result = $this->loadMappingFile($this->locator->findMappingFile($className));
93
-        if (! isset($result[$className])) {
94
-            throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension());
93
+        if (!isset($result[$className])) {
94
+            throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className).$this->locator->getFileExtension());
95 95
         }
96 96
 
97 97
         $this->classCache[$className] = $result[$className];
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             return false;
113 113
         }
114 114
 
115
-        return ! $this->locator->fileExists($className);
115
+        return !$this->locator->fileExists($className);
116 116
     }
117 117
 
118 118
     /**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             $this->initialize();
125 125
         }
126 126
 
127
-        if (! $this->classCache) {
127
+        if (!$this->classCache) {
128 128
             return (array) $this->locator->getAllClassNames($this->globalBasename);
129 129
         }
130 130
 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         }
164 164
 
165 165
         foreach ($this->locator->getPaths() as $path) {
166
-            $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension();
167
-            if (! is_file($file)) {
166
+            $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension();
167
+            if (!is_file($file)) {
168 168
                 continue;
169 169
             }
170 170
 
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()
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()
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()
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()
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()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/PHPDriverTest.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
         $metadata = $this->createMock(ClassMetadata::class);
17 17
         $metadata->expects($this->once())->method('getFieldNames');
18 18
 
19
-        $driver = new PHPDriver([__DIR__ . '/_files']);
19
+        $driver = new PHPDriver([__DIR__.'/_files']);
20 20
         $driver->loadMetadataForClass('TestEntity', $metadata);
21 21
     }
22 22
 }
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()
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/Persistence/Mapping/AnnotationDriverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     public function testGetAllClassNames()
14 14
     {
15 15
         $reader = new AnnotationReader();
16
-        $driver = new SimpleAnnotationDriver($reader, [__DIR__ . '/_files/annotation']);
16
+        $driver = new SimpleAnnotationDriver($reader, [__DIR__.'/_files/annotation']);
17 17
 
18 18
         $classes = $driver->getAllClassNames();
19 19
 
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
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $locator->expects($this->once())
38 38
                 ->method('findMappingFile')
39 39
                 ->with($this->equalTo('stdClass'))
40
-                ->will($this->returnValue(__DIR__ . '/_files/stdClass.yml'));
40
+                ->will($this->returnValue(__DIR__.'/_files/stdClass.yml'));
41 41
 
42 42
         $driver = $this->createTestFileDriver($locator);
43 43
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $locator->expects($this->once())
53 53
             ->method('findMappingFile')
54 54
             ->with($this->equalTo('stdClass'))
55
-            ->will($this->returnValue(__DIR__ . '/_files/stdClass.yml'));
55
+            ->will($this->returnValue(__DIR__.'/_files/stdClass.yml'));
56 56
 
57 57
         $driver = $this->createTestFileDriver($locator);
58 58
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
     public function testNonLocatorFallback()
137 137
     {
138
-        $driver = $this->createTestFileDriver(__DIR__ . '/_files', '.yml');
138
+        $driver = $this->createTestFileDriver(__DIR__.'/_files', '.yml');
139 139
         self::assertTrue($driver->isTransient('stdClass2'));
140 140
         self::assertFalse($driver->isTransient('stdClass'));
141 141
     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     {
145 145
         $locator = $this->createMock(FileLocator::class);
146 146
         $locator->expects($this->any())->method('getFileExtension')->will($this->returnValue('.yml'));
147
-        $locator->expects($this->any())->method('getPaths')->will($this->returnValue([__DIR__ . '/_files']));
147
+        $locator->expects($this->any())->method('getPaths')->will($this->returnValue([__DIR__.'/_files']));
148 148
 
149 149
         return $locator;
150 150
     }
Please login to merge, or discard this patch.