@@ -20,7 +20,7 @@ discard block |
||
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() |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | private function doValidateXmlSchema(string $xmlMappingFile) : bool |
190 | 190 | { |
191 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
191 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
192 | 192 | $dom = new \DOMDocument('1.0', 'UTF-8'); |
193 | 193 | |
194 | 194 | $dom->load($xmlMappingFile); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $list = self::getAllXmlMappingPaths(); |
202 | 202 | $invalid = self::getInvalidXmlMappingMap(); |
203 | 203 | |
204 | - $list = array_filter($list, function (string $filename) use ($invalid) : bool { |
|
204 | + $list = array_filter($list, function(string $filename) use ($invalid) : bool { |
|
205 | 205 | $matchesInvalid = false; |
206 | 206 | foreach ($invalid as $filenamePattern => $unused) { |
207 | 207 | if (fnmatch($filenamePattern, $filename)) { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | return ! $matchesInvalid; |
214 | 214 | }, ARRAY_FILTER_USE_KEY); |
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 |
||
225 | 225 | |
226 | 226 | $map = []; |
227 | 227 | foreach ($invalid as $filenamePattern => $errorMessageRegexes) { |
228 | - $foundItems = array_filter($list, function (string $filename) use ($filenamePattern) : bool { |
|
228 | + $foundItems = array_filter($list, function(string $filename) use ($filenamePattern) : bool { |
|
229 | 229 | return fnmatch($filenamePattern, $filename); |
230 | 230 | }, ARRAY_FILTER_USE_KEY); |
231 | 231 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | private static function getAllXmlMappingPaths() : array |
248 | 248 | { |
249 | 249 | $list = []; |
250 | - foreach (glob(__DIR__ . '/xml/*.xml') as $path) { |
|
250 | + foreach (glob(__DIR__.'/xml/*.xml') as $path) { |
|
251 | 251 | $list[pathinfo($path, PATHINFO_FILENAME)] = $path; |
252 | 252 | } |
253 | 253 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | private static function getInvalidXmlMappingMap() : array |
261 | 261 | { |
262 | - $namespaced = function (string $name) : string { |
|
262 | + $namespaced = function(string $name) : string { |
|
263 | 263 | return sprintf('{%s}%s', 'http://doctrine-project.org/schemas/orm/doctrine-mapping', $name); |
264 | 264 | }; |
265 | 265 | |
@@ -276,18 +276,18 @@ discard block |
||
276 | 276 | $errorMessagePrefix = sprintf("Element '%s', attribute '%s': ", $namespaced($element), $attribute); |
277 | 277 | |
278 | 278 | $invalid[sprintf('pattern-%s-invalid-*', $type)] = [ |
279 | - $errorMessagePrefix . "[facet 'pattern'] The value '%s' is not accepted by the pattern '%s'.", |
|
280 | - $errorMessagePrefix . sprintf("'%%s' is not a valid value of the atomic type '%s'.", $namespaced($type)), |
|
279 | + $errorMessagePrefix."[facet 'pattern'] The value '%s' is not accepted by the pattern '%s'.", |
|
280 | + $errorMessagePrefix.sprintf("'%%s' is not a valid value of the atomic type '%s'.", $namespaced($type)), |
|
281 | 281 | ]; |
282 | 282 | } |
283 | 283 | |
284 | 284 | // Convert basic sprintf-style formats to PCRE patterns |
285 | - return array_map(function (array $errorMessageFormats) : array { |
|
286 | - return array_map(function (string $errorMessageFormat) : string { |
|
287 | - return '/^' . strtr(preg_quote($errorMessageFormat, '/'), [ |
|
285 | + return array_map(function(array $errorMessageFormats) : array { |
|
286 | + return array_map(function(string $errorMessageFormat) : string { |
|
287 | + return '/^'.strtr(preg_quote($errorMessageFormat, '/'), [ |
|
288 | 288 | '%%' => '%', |
289 | 289 | '%s' => '.*', |
290 | - ]) . '$/s'; |
|
290 | + ]).'$/s'; |
|
291 | 291 | }, $errorMessageFormats); |
292 | 292 | }, $invalid); |
293 | 293 | } |