mirror of
https://github.com/pelican-dev/panel.git
synced 2025-07-12 08:41:08 +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[]
|
* @return FeatureSchemaInterface[]
|
||||||
*/
|
*/
|
||||||
public function getActiveSchemas(array $features): array
|
public function getActiveSchemas(?array $features = []): array
|
||||||
{
|
{
|
||||||
return collect($this->schemas)->only($features)->all();
|
return collect($this->schemas)->only($features)->all();
|
||||||
}
|
}
|
||||||
@ -39,10 +39,10 @@ class FeatureService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $features
|
* @param ?string[] $features
|
||||||
* @return array<string, array<string>>
|
* @return array<string, array<string>>
|
||||||
*/
|
*/
|
||||||
public function getMappings(array $features): array
|
public function getMappings(?array $features = []): array
|
||||||
{
|
{
|
||||||
return collect($this->getActiveSchemas($features))
|
return collect($this->getActiveSchemas($features))
|
||||||
->mapWithKeys(fn (FeatureSchemaInterface $schema) => [
|
->mapWithKeys(fn (FeatureSchemaInterface $schema) => [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user