Skip to content

Commit 9df123d

Browse files
authored
Merge pull request #3 from SebLevDev/SebLevDev-patch-1
Update AutocompleteService.php
2 parents b0e4ad1 + e8de9f4 commit 9df123d

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

Service/AutocompleteService.php

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,17 @@
1111

1212
class AutocompleteService
1313
{
14-
/**
15-
* @var FormFactoryInterface
16-
*/
17-
private $formFactory;
18-
19-
/**
20-
* @var ManagerRegistry
21-
*/
22-
private $doctrine;
23-
24-
/**
25-
* @param FormFactoryInterface $formFactory
26-
* @param ManagerRegistry $doctrine
27-
*/
14+
private FormFactoryInterface $formFactory;
15+
16+
private ManagerRegistry $doctrine;
17+
2818
public function __construct(FormFactoryInterface $formFactory, ManagerRegistry $doctrine)
2919
{
3020
$this->formFactory = $formFactory;
3121
$this->doctrine = $doctrine;
3222
}
3323

34-
/**
35-
* @param Request $request
36-
* @param string|FormTypeInterface $type
37-
*
38-
* @return array
39-
*/
40-
public function getAutocompleteResults(Request $request, $type)
24+
public function getAutocompleteResults(Request $request, string|FormTypeInterface $type): array
4125
{
4226
$form = $this->formFactory->create($type);
4327
$fieldOptions = $form->get($request->get('field_name'))->getConfig()->getOptions();

0 commit comments

Comments
 (0)