Completed
Push — master ( b8b2ac...a3a7e1 )
by Lars
01:10
created
src/StaticStringy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
         }
146 146
 
147 147
         if (!isset(static::$methodArgs[$name])) {
148
-            throw new \BadMethodCallException($name . ' is not a valid method');
148
+            throw new \BadMethodCallException($name.' is not a valid method');
149 149
         }
150 150
 
151 151
         $numArgs = \count($arguments);
Please login to merge, or discard this patch.
src/Stringy.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             $suffix = \implode('', $suffix);
239 239
         }
240 240
 
241
-        return static::create($this->str . $suffix, $this->encoding);
241
+        return static::create($this->str.$suffix, $this->encoding);
242 242
     }
243 243
 
244 244
     /**
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             }
297 297
         }
298 298
 
299
-        return static::create($this->str . $suffixStr, $this->encoding);
299
+        return static::create($this->str.$suffixStr, $this->encoding);
300 300
     }
301 301
 
302 302
     /**
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
         }
1069 1069
 
1070 1070
         return \array_map(
1071
-            function ($str) {
1071
+            function($str) {
1072 1072
                 return new static($str, $this->encoding);
1073 1073
             },
1074 1074
             $strings
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
                     $name = (string) $name;
1193 1193
 
1194 1194
                     if (\strpos($name, '%:') !== 0) {
1195
-                        $nameTmp = '%:' . $name;
1195
+                        $nameTmp = '%:'.$name;
1196 1196
                     } else {
1197 1197
                         $nameTmp = $name;
1198 1198
                     }
@@ -1323,7 +1323,7 @@  discard block
 block discarded – undo
1323 1323
     {
1324 1324
         $string = \preg_replace_callback(
1325 1325
             '/\\\\x([0-9A-Fa-f]+)/',
1326
-            function (array $matched) {
1326
+            function(array $matched) {
1327 1327
                 return (string) $this->utf8::hex_to_chr($matched[1]);
1328 1328
             },
1329 1329
             $this->str
@@ -1346,8 +1346,8 @@  discard block
 block discarded – undo
1346 1346
     {
1347 1347
         $string = \array_reduce(
1348 1348
             $this->chars(),
1349
-            function (string $str, string $char) {
1350
-                return $str . $this->utf8::chr_to_hex($char);
1349
+            function(string $str, string $char) {
1350
+                return $str.$this->utf8::chr_to_hex($char);
1351 1351
             },
1352 1352
             ''
1353 1353
         );
@@ -1674,7 +1674,7 @@  discard block
 block discarded – undo
1674 1674
         $quotedPattern = \preg_quote($pattern, '/');
1675 1675
         $replaceWildCards = \str_replace('\*', '.*', $quotedPattern);
1676 1676
 
1677
-        return $this->matchesPattern('^' . $replaceWildCards . '\z');
1677
+        return $this->matchesPattern('^'.$replaceWildCards.'\z');
1678 1678
     }
1679 1679
 
1680 1680
     /**
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
                     return false;
1814 1814
                 }
1815 1815
             } else {
1816
-                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']');
1816
+                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']');
1817 1817
             }
1818 1818
         }
1819 1819
 
@@ -1845,7 +1845,7 @@  discard block
 block discarded – undo
1845 1845
                     return false;
1846 1846
                 }
1847 1847
             } else {
1848
-                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']');
1848
+                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']');
1849 1849
             }
1850 1850
         }
1851 1851
 
@@ -2044,7 +2044,7 @@  discard block
 block discarded – undo
2044 2044
     public function kebabCase(): self
2045 2045
     {
2046 2046
         $words = \array_map(
2047
-            static function (self $word) {
2047
+            static function(self $word) {
2048 2048
                 return $word->toLowerCase();
2049 2049
             },
2050 2050
             $this->words('', true)
@@ -2420,7 +2420,7 @@  discard block
 block discarded – undo
2420 2420
         }
2421 2421
 
2422 2422
         \preg_match_all(
2423
-            "/(?:^|(?:.|\p{L}|\w){" . $length . "})(.|\p{L}|\w)/u",
2423
+            "/(?:^|(?:.|\p{L}|\w){".$length."})(.|\p{L}|\w)/u",
2424 2424
             $substring,
2425 2425
             $matches
2426 2426
         );
@@ -2644,7 +2644,7 @@  discard block
 block discarded – undo
2644 2644
             $prefix = \implode('', $prefix);
2645 2645
         }
2646 2646
 
2647
-        return static::create($prefix . $this->str, $this->encoding);
2647
+        return static::create($prefix.$this->str, $this->encoding);
2648 2648
     }
2649 2649
 
2650 2650
     /**
@@ -2670,7 +2670,7 @@  discard block
 block discarded – undo
2670 2670
             }
2671 2671
         }
2672 2672
 
2673
-        return static::create($prefixStr . $this->str, $this->encoding);
2673
+        return static::create($prefixStr.$this->str, $this->encoding);
2674 2674
     }
2675 2675
 
2676 2676
     /**
@@ -3175,7 +3175,7 @@  discard block
 block discarded – undo
3175 3175
     public function snakeCase(): self
3176 3176
     {
3177 3177
         $words = \array_map(
3178
-            static function (self $word) {
3178
+            static function(self $word) {
3179 3179
                 return $word->toLowerCase();
3180 3180
             },
3181 3181
             $this->words('', true)
@@ -3401,7 +3401,7 @@  discard block
 block discarded – undo
3401 3401
     public function studlyCase(): self
3402 3402
     {
3403 3403
         $words = \array_map(
3404
-            static function (self $word) {
3404
+            static function(self $word) {
3405 3405
                 return $word->substr(0, 1)
3406 3406
                     ->toUpperCase()
3407 3407
                     ->appendStringy($word->substr(1));
@@ -3519,7 +3519,7 @@  discard block
 block discarded – undo
3519 3519
     public function surround(string $substring): self
3520 3520
     {
3521 3521
         return static::create(
3522
-            $substring . $this->str . $substring,
3522
+            $substring.$this->str.$substring,
3523 3523
             $this->encoding
3524 3524
         );
3525 3525
     }
Please login to merge, or discard this patch.
build/generate_docs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__ . '/../vendor/autoload.php';
4
-require __DIR__ . '/vendor/autoload.php';
3
+require __DIR__.'/../vendor/autoload.php';
4
+require __DIR__.'/vendor/autoload.php';
5 5
 
6 6
 $readmeText = (new \voku\PhpReadmeHelper\GenerateApi())->generate(
7
-    __DIR__ . '/../src/Stringy.php',
8
-    __DIR__ . '/docs/base.md'
7
+    __DIR__.'/../src/Stringy.php',
8
+    __DIR__.'/docs/base.md'
9 9
 );
10 10
 
11
-file_put_contents(__DIR__ . '/../README.md', $readmeText);
11
+file_put_contents(__DIR__.'/../README.md', $readmeText);
Please login to merge, or discard this patch.