wikimedia/mediawiki-extensions-CirrusSearch

View on GitHub
includes/Fallbacks/IndexLookupFallbackMethod.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method getSearchRequest has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getSearchRequest( Client $client ) {
        $fixablePart = $this->queryFixer->getFixablePart();
        if ( $fixablePart === null ) {
            return null;
        }
Severity: Minor
Found in includes/Fallbacks/IndexLookupFallbackMethod.php - About 1 hr to fix

    Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            SearchQuery $query,
            $index,
            $queryTemplate,
            $suggestionField,
            array $queryParams,
    Severity: Major
    Found in includes/Fallbacks/IndexLookupFallbackMethod.php - About 50 mins to fix

      Avoid too many return statements within this method.
      Open

              return $search;
      Severity: Major
      Found in includes/Fallbacks/IndexLookupFallbackMethod.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return $this->maybeSearchAndRewrite( $context, $this->query, $suggestedQuery );
        Severity: Major
        Found in includes/Fallbacks/IndexLookupFallbackMethod.php - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status