@@ -240,7 +240,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |