@@ -39,7 +39,7 @@ |
||
| 39 | 39 | private static function validateString($value) |
| 40 | 40 | { |
| 41 | 41 | if (!is_string($value)) { |
| 42 | - throw new FilterException("Value '" . var_export($value, true) . "' is not a string"); |
|
| 42 | + throw new FilterException("Value '".var_export($value, true)."' is not a string"); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | private static function validateString($value) |
| 40 | 40 | { |
| 41 | 41 | if (!is_string($value)) { |
| 42 | - throw new FilterException("Value '" . var_export($value, true) . "' is not a string"); |
|
| 42 | + throw new FilterException("Value '".var_export($value, true)."' is not a string"); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | if (empty($delimiter)) { |
| 66 | 66 | throw new \InvalidArgumentException( |
| 67 | - "Delimiter '" . var_export($delimiter, true) . "' is not a non-empty string" |
|
| 67 | + "Delimiter '".var_export($delimiter, true)."' is not a non-empty string" |
|
| 68 | 68 | ); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | private static function validateIfObjectIsAString($value) |
| 190 | 190 | { |
| 191 | 191 | if (!is_string($value)) { |
| 192 | - throw new FilterException("Value '" . var_export($value, true) . "' is not a string"); |
|
| 192 | + throw new FilterException("Value '".var_export($value, true)."' is not a string"); |
|
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | { |
| 198 | 198 | try { |
| 199 | 199 | $value = ( |
| 200 | - function (string $str) : string { |
|
| 200 | + function(string $str) : string { |
|
| 201 | 201 | return $str; |
| 202 | 202 | } |
| 203 | 203 | )($value); |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $replacement = mb_substr($replacement, 0, 1); |
| 240 | 240 | |
| 241 | 241 | return array_map( |
| 242 | - function ($word) use ($replacement) { |
|
| 242 | + function($word) use ($replacement) { |
|
| 243 | 243 | if ($replacement === '') { |
| 244 | 244 | return ''; |
| 245 | 245 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | public function __construct() |
| 171 | 171 | { |
| 172 | - $this->data = [1,2,3,4,5]; |
|
| 172 | + $this->data = [1, 2, 3, 4, 5]; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | public function __toString() |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | public function concatObjectValue() |
| 374 | 374 | { |
| 375 | 375 | $this->assertSame( |
| 376 | - 'prefix' . __FILE__ . 'suffix', |
|
| 376 | + 'prefix'.__FILE__.'suffix', |
|
| 377 | 377 | Strings::concat(new \SplFileInfo(__FILE__), 'prefix', 'suffix') |
| 378 | 378 | ); |
| 379 | 379 | } |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | ], |
| 490 | 490 | 'closure provides words' => [ |
| 491 | 491 | 'value' => 'doe a deer, a female deer', |
| 492 | - 'words' => function () { |
|
| 492 | + 'words' => function() { |
|
| 493 | 493 | return ['doe', 'deer']; |
| 494 | 494 | }, |
| 495 | 495 | 'replacement' => '-', |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | 'words' => [], |
| 529 | 529 | 'replacement' => '', |
| 530 | 530 | 'exception' => FilterException::class, |
| 531 | - 'message' => "Value '" . var_export(['bad', 'input'], true) . "' is not a string", |
|
| 531 | + 'message' => "Value '".var_export(['bad', 'input'], true)."' is not a string", |
|
| 532 | 532 | ], |
| 533 | 533 | 'invalid words argument' => [ |
| 534 | 534 | 'value' => 'some string', |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | ], |
| 540 | 540 | 'invalid return from callable words argument' => [ |
| 541 | 541 | 'value' => 'some string', |
| 542 | - 'words' => function () { |
|
| 542 | + 'words' => function() { |
|
| 543 | 543 | return 'this is also not valid'; |
| 544 | 544 | }, |
| 545 | 545 | 'replacement' => '', |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | private static function getValueAsString($value) : string |
| 149 | 149 | { |
| 150 | 150 | if (is_scalar($value)) { |
| 151 | - return (string)$value; |
|
| 151 | + return (string) $value; |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | $message = sprintf(self::ERROR_INVALID_PHONE_NUMBER, var_export($value, true)); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | public function validate() |
| 104 | 104 | { |
| 105 | 105 | $xml = self::FULL_XML; |
| 106 | - $xsdFile = __DIR__ . '/_files/books.xsd'; |
|
| 106 | + $xsdFile = __DIR__.'/_files/books.xsd'; |
|
| 107 | 107 | $validatedXml = XmlFilter::validate($xml, $xsdFile); |
| 108 | 108 | $this->assertSame($xml, $validatedXml); |
| 109 | 109 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | $this->expectException(FilterException::class); |
| 131 | 131 | $this->expectExceptionMessage("Element 'book': The attribute 'id' is required but missing"); |
| 132 | - $xsdFile = __DIR__ . '/_files/books.xsd'; |
|
| 132 | + $xsdFile = __DIR__.'/_files/books.xsd'; |
|
| 133 | 133 | XmlFilter::validate($xmlMissingId, $xsdFile); |
| 134 | 134 | } |
| 135 | 135 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $emptyXml = ''; |
| 143 | 143 | $this->expectException(FilterException::class); |
| 144 | 144 | $this->expectExceptionMessage('String could not be parsed as XML'); |
| 145 | - $xsdFile = __DIR__ . '/_files/books.xsd'; |
|
| 145 | + $xsdFile = __DIR__.'/_files/books.xsd'; |
|
| 146 | 146 | XmlFilter::validate($emptyXml, $xsdFile); |
| 147 | 147 | } |
| 148 | 148 | |