Passed
Pull Request — 2.6 (#7324)
by
unknown
07:57
created
tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 {
21 21
     protected function _loadDriver()
22 22
     {
23
-        return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml');
23
+        return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml');
24 24
     }
25 25
 
26 26
     public function testClassTableInheritanceDiscriminatorMap()
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 
177 177
             $this->assertCount(count($errorMessageFormats), $errors);
178 178
 
179
-            array_map(function (\LibXMLError $error, string $errorMessageFormat) : void {
180
-                $errorMessageRegex = '/^' . str_replace('%s', '.*', preg_quote($errorMessageFormat, '/')) . '$/';
179
+            array_map(function(\LibXMLError $error, string $errorMessageFormat) : void {
180
+                $errorMessageRegex = '/^'.str_replace('%s', '.*', preg_quote($errorMessageFormat, '/')).'$/';
181 181
 
182 182
                 $this->assertRegExp($errorMessageRegex, trim($error->message));
183 183
             }, $errors, $errorMessageFormats);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
     private function doValidateXmlSchema(string $xmlMappingFile) : bool
192 192
     {
193
-        $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd';
193
+        $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd';
194 194
         $dom           = new \DOMDocument('1.0', 'UTF-8');
195 195
 
196 196
         $dom->load($xmlMappingFile);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $list    = self::getAllXmlMappingPaths();
204 204
         $invalid = self::getInvalidXmlMappingMap();
205 205
 
206
-        $list = array_filter($list, function (string $item) use ($invalid) : bool {
206
+        $list = array_filter($list, function(string $item) use ($invalid) : bool {
207 207
             foreach (array_keys($invalid) as $filenamePattern) {
208 208
                 if (fnmatch($filenamePattern, pathinfo($item, PATHINFO_FILENAME))) {
209 209
                     return false;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             return true;
214 214
         });
215 215
 
216
-        return array_map(function (string $item) : array {
216
+        return array_map(function(string $item) : array {
217 217
             return [$item];
218 218
         }, $list);
219 219
     }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         $map = [];
227 227
         foreach ($invalid as $filenamePattern => $errorMessageFormats) {
228
-            $foundItems = array_filter($list, function (string $item) use ($filenamePattern) : bool {
228
+            $foundItems = array_filter($list, function(string $item) use ($filenamePattern) : bool {
229 229
                 return fnmatch($filenamePattern, pathinfo($item, PATHINFO_FILENAME));
230 230
             });
231 231
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
      */
247 247
     private static function getAllXmlMappingPaths() : array
248 248
     {
249
-        return glob(__DIR__ . '/xml/*.xml');
249
+        return glob(__DIR__.'/xml/*.xml');
250 250
     }
251 251
 
252 252
     /**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      */
255 255
     private static function getInvalidXmlMappingMap() : array
256 256
     {
257
-        $namespaced = function (string $name) : string {
257
+        $namespaced = function(string $name) : string {
258 258
             return sprintf('{%s}%s', 'http://doctrine-project.org/schemas/orm/doctrine-mapping', $name);
259 259
         };
260 260
 
@@ -271,8 +271,8 @@  discard block
 block discarded – undo
271 271
             $errorMessagePrefix = sprintf("Element '%s', attribute '%s': ", $namespaced($element), $attribute);
272 272
 
273 273
             $invalid[sprintf('pattern-%s-invalid-*', $type)] = [
274
-                $errorMessagePrefix . "[facet 'pattern'] The value '%s' is not accepted by the pattern '%s'.",
275
-                $errorMessagePrefix . sprintf("'%%s' is not a valid value of the atomic type '%s'.", $namespaced($type)),
274
+                $errorMessagePrefix."[facet 'pattern'] The value '%s' is not accepted by the pattern '%s'.",
275
+                $errorMessagePrefix.sprintf("'%%s' is not a valid value of the atomic type '%s'.", $namespaced($type)),
276 276
             ];
277 277
         }
278 278
 
Please login to merge, or discard this patch.