Completed
Push — master ( 3790e4...3c9715 )
by Lars
14:22
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 2 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,6 +197,7 @@  discard block
 block discarded – undo
197 197
      * Returns a new string with $suffix appended.
198 198
      *
199 199
      * @param string ...$suffix <p>The string to append.</p>
200
+     * @param string[] $suffix
200 201
      *
201 202
      * @psalm-mutation-free
202 203
      *
@@ -2252,6 +2253,7 @@  discard block
 block discarded – undo
2252 2253
      * Returns a new string starting with $prefix.
2253 2254
      *
2254 2255
      * @param string ...$prefix <p>The string to append.</p>
2256
+     * @param string[] $prefix
2255 2257
      *
2256 2258
      * @psalm-mutation-free
2257 2259
      *
@@ -2457,7 +2459,7 @@  discard block
 block discarded – undo
2457 2459
      * Replaces all occurrences of $search in $str by $replacement.
2458 2460
      *
2459 2461
      * @param string[]        $search        <p>The elements to search for.</p>
2460
-     * @param string|string[] $replacement   <p>The string to replace with.</p>
2462
+     * @param string $replacement   <p>The string to replace with.</p>
2461 2463
      * @param bool            $caseSensitive [optional] <p>Whether or not to enforce case-sensitivity. Default: true</p>
2462 2464
      *
2463 2465
      * @psalm-mutation-free
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             $suffix = \implode('', $suffix);
241 241
         }
242 242
 
243
-        return static::create($this->str . $suffix, $this->encoding);
243
+        return static::create($this->str.$suffix, $this->encoding);
244 244
     }
245 245
 
246 246
     /**
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
         }
1017 1017
 
1018 1018
         $data = \array_map(
1019
-            function ($str) {
1019
+            function($str) {
1020 1020
                 return new static($str, $this->encoding);
1021 1021
             },
1022 1022
             $data
@@ -1118,7 +1118,7 @@  discard block
 block discarded – undo
1118 1118
                     $name = (string) $name;
1119 1119
 
1120 1120
                     if (\strpos($name, '%:') !== 0) {
1121
-                        $nameTmp = '%:' . $name;
1121
+                        $nameTmp = '%:'.$name;
1122 1122
                     } else {
1123 1123
                         $nameTmp = $name;
1124 1124
                     }
@@ -1249,7 +1249,7 @@  discard block
 block discarded – undo
1249 1249
     {
1250 1250
         $string = \preg_replace_callback(
1251 1251
             '/\\\\x([0-9A-Fa-f]+)/',
1252
-            function (array $matched) {
1252
+            function(array $matched) {
1253 1253
                 return (string) $this->utf8::hex_to_chr($matched[1]);
1254 1254
             },
1255 1255
             $this->str
@@ -1272,8 +1272,8 @@  discard block
 block discarded – undo
1272 1272
     {
1273 1273
         $string = \array_reduce(
1274 1274
             $this->chars(),
1275
-            function (string $str, string $char) {
1276
-                return $str . $this->utf8::chr_to_hex($char);
1275
+            function(string $str, string $char) {
1276
+                return $str.$this->utf8::chr_to_hex($char);
1277 1277
             },
1278 1278
             ''
1279 1279
         );
@@ -1600,7 +1600,7 @@  discard block
 block discarded – undo
1600 1600
         $quotedPattern = \preg_quote($pattern, '/');
1601 1601
         $replaceWildCards = \str_replace('\*', '.*', $quotedPattern);
1602 1602
 
1603
-        return $this->matchesPattern('^' . $replaceWildCards . '\z');
1603
+        return $this->matchesPattern('^'.$replaceWildCards.'\z');
1604 1604
     }
1605 1605
 
1606 1606
     /**
@@ -1739,7 +1739,7 @@  discard block
 block discarded – undo
1739 1739
                     return false;
1740 1740
                 }
1741 1741
             } else {
1742
-                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']');
1742
+                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']');
1743 1743
             }
1744 1744
         }
1745 1745
 
@@ -1771,7 +1771,7 @@  discard block
 block discarded – undo
1771 1771
                     return false;
1772 1772
                 }
1773 1773
             } else {
1774
-                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']');
1774
+                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']');
1775 1775
             }
1776 1776
         }
1777 1777
 
@@ -1970,7 +1970,7 @@  discard block
 block discarded – undo
1970 1970
     public function kebabCase(): self
1971 1971
     {
1972 1972
         $words = \array_map(
1973
-            function ($word) {
1973
+            function($word) {
1974 1974
                 return $this->utf8::strtolower($word, $this->encoding);
1975 1975
             },
1976 1976
             $this->words('', true)
@@ -2331,7 +2331,7 @@  discard block
 block discarded – undo
2331 2331
         }
2332 2332
 
2333 2333
         \preg_match_all(
2334
-            "/(?:^|(?:.|\p{L}|\w){" . $length . "})(.|\p{L}|\w)/u",
2334
+            "/(?:^|(?:.|\p{L}|\w){".$length."})(.|\p{L}|\w)/u",
2335 2335
             $substring,
2336 2336
             $matches
2337 2337
         );
@@ -2557,7 +2557,7 @@  discard block
 block discarded – undo
2557 2557
             $prefix = \implode('', $prefix);
2558 2558
         }
2559 2559
 
2560
-        return static::create($prefix . $this->str, $this->encoding);
2560
+        return static::create($prefix.$this->str, $this->encoding);
2561 2561
     }
2562 2562
 
2563 2563
     /**
@@ -3064,7 +3064,7 @@  discard block
 block discarded – undo
3064 3064
     public function snakeCase(): self
3065 3065
     {
3066 3066
         $words = \array_map(
3067
-            function ($word) {
3067
+            function($word) {
3068 3068
                 return $this->utf8::strtolower($word, $this->encoding);
3069 3069
             },
3070 3070
             $this->words('', true)
@@ -3282,11 +3282,11 @@  discard block
 block discarded – undo
3282 3282
     public function studlyCase(): self
3283 3283
     {
3284 3284
         $words = \array_map(
3285
-            function (self $word) {
3285
+            function(self $word) {
3286 3286
                 return $this->utf8::strtoupper(
3287 3287
                     $this->utf8::substr($word->toString(), 0, 1, $this->encoding),
3288 3288
                     $this->encoding
3289
-                ) . $this->utf8::substr($word->toString(), 1, null, $this->encoding);
3289
+                ).$this->utf8::substr($word->toString(), 1, null, $this->encoding);
3290 3290
             },
3291 3291
             $this->words('', true)
3292 3292
         );
@@ -3381,7 +3381,7 @@  discard block
 block discarded – undo
3381 3381
     public function surround(string $substring): self
3382 3382
     {
3383 3383
         return static::create(
3384
-            $substring . $this->str . $substring,
3384
+            $substring.$this->str.$substring,
3385 3385
             $this->encoding
3386 3386
         );
3387 3387
     }
Please login to merge, or discard this patch.