mirror of
https://github.com/pelican-dev/panel.git
synced 2025-07-12 04:21:07 +02:00
Nullable eggFeatures in FeatureService
(#1485)
This commit is contained in:
parent
9655700cde
commit
21ac75efae
@ -21,10 +21,10 @@ class FeatureService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $features
|
||||
* @param ?string[] $features
|
||||
* @return FeatureSchemaInterface[]
|
||||
*/
|
||||
public function getActiveSchemas(array $features): array
|
||||
public function getActiveSchemas(?array $features = []): array
|
||||
{
|
||||
return collect($this->schemas)->only($features)->all();
|
||||
}
|
||||
@ -39,10 +39,10 @@ class FeatureService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $features
|
||||
* @param ?string[] $features
|
||||
* @return array<string, array<string>>
|
||||
*/
|
||||
public function getMappings(array $features): array
|
||||
public function getMappings(?array $features = []): array
|
||||
{
|
||||
return collect($this->getActiveSchemas($features))
|
||||
->mapWithKeys(fn (FeatureSchemaInterface $schema) => [
|
||||
|
Loading…
x
Reference in New Issue
Block a user