@@ -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 | /** |
@@ -1016,7 +1016,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |