Passed
Push — types ( 30d5cd )
by Jonathan
04:47
created
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.
tests/Doctrine/Tests/Persistence/PersistentObjectTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $this->objectManager = $this->createMock(ObjectManager::class);
38 38
 
39 39
         $this->objectManager->expects($this->any())->method('getClassMetadata')
40
-                 ->will($this->returnValue($this->cm));
40
+                    ->will($this->returnValue($this->cm));
41 41
 
42 42
         $this->object = new TestObject();
43 43
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
     public function getAssociationTargetClass(string $assocName) : string
199 199
     {
200
-        return __NAMESPACE__ . '\TestObject';
200
+        return __NAMESPACE__.'\TestObject';
201 201
     }
202 202
 
203 203
     /**
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
     public function getName() : string
220 220
     {
221
-        return __NAMESPACE__ . '\TestObject';
221
+        return __NAMESPACE__.'\TestObject';
222 222
     }
223 223
 
224 224
     public function getReflectionClass() : ReflectionClass
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
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     private function getManagerFactory()
82 82
     {
83
-        return function () {
83
+        return function() {
84 84
             $mock = $this->createMock(ObjectManager::class);
85 85
 
86 86
             $driver   = $this->createMock(MappingDriver::class);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     protected function getService(string $name) : object
122 122
     {
123
-        if (! isset($this->services[$name])) {
123
+        if (!isset($this->services[$name])) {
124 124
             $this->services[$name] = call_user_func($this->managerFactory);
125 125
         }
126 126
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/ObjectManagerDecoratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     {
76 76
         $this->markTestSkipped('This test needs to be rewritten');
77 77
 
78
-        $returnedValue = $isVoidMethod ? null : 'INNER VALUE FROM ' . $method;
78
+        $returnedValue = $isVoidMethod ? null : 'INNER VALUE FROM '.$method;
79 79
         $stub          = $this->wrapped
80 80
             ->expects($this->once())
81 81
             ->method($method)
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/RuntimeReflectionService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function fileExists(string $className) : bool
123 123
     {
124
-        $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension;
124
+        $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension;
125 125
         foreach ($this->paths as $path) {
126
-            if (! isset($this->prefixes[$path])) {
126
+            if (!isset($this->prefixes[$path])) {
127 127
                 // global namespace class
128
-                if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) {
128
+                if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
129 129
                     return true;
130 130
                 }
131 131
 
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
 
135 135
             $prefix = $this->prefixes[$path];
136 136
 
137
-            if (strpos($className, $prefix . '\\') !== 0) {
137
+            if (strpos($className, $prefix.'\\') !== 0) {
138 138
                 continue;
139 139
             }
140 140
 
141
-            $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension;
141
+            $filename = $path.'/'.strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator).$this->fileExtension;
142 142
             if (is_file($filename)) {
143 143
                 return true;
144 144
             }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
         if ($this->paths) {
158 158
             foreach ((array) $this->paths as $path) {
159
-                if (! is_dir($path)) {
159
+                if (!is_dir($path)) {
160 160
                     throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
161 161
                 }
162 162
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                             '\\'
182 182
                         );
183 183
 
184
-                        $classes[] = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' . str_replace($this->nsSeparator, '\\', $fileName);
184
+                        $classes[] = $this->prefixes[$path].str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix).'\\'.str_replace($this->nsSeparator, '\\', $fileName);
185 185
                     } else {
186 186
                         $classes[] = str_replace($this->nsSeparator, '\\', $fileName);
187 187
                     }
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public function findMappingFile(string $className) : string
199 199
     {
200
-        $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension;
200
+        $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension;
201 201
         foreach ($this->paths as $path) {
202
-            if (! isset($this->prefixes[$path])) {
203
-                if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) {
204
-                    return $path . DIRECTORY_SEPARATOR . $defaultFileName;
202
+            if (!isset($this->prefixes[$path])) {
203
+                if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
204
+                    return $path.DIRECTORY_SEPARATOR.$defaultFileName;
205 205
                 }
206 206
 
207 207
                 continue;
@@ -209,16 +209,16 @@  discard block
 block discarded – undo
209 209
 
210 210
             $prefix = $this->prefixes[$path];
211 211
 
212
-            if (strpos($className, $prefix . '\\') !== 0) {
212
+            if (strpos($className, $prefix.'\\') !== 0) {
213 213
                 continue;
214 214
             }
215 215
 
216
-            $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension;
216
+            $filename = $path.'/'.strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator).$this->fileExtension;
217 217
             if (is_file($filename)) {
218 218
                 return $filename;
219 219
             }
220 220
         }
221 221
 
222
-        throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1) . $this->fileExtension);
222
+        throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->fileExtension);
223 223
     }
224 224
 }
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             return $this->classNames;
73 73
         }
74 74
 
75
-        if (! $this->paths) {
75
+        if (!$this->paths) {
76 76
             throw MappingException::pathRequired();
77 77
         }
78 78
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $includedFiles = [];
81 81
 
82 82
         foreach ($this->paths as $path) {
83
-            if (! is_dir($path)) {
83
+            if (!is_dir($path)) {
84 84
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
85 85
             }
86 86
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         foreach ($declared as $className) {
106 106
             $rc         = new ReflectionClass($className);
107 107
             $sourceFile = $rc->getFileName();
108
-            if (! in_array($sourceFile, $includedFiles) || $this->isTransient($className)) {
108
+            if (!in_array($sourceFile, $includedFiles) || $this->isTransient($className)) {
109 109
                 continue;
110 110
             }
111 111
 
@@ -122,6 +122,6 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function isTransient(string $className) : bool
124 124
     {
125
-        return ! method_exists($className, 'loadMetadata');
125
+        return !method_exists($className, 'loadMetadata');
126 126
     }
127 127
 }
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function findMappingFile(string $className) : string
92 92
     {
93
-        $fileName = str_replace('\\', '.', $className) . $this->fileExtension;
93
+        $fileName = str_replace('\\', '.', $className).$this->fileExtension;
94 94
 
95 95
         // Check whether file exists
96 96
         foreach ($this->paths as $path) {
97
-            if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
98
-                return $path . DIRECTORY_SEPARATOR . $fileName;
97
+            if (is_file($path.DIRECTORY_SEPARATOR.$fileName)) {
98
+                return $path.DIRECTORY_SEPARATOR.$fileName;
99 99
             }
100 100
         }
101 101
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         if ($this->paths) {
113 113
             foreach ($this->paths as $path) {
114
-                if (! is_dir($path)) {
114
+                if (!is_dir($path)) {
115 115
                     throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
116 116
                 }
117 117
 
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
      */
142 142
     public function fileExists(string $className) : bool
143 143
     {
144
-        $fileName = str_replace('\\', '.', $className) . $this->fileExtension;
144
+        $fileName = str_replace('\\', '.', $className).$this->fileExtension;
145 145
 
146 146
         // Check whether file exists
147 147
         foreach ((array) $this->paths as $path) {
148
-            if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
148
+            if (is_file($path.DIRECTORY_SEPARATOR.$fileName)) {
149 149
                 return true;
150 150
             }
151 151
         }
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/AnnotationDriver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $this->reader = $reader;
82 82
 
83
-        if (! $paths) {
83
+        if (!$paths) {
84 84
             return;
85 85
         }
86 86
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             return $this->classNames;
185 185
         }
186 186
 
187
-        if (! $this->paths) {
187
+        if (!$this->paths) {
188 188
             throw MappingException::pathRequired();
189 189
         }
190 190
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $includedFiles = [];
193 193
 
194 194
         foreach ($this->paths as $path) {
195
-            if (! is_dir($path)) {
195
+            if (!is_dir($path)) {
196 196
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
197 197
             }
198 198
 
@@ -201,14 +201,14 @@  discard block
 block discarded – undo
201 201
                     new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
202 202
                     RecursiveIteratorIterator::LEAVES_ONLY
203 203
                 ),
204
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
204
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
205 205
                 RecursiveRegexIterator::GET_MATCH
206 206
             );
207 207
 
208 208
             foreach ($iterator as $file) {
209 209
                 $sourceFile = $file[0];
210 210
 
211
-                if (! preg_match('(^phar:)i', $sourceFile)) {
211
+                if (!preg_match('(^phar:)i', $sourceFile)) {
212 212
                     $sourceFile = realpath($sourceFile);
213 213
                 }
214 214
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         foreach ($declared as $className) {
236 236
             $rc         = new ReflectionClass($className);
237 237
             $sourceFile = $rc->getFileName();
238
-            if (! in_array($sourceFile, $includedFiles) || $this->isTransient($className)) {
238
+            if (!in_array($sourceFile, $includedFiles) || $this->isTransient($className)) {
239 239
                 continue;
240 240
             }
241 241
 
Please login to merge, or discard this patch.