Skip to content

Commit 3e13fc6

Browse files
committed
[Autocomplete] Update the setOptions method's signature
1 parent f82b971 commit 3e13fc6

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/Autocomplete/src/EntityAutocompleterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function isGranted(Security $security): bool;
5252
/**
5353
* @param array<string, scalar> $options
5454
*/
55-
public function setOptions(array $options): self;
55+
public function setOptions(array $options): void;
5656

5757
/*
5858
* Return group_by option.

src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,8 @@ private function getEntityMetadata(): EntityMetadata
170170
return $this->entityMetadata;
171171
}
172172

173-
public function setOptions(array $options): EntityAutocompleterInterface
173+
public function setOptions(array $options): void
174174
{
175175
$this->options = $options;
176-
177-
return $this;
178176
}
179177
}

src/Autocomplete/tests/Fixtures/Autocompleter/CustomProductAutocompleter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,9 @@ public function getGroupBy(): mixed
6363
{
6464
return null;
6565
}
66+
67+
public function setOptions(array $options): void
68+
{
69+
// left blank intentionally
70+
}
6671
}

0 commit comments

Comments
 (0)