Completed
Pull Request — master (#26)
by
unknown
01:51
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   +17 added lines, -17 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
     /**
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             }
299 299
         }
300 300
 
301
-        return static::create($this->str . $suffixStr, $this->encoding);
301
+        return static::create($this->str.$suffixStr, $this->encoding);
302 302
     }
303 303
 
304 304
     /**
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
         }
1044 1044
 
1045 1045
         $strings = \array_map(
1046
-            function ($str) {
1046
+            function($str) {
1047 1047
                 return new static($str, $this->encoding);
1048 1048
             },
1049 1049
             $strings
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
                     $name = (string) $name;
1169 1169
 
1170 1170
                     if (\strpos($name, '%:') !== 0) {
1171
-                        $nameTmp = '%:' . $name;
1171
+                        $nameTmp = '%:'.$name;
1172 1172
                     } else {
1173 1173
                         $nameTmp = $name;
1174 1174
                     }
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
     {
1300 1300
         $string = \preg_replace_callback(
1301 1301
             '/\\\\x([0-9A-Fa-f]+)/',
1302
-            function (array $matched) {
1302
+            function(array $matched) {
1303 1303
                 return (string) $this->utf8::hex_to_chr($matched[1]);
1304 1304
             },
1305 1305
             $this->str
@@ -1322,8 +1322,8 @@  discard block
 block discarded – undo
1322 1322
     {
1323 1323
         $string = \array_reduce(
1324 1324
             $this->chars(),
1325
-            function (string $str, string $char) {
1326
-                return $str . $this->utf8::chr_to_hex($char);
1325
+            function(string $str, string $char) {
1326
+                return $str.$this->utf8::chr_to_hex($char);
1327 1327
             },
1328 1328
             ''
1329 1329
         );
@@ -1650,7 +1650,7 @@  discard block
 block discarded – undo
1650 1650
         $quotedPattern = \preg_quote($pattern, '/');
1651 1651
         $replaceWildCards = \str_replace('\*', '.*', $quotedPattern);
1652 1652
 
1653
-        return $this->matchesPattern('^' . $replaceWildCards . '\z');
1653
+        return $this->matchesPattern('^'.$replaceWildCards.'\z');
1654 1654
     }
1655 1655
 
1656 1656
     /**
@@ -1789,7 +1789,7 @@  discard block
 block discarded – undo
1789 1789
                     return false;
1790 1790
                 }
1791 1791
             } else {
1792
-                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']');
1792
+                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']');
1793 1793
             }
1794 1794
         }
1795 1795
 
@@ -1821,7 +1821,7 @@  discard block
 block discarded – undo
1821 1821
                     return false;
1822 1822
                 }
1823 1823
             } else {
1824
-                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']');
1824
+                throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']');
1825 1825
             }
1826 1826
         }
1827 1827
 
@@ -2020,7 +2020,7 @@  discard block
 block discarded – undo
2020 2020
     public function kebabCase(): self
2021 2021
     {
2022 2022
         $words = \array_map(
2023
-            static function (self $word) {
2023
+            static function(self $word) {
2024 2024
                 return $word->toLowerCase();
2025 2025
             },
2026 2026
             $this->words('', true)
@@ -2386,7 +2386,7 @@  discard block
 block discarded – undo
2386 2386
         }
2387 2387
 
2388 2388
         \preg_match_all(
2389
-            "/(?:^|(?:.|\p{L}|\w){" . $length . "})(.|\p{L}|\w)/u",
2389
+            "/(?:^|(?:.|\p{L}|\w){".$length."})(.|\p{L}|\w)/u",
2390 2390
             $substring,
2391 2391
             $matches
2392 2392
         );
@@ -2612,7 +2612,7 @@  discard block
 block discarded – undo
2612 2612
             $prefix = \implode('', $prefix);
2613 2613
         }
2614 2614
 
2615
-        return static::create($prefix . $this->str, $this->encoding);
2615
+        return static::create($prefix.$this->str, $this->encoding);
2616 2616
     }
2617 2617
 
2618 2618
     /**
@@ -2638,7 +2638,7 @@  discard block
 block discarded – undo
2638 2638
             }
2639 2639
         }
2640 2640
 
2641
-        return static::create($prefixStr . $this->str, $this->encoding);
2641
+        return static::create($prefixStr.$this->str, $this->encoding);
2642 2642
     }
2643 2643
 
2644 2644
     /**
@@ -3145,7 +3145,7 @@  discard block
 block discarded – undo
3145 3145
     public function snakeCase(): self
3146 3146
     {
3147 3147
         $words = \array_map(
3148
-            static function (self $word) {
3148
+            static function(self $word) {
3149 3149
                 return $word->toLowerCase();
3150 3150
             },
3151 3151
             $this->words('', true)
@@ -3371,7 +3371,7 @@  discard block
 block discarded – undo
3371 3371
     public function studlyCase(): self
3372 3372
     {
3373 3373
         $words = \array_map(
3374
-            static function (self $word) {
3374
+            static function(self $word) {
3375 3375
                 return $word->substr(0, 1)
3376 3376
                     ->toUpperCase()
3377 3377
                     ->appendStringy($word->substr(1));
@@ -3489,7 +3489,7 @@  discard block
 block discarded – undo
3489 3489
     public function surround(string $substring): self
3490 3490
     {
3491 3491
         return static::create(
3492
-            $substring . $this->str . $substring,
3492
+            $substring.$this->str.$substring,
3493 3493
             $this->encoding
3494 3494
         );
3495 3495
     }
Please login to merge, or discard this patch.
src/CollectionStringy.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @param string ...$string
62
+     * @param string string[]
63 63
      *
64 64
      * @return $this
65 65
      *
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     }
76 76
 
77 77
     /**
78
-     * @param Stringy ...$stringy
78
+     * @param Stringy Stringy[]
79 79
      *
80 80
      * @return $this
81 81
      */
Please login to merge, or discard this patch.