mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 16:55:38 +08:00
Allow setting suffix for licence name
This commit is contained in:
committed by
Jerry Ma
parent
33798ff108
commit
c0830a9e1f
@@ -90,8 +90,8 @@ class LicenseDumper
|
||||
$licenses = [$licenses];
|
||||
}
|
||||
|
||||
foreach ($licenses as $license) {
|
||||
yield match ($license['type']) {
|
||||
foreach ($licenses as $index => $license) {
|
||||
yield ($license['suffix'] ?? $index) => match ($license['type']) {
|
||||
'text' => $license['text'],
|
||||
'file' => $this->loadSourceFile($source_name, $license['path'], Config::getSource($source_name)['path'] ?? null),
|
||||
default => throw new RuntimeException('source [' . $source_name . '] license type is not allowed'),
|
||||
|
||||
Reference in New Issue
Block a user