@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | $this->styles = $this->getStyles(); |
| 33 | 33 | |
| 34 | 34 | $this->message = $this->refineStr($message, $prefix, $suffix); |
| 35 | - $strLen = strlen($this->message . static::PADDING_STR) + 2; |
|
| 36 | - $this->resetStr = Strings::ESC . "[{$strLen}D"; |
|
| 35 | + $strLen = strlen($this->message.static::PADDING_STR) + 2; |
|
| 36 | + $this->resetStr = Strings::ESC."[{$strLen}D"; |
|
| 37 | 37 | $this->style = $this->getStyle(); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | protected function refineStr(string $str, string $prefix, string $suffix): string |
| 78 | 78 | { |
| 79 | - return $prefix . $str . $suffix; |
|
| 79 | + return $prefix.$str.$suffix; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -86,40 +86,40 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | if (null === $this->styles) { |
| 88 | 88 | return |
| 89 | - function (): string { |
|
| 90 | - return static::PADDING_STR . $this->spinnerSymbols->value(); |
|
| 89 | + function(): string { |
|
| 90 | + return static::PADDING_STR.$this->spinnerSymbols->value(); |
|
| 91 | 91 | }; |
| 92 | 92 | } |
| 93 | 93 | return |
| 94 | - function (): string { |
|
| 94 | + function(): string { |
|
| 95 | 95 | return |
| 96 | - static::PADDING_STR . |
|
| 97 | - Strings::ESC . |
|
| 98 | - "[{$this->styles->value()}m{$this->spinnerSymbols->value()}" . |
|
| 99 | - Strings::ESC . '[0m'; |
|
| 96 | + static::PADDING_STR. |
|
| 97 | + Strings::ESC. |
|
| 98 | + "[{$this->styles->value()}m{$this->spinnerSymbols->value()}". |
|
| 99 | + Strings::ESC.'[0m'; |
|
| 100 | 100 | }; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** {@inheritDoc} */ |
| 104 | 104 | public function begin(): string |
| 105 | 105 | { |
| 106 | - return $this->work() . $this->resetStr; |
|
| 106 | + return $this->work().$this->resetStr; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | protected function work(): string |
| 110 | 110 | { |
| 111 | - return ($this->style)() . $this->message; |
|
| 111 | + return ($this->style)().$this->message; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** {@inheritDoc} */ |
| 115 | 115 | public function spin(): string |
| 116 | 116 | { |
| 117 | - return $this->work() . $this->resetStr; |
|
| 117 | + return $this->work().$this->resetStr; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** {@inheritDoc} */ |
| 121 | 121 | public function end(): string |
| 122 | 122 | { |
| 123 | - return $this->resetStr . Strings::ESC . '[K'; |
|
| 123 | + return $this->resetStr.Strings::ESC.'[K'; |
|
| 124 | 124 | } |
| 125 | 125 | } |