Passed
Pull Request — master (#26)
by Chad
01:48
created
src/Filter/Email.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Filter/Url.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Filter/Strings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
tests/Filter/StringsTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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' => '',
Please login to merge, or discard this patch.
src/Filter/PhoneFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
tests/Filter/XmlFilterTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Filter/UuidFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      * @var array
27 27
      * @internal
28 28
      */
29
-    const VALID_UUID_VERSIONS = [1,2,3,4,5,6,7];
29
+    const VALID_UUID_VERSIONS = [1, 2, 3, 4, 5, 6, 7];
30 30
 
31 31
 
32 32
     /**
Please login to merge, or discard this patch.
tests/Filter/UuidFilterTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,10 +99,10 @@
 block discarded – undo
99 99
             sprintf(
100 100
                 UuidFilter::FILTER_ERROR_FORMAT,
101 101
                 self::UUID_V4,
102
-                implode(', ', [1,7])
102
+                implode(', ', [1, 7])
103 103
             )
104 104
         );
105
-        UuidFilter::filter(self::UUID_V4, false, false, [1,7]);
105
+        UuidFilter::filter(self::UUID_V4, false, false, [1, 7]);
106 106
     }
107 107
 
108 108
     /**
Please login to merge, or discard this patch.