Skip to content

Commit

Permalink
fix: invalid usage of "getOption()" default argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreyu committed Feb 19, 2024
1 parent 3f1eb1c commit 42e0df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Exporter/Form/Type/ExportDataType.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
->add('filename', TextType::class)
->add('exporter', ChoiceType::class, [
'choices' => array_flip(array_map(
fn (ExporterInterface $exporter) => $exporter->getConfig()->getOption('label', $exporter->getName()),
fn (ExporterInterface $exporter) => $exporter->getConfig()->getOption('label') ?? $exporter->getName(),
$options['exporters'],
)),
])
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getFormOptions(): array

public function getQueryPath(): string
{
return $this->config->getOption('query_path', $this->getName());
return $this->config->getOption('query_path') ?? $this->getName();
}

public function handle(ProxyQueryInterface $query, FilterData $data): void
Expand Down

0 comments on commit 42e0df1

Please sign in to comment.