Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bukin committed May 7, 2019
1 parent 8eca20f commit 73acf0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ class UtilityController extends Controller implements UtilityControllerContract
*/
public function getSuggestions(UtilityServiceContract $utilityService, Request $request): SuggestionsResponseContract
{
$search = $request->get('q', '');
$type = $request->get('type', '');
$search = $request->get('q', '') ?? '';
$type = $request->get('type', '') ?? '';

$items = $utilityService->getSuggestions($search);

return $this->app->make(
SuggestionsResponseContract::class,
compact('items', 'type')
);
return $this->app->make(SuggestionsResponseContract::class, compact('items', 'type'));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ class UtilityController extends Controller implements UtilityControllerContract
*/
public function getSuggestions(UtilityServiceContract $utilityService, Request $request): SuggestionsResponseContract
{
$search = $request->get('q', '');
$type = $request->get('type', '');
$search = $request->get('q', '') ?? '';
$type = $request->get('type', '') ?? '';

$items = $utilityService->getSuggestions($search);

return $this->app->make(
SuggestionsResponseContract::class,
compact('items', 'type')
);
return $this->app->make(SuggestionsResponseContract::class, compact('items', 'type'));
}
}

0 comments on commit 73acf0b

Please sign in to comment.