32 lines
686 B
PHP
32 lines
686 B
PHP
<?php
|
|
|
|
namespace App\Utilities;
|
|
|
|
final class FinanceLedgerAccountType
|
|
{
|
|
public const DEFAULT_OPTIONS = [
|
|
'个人卡',
|
|
'公户',
|
|
'支付宝',
|
|
'网商银行',
|
|
];
|
|
|
|
public static function options(array ...$groups): array
|
|
{
|
|
$types = self::DEFAULT_OPTIONS;
|
|
foreach ($groups as $group) {
|
|
foreach ($group as $type) {
|
|
$type = trim((string) $type);
|
|
if ($type !== '') {
|
|
$types[] = $type;
|
|
}
|
|
}
|
|
}
|
|
|
|
$types = array_values(array_unique($types));
|
|
sort($types, SORT_NATURAL | SORT_FLAG_CASE);
|
|
|
|
return $types;
|
|
}
|
|
}
|