@@ -145,7 +145,7 @@ |
||
| 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); |
@@ -197,6 +197,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $suffix = \implode('', $suffix); |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | - return static::create($this->str . $suffix, $this->encoding); |
|
| 218 | + return static::create($this->str.$suffix, $this->encoding); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | } |
| 824 | 824 | |
| 825 | 825 | $data = \array_map( |
| 826 | - function ($str) { |
|
| 826 | + function($str) { |
|
| 827 | 827 | return new static($str, $this->encoding); |
| 828 | 828 | }, |
| 829 | 829 | $data |
@@ -921,7 +921,7 @@ discard block |
||
| 921 | 921 | $name = (string) $name; |
| 922 | 922 | |
| 923 | 923 | if (\strpos($name, '%:') !== 0) { |
| 924 | - $nameTmp = '%:' . $name; |
|
| 924 | + $nameTmp = '%:'.$name; |
|
| 925 | 925 | } else { |
| 926 | 926 | $nameTmp = $name; |
| 927 | 927 | } |
@@ -1052,7 +1052,7 @@ discard block |
||
| 1052 | 1052 | { |
| 1053 | 1053 | $string = \preg_replace_callback( |
| 1054 | 1054 | '/\\\\x([0-9A-Fa-f]+)/', |
| 1055 | - function (array $matched) { |
|
| 1055 | + function(array $matched) { |
|
| 1056 | 1056 | return (string) $this->utf8::hex_to_chr($matched[1]); |
| 1057 | 1057 | }, |
| 1058 | 1058 | $this->str |
@@ -1075,8 +1075,8 @@ discard block |
||
| 1075 | 1075 | { |
| 1076 | 1076 | $string = \array_reduce( |
| 1077 | 1077 | $this->chars(), |
| 1078 | - function (string $str, string $char) { |
|
| 1079 | - return $str . $this->utf8::chr_to_hex($char); |
|
| 1078 | + function(string $str, string $char) { |
|
| 1079 | + return $str.$this->utf8::chr_to_hex($char); |
|
| 1080 | 1080 | }, |
| 1081 | 1081 | '' |
| 1082 | 1082 | ); |
@@ -1403,7 +1403,7 @@ discard block |
||
| 1403 | 1403 | $quotedPattern = \preg_quote($pattern, '/'); |
| 1404 | 1404 | $replaceWildCards = \str_replace('\*', '.*', $quotedPattern); |
| 1405 | 1405 | |
| 1406 | - return $this->matchesPattern('^' . $replaceWildCards . '\z'); |
|
| 1406 | + return $this->matchesPattern('^'.$replaceWildCards.'\z'); |
|
| 1407 | 1407 | } |
| 1408 | 1408 | |
| 1409 | 1409 | /** |
@@ -1542,7 +1542,7 @@ discard block |
||
| 1542 | 1542 | return false; |
| 1543 | 1543 | } |
| 1544 | 1544 | } else { |
| 1545 | - throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1545 | + throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']'); |
|
| 1546 | 1546 | } |
| 1547 | 1547 | } |
| 1548 | 1548 | |
@@ -1574,7 +1574,7 @@ discard block |
||
| 1574 | 1574 | return false; |
| 1575 | 1575 | } |
| 1576 | 1576 | } else { |
| 1577 | - throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1577 | + throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: '.\print_r($strTmp, true).' ['.\gettype($strTmp).']'); |
|
| 1578 | 1578 | } |
| 1579 | 1579 | } |
| 1580 | 1580 | |
@@ -2057,7 +2057,7 @@ discard block |
||
| 2057 | 2057 | } |
| 2058 | 2058 | |
| 2059 | 2059 | \preg_match_all( |
| 2060 | - "/(?:^|(?:.|\p{L}|\w){" . $length . "})(.|\p{L}|\w)/u", |
|
| 2060 | + "/(?:^|(?:.|\p{L}|\w){".$length."})(.|\p{L}|\w)/u", |
|
| 2061 | 2061 | $substring, |
| 2062 | 2062 | $matches |
| 2063 | 2063 | ); |
@@ -2270,7 +2270,7 @@ discard block |
||
| 2270 | 2270 | $prefix = \implode('', $prefix); |
| 2271 | 2271 | } |
| 2272 | 2272 | |
| 2273 | - return static::create($prefix . $this->str, $this->encoding); |
|
| 2273 | + return static::create($prefix.$this->str, $this->encoding); |
|
| 2274 | 2274 | } |
| 2275 | 2275 | |
| 2276 | 2276 | /** |
@@ -3019,7 +3019,7 @@ discard block |
||
| 3019 | 3019 | public function surround(string $substring): self |
| 3020 | 3020 | { |
| 3021 | 3021 | return static::create( |
| 3022 | - $substring . $this->str . $substring, |
|
| 3022 | + $substring.$this->str.$substring, |
|
| 3023 | 3023 | $this->encoding |
| 3024 | 3024 | ); |
| 3025 | 3025 | } |