src/Controller/Reduction/SearchController.php
/**
     * @todo isValid has to handle Brand too.
     */
@todo isValid has to handle Brand too.
@todo isValid has to handle Brand too .
private function isValid(Request $request): bool
    {
        $queryParameters = $request->query->get('search');
        if (!\array_key_exists('method', $queryParameters)) {
            return false;
        }
        if (!\array_key_exists('page', $queryParameters)) {
            return false;
        }
        return SearchType::SEARCH_METHODS[0] === $queryParameters['method'] &&
            $this->checkLocationFields($queryParameters);
    }
private function isValid ( Request $ request ) : bool { $ queryParameters = $ request -> query -> get ( 'search' ) ; if ( ! \ array_key_exists ( 'method' , $ queryParameters ) ) { return false ; } if ( ! \ array_key_exists ( 'page' , $ queryParameters ) ) { return false ; } return SearchType :: SEARCH_METHODS [ 0 ] === $ queryParameters [ 'method' ] && $ this -> checkLocationFields ( $ queryParameters ) ; }
@todo isValid has to handle Brand too.
@todo isValid has to handle Brand too .