Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bigboss86 committed Dec 14, 2021
1 parent 6bbecb0 commit 5f2cb8a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/Controller/Action/CitySearchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public function __construct(

public function __invoke(Request $request): Response
{
$addresses = $this->getAddresses($request->get('city', ''));
/** @var string $query */
$query = $request->query->get('city', '');

$addresses = $this->getAddresses($query);
$view = View::create($addresses);

$this->viewHandler->setExclusionStrategyGroups(['Autocomplete']);
Expand Down
5 changes: 4 additions & 1 deletion src/Controller/Action/PostcodeSearchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public function __construct(

public function __invoke(Request $request): Response
{
$addresses = $this->getAddresses($request->get('postcode', ''));
/** @var string $query */
$query = $request->query->get('postcode', '');

$addresses = $this->getAddresses($query);
$view = View::create($addresses);

$this->viewHandler->setExclusionStrategyGroups(['Autocomplete']);
Expand Down
5 changes: 4 additions & 1 deletion src/Controller/Action/ProductSearchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public function __invoke(Request $request): Response
{
$locale = $this->localeContext->getLocaleCode();

$products = $this->getProducts($request->get('name', ''), $locale);
/** @var string $query */
$query = $request->query->get('name', '');

$products = $this->getProducts($query, $locale);
$view = View::create($products);

$this->viewHandler->setExclusionStrategyGroups(['Autocomplete']);
Expand Down
5 changes: 4 additions & 1 deletion src/Controller/Action/ProvinceSearchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public function __construct(

public function __invoke(Request $request): Response
{
$addresses = $this->getAddresses($request->get('province', ''));
/** @var string $query */
$query = $request->query->get('province', '');

$addresses = $this->getAddresses($query);
$view = View::create($addresses);

$this->viewHandler->setExclusionStrategyGroups(['Autocomplete']);
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ReportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function exportAction(Request $request): Response

$filename = $this->slugify($report->getName());

$format = $request->get('_format');
$format = $request->query->get('_format');
switch ($format) {
case 'json':
$response = $this->createJsonResponse($filename, $data);
Expand Down

0 comments on commit 5f2cb8a

Please sign in to comment.