wikimedia/mediawiki-core

View on GitHub
includes/search/searchwidgets/SearchFormWidget.php

Summary

Maintainability
C
1 day
Test Coverage

File SearchFormWidget.php has 297 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace MediaWiki\Search\SearchWidgets;

use MediaWiki\Config\ServiceOptions;
Severity: Minor
Found in includes/search/searchwidgets/SearchFormWidget.php - About 3 hrs to fix

    Method shortDialogHtml has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function shortDialogHtml(
            $profile,
            $term,
            $numResults,
            $totalResults,
    Severity: Minor
    Found in includes/search/searchwidgets/SearchFormWidget.php - About 1 hr to fix

      Method profileTabsHtml has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function profileTabsHtml( $profile, $term ) {
              $bareterm = $this->startsWithImage( $term )
                  ? substr( $term, strpos( $term, ':' ) + 1 )
                  : $term;
              $lang = $this->specialSearch->getLanguage();
      Severity: Minor
      Found in includes/search/searchwidgets/SearchFormWidget.php - About 1 hr to fix

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

                $profile,
                $term,
                $numResults,
                $totalResults,
                $offset,
        Severity: Major
        Found in includes/search/searchwidgets/SearchFormWidget.php - About 50 mins to fix

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

                  ServiceOptions $options,
                  SpecialSearch $specialSearch,
                  SearchEngineConfig $searchConfig,
                  HookContainer $hookContainer,
                  ILanguageConverter $languageConverter,
          Severity: Major
          Found in includes/search/searchwidgets/SearchFormWidget.php - About 50 mins to fix

            Method shortDialogHtml has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    $profile,
                    $term,
                    $numResults,
                    $totalResults,
                    $offset,
            Severity: Minor
            Found in includes/search/searchwidgets/SearchFormWidget.php - About 45 mins to fix

              There are no issues that match your filters.

              Category
              Status