@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | private static function integerToCn(array $integers): string |
70 | 70 | { |
71 | 71 | $len = count($integers) - 1; |
72 | - return collect($integers)->filter(function ($int, $index) use ($len) { |
|
72 | + return collect($integers)->filter(function($int, $index) use ($len) { |
|
73 | 73 | return $int > 0 || $index == $len || self::UNIT[$index]; |
74 | - })->map(function ($int, $index) use ($len) { |
|
74 | + })->map(function($int, $index) use ($len) { |
|
75 | 75 | $index = $len - $index; |
76 | 76 | return ($int > 0 || $len == 0 ? self::DIGITAL[$int] : '') . (Arr::exists(self::UNIT, $index) |
77 | 77 | ? Arr::get(self::UNIT, $index) : Arr::get(self::UNIT, $index % 4)); |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | */ |
88 | 88 | private static function decimalToCn(array $decimals, ?string $default = null): ?string |
89 | 89 | { |
90 | - $result = collect($decimals)->filter(function ($int) { |
|
90 | + $result = collect($decimals)->filter(function($int) { |
|
91 | 91 | return $int > 0; |
92 | - })->map(function ($int, $index) { |
|
92 | + })->map(function($int, $index) { |
|
93 | 93 | return self::DIGITAL[$int] . self::UNIT[-1 - $index]; |
94 | 94 | })->implode(''); |
95 | 95 | return empty($result) ? $default : $result; |