Skip to content

Commit

Permalink
[Autocomplete] Update the setOptions method's signature
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Dec 20, 2023
1 parent f82b971 commit 74a9577
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __invoke(string $alias, Request $request): Response
}

$extraOptions = $this->getExtraOptions($request);
$autocompleter = $autocompleter->setOptions([
$autocompleter->setOptions([
'extra_options' => $extraOptions,
]);

Expand Down
2 changes: 1 addition & 1 deletion src/Autocomplete/src/EntityAutocompleterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function isGranted(Security $security): bool;
/**
* @param array<string, scalar> $options
*/
public function setOptions(array $options): self;
public function setOptions(array $options): void;

/*
* Return group_by option.
Expand Down
4 changes: 1 addition & 3 deletions src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,8 @@ private function getEntityMetadata(): EntityMetadata
return $this->entityMetadata;
}

public function setOptions(array $options): EntityAutocompleterInterface
public function setOptions(array $options): void
{
$this->options = $options;

return $this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,9 @@ public function getGroupBy(): mixed
{
return null;
}

public function setOptions(array $options): void
{
// left blank intentionally
}
}

0 comments on commit 74a9577

Please sign in to comment.