Passed
Push — main ( 636a72...76a137 )
by
unknown
07:30
created
tests/IndentationTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 
169 169
     private function loadFixture(string $filename): string
170 170
     {
171
-        $fixture = \file_get_contents(__DIR__ . '/fixtures/' . $filename);
171
+        $fixture = \file_get_contents(__DIR__.'/fixtures/'.$filename);
172 172
         if ($fixture === false) {
173 173
             $this->fail('Fixture file not found');
174 174
         }
Please login to merge, or discard this patch.
src/Indentation.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
                 continue;
112 112
             }
113 113
 
114
-            if (\preg_match('/^(?:' . \preg_quote($oldStyle->__toString(), '/') . ')+/', $line, $matches) !== 1) {
114
+            if (\preg_match('/^(?:'.\preg_quote($oldStyle->__toString(), '/').')+/', $line, $matches) !== 1) {
115 115
                 $newContent .= $line;
116 116
                 continue;
117 117
             }
118 118
 
119 119
             $indentLevel = (int) (\strlen($matches[0]) / $oldStyle->amount);
120
-            $newContent .= \str_repeat($newStyle->__toString(), $indentLevel) . \substr($line, $indentLevel * $oldStyle->amount);
120
+            $newContent .= \str_repeat($newStyle->__toString(), $indentLevel).\substr($line, $indentLevel * $oldStyle->amount);
121 121
         }
122 122
 
123 123
         return $newContent;
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 
170 170
         $leadingIndent = new Indentation($leadingIndent, $leadingIndentType);
171 171
 
172
-        $trimmed = \preg_replace('/^' . \preg_quote((string) $leadingIndent, '/') . '/m', '', $string);
173
-        if (! \is_string($trimmed)) {
172
+        $trimmed = \preg_replace('/^'.\preg_quote((string) $leadingIndent, '/').'/m', '', $string);
173
+        if (!\is_string($trimmed)) {
174 174
             return $string;
175 175
         }
176 176
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             }
225 225
 
226 226
             // Update the stats
227
-            if (! isset($indents[$key])) {
227
+            if (!isset($indents[$key])) {
228 228
                 $indents[$key] = [1, 0];
229 229
             } else {
230 230
                 $indents[$key][0]++;
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     {
275 275
         $typeCharacter = $indentType === self::TYPE_SPACE ? 's' : 't';
276 276
 
277
-        return $typeCharacter . $indentAmount;
277
+        return $typeCharacter.$indentAmount;
278 278
     }
279 279
 
280 280
     /**
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
      *
299 299
      * @param array<string, array{int, int}> $indents
300 300
      */
301
-    private static function getMostUsedKey(array $indents): string|null
301
+    private static function getMostUsedKey(array $indents): string | null
302 302
     {
303 303
         $result    = null;
304 304
         $maxUsed   = 0;
Please login to merge, or discard this patch.