wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Method extractResultInfo has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function extractResultInfo( $isFirst, $limit, IResultWrapper $res ) {
        $numRows = $res->numRows();

        $firstIndex = [];
        $lastIndex = [];
Severity: Minor
Found in includes/pager/IndexPager.php - About 1 hr to fix

    Method makeToolbox has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function makeToolbox( $navUrls, $feedUrls ) {
            $toolbox = [];
            if ( $navUrls['whatlinkshere'] ?? null ) {
                $toolbox['whatlinkshere'] = $navUrls['whatlinkshere'];
                $toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
    Severity: Minor
    Found in includes/skins/Skin.php - About 1 hr to fix

      Method getCopyrightHTML has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getCopyrightHTML(): string {
              $out = $this->skinContext->getOutput();
              $title = $out->getTitle();
              $isRevisionCurrent = $out->isRevisionCurrent();
              $config = $this->config;
      Severity: Minor
      Found in includes/skins/components/SkinComponentCopyright.php - About 1 hr to fix

        Method initializeArticle has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function initializeArticle() {
                $context = $this->getContext();
        
                $title = $context->getTitle();
                $services = $this->getServiceContainer();
        Severity: Minor
        Found in includes/actions/ActionEntryPoint.php - About 1 hr to fix

          Method __construct has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function __construct(
                  $code = null,
                  NamespaceInfo $namespaceInfo = null,
                  LocalisationCache $localisationCache = null,
                  LanguageNameUtils $langNameUtils = null,
          Severity: Minor
          Found in includes/language/Language.php - About 1 hr to fix

            Method includeRcFiltersApp has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function includeRcFiltersApp() {
                    $out = $this->getOutput();
                    if ( $this->isStructuredFilterUiEnabled() && !$this->including() ) {
                        $jsData = $this->getStructuredFilterJsData();
                        $messages = [];
            Severity: Minor
            Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

              Method getParamInfo has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getParamInfo( $name, array $settings, array $options ) {
                      $info = parent::getParamInfo( $name, $settings, $options );
                      /** @var ApiBase $module */
                      $module = $options['module'];
              
              
              Severity: Minor
              Found in includes/api/Validator/SubmoduleDef.php - About 1 hr to fix

                Method initFromQueryResult has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function initFromQueryResult( $res, &$remaining = null, $processTitles = null ) {
                        if ( $remaining !== null && $processTitles === null ) {
                            ApiBase::dieDebug( __METHOD__, 'Missing $processTitles parameter when $remaining is provided' );
                        }
                
                
                Severity: Minor
                Found in includes/api/ApiPageSet.php - About 1 hr to fix

                  Method getAllowedParams has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getAllowedParams() {
                          return [
                              'prop' => [
                                  ParamValidator::PARAM_DEFAULT => 'general',
                                  ParamValidator::PARAM_ISMULTI => true,
                  Severity: Minor
                  Found in includes/api/ApiQuerySiteinfo.php - About 1 hr to fix

                    Method execute has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function execute() {
                            $params = $this->extractRequestParams();
                            $modules = [];
                    
                            foreach ( $params['modules'] as $path ) {
                    Severity: Minor
                    Found in includes/api/ApiHelp.php - About 1 hr to fix

                      Method createDesktopPreferencesForm has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function createDesktopPreferencesForm() {
                              $tabPanels = [];
                              foreach ( $this->mFieldTree as $key => $val ) {
                                  if ( !is_array( $val ) ) {
                                      wfDebug( __METHOD__ . " encountered a field not attached to a section: '$key'" );
                      Severity: Minor
                      Found in includes/specials/forms/PreferencesFormOOUI.php - About 1 hr to fix

                        Method doExport has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function doExport( $page, $history, $list_authors, $exportall ) {
                                // If we are grabbing everything, enable full history and ignore the rest
                                if ( $exportall ) {
                                    $history = WikiExporter::FULL;
                                } else {
                        Severity: Minor
                        Found in includes/specials/SpecialExport.php - About 1 hr to fix

                          Method getQueryInfo has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getQueryInfo() {
                                  $dbr = $this->getDatabaseProvider()->getReplicaDatabase();
                          
                                  $field = 'el_to_domain_index';
                                  $extraFields = [
                          Severity: Minor
                          Found in includes/specials/SpecialLinkSearch.php - About 1 hr to fix

                            Method contentTypeFromPath has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function contentTypeFromPath( $filename, $safe = true ) {
                                    // NOTE: TrivialMimeDetection is forced by ThumbnailEntryPoint. When this
                                    // code is moved to a non-static method in a service object, we can no
                                    // longer rely on that.
                                    $trivialMimeDetection = MediaWikiServices::getInstance()->getMainConfig()
                            Severity: Minor
                            Found in includes/Output/StreamFile.php - About 1 hr to fix

                              Method render has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function render( $term, $resultSets ) {
                                      if ( !is_array( $resultSets ) ) {
                                          $resultSets = [ $resultSets ];
                                      }
                              
                              
                              Severity: Minor
                              Found in includes/search/searchwidgets/InterwikiSearchResultSetWidget.php - About 1 hr to fix

                                Method __construct has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function __construct() {
                                        parent::__construct();
                                        $gz = in_array( 'compress.zlib', stream_get_wrappers() )
                                            ? 'ok'
                                            : '(disabled; requires PHP zlib module)';
                                Severity: Minor
                                Found in maintenance/importDump.php - About 1 hr to fix

                                  Method execute has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function execute() {
                                          $typeFilter = $this->getOption( 'type', '' );
                                          $stateFilter = $this->getOption( 'status', '' );
                                          $stateLimit = (float)$this->getOption( 'limit', INF );
                                  
                                  
                                  Severity: Minor
                                  Found in maintenance/showJobs.php - About 1 hr to fix

                                    Method doWork has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function doWork( $mode ) {
                                            $this->output( "Finding up to {$this->getBatchSize()} drifted rows " .
                                                "greater than cat_id {$this->minimumId}...\n" );
                                    
                                            $dbr = $this->getDB( DB_REPLICA, 'vslow' );
                                    Severity: Minor
                                    Found in maintenance/recountCategories.php - About 1 hr to fix

                                      Method execute has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function execute() {
                                              $dbw = $this->getPrimaryDB();
                                              $services = $this->getServiceContainer();
                                              $defStore = $services->getChangeTagDefStore();
                                      
                                      
                                      Severity: Minor
                                      Found in maintenance/deleteTag.php - About 1 hr to fix

                                        Method execute has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function execute() {
                                                $this->commit = $this->hasOption( 'commit' );
                                                $dbr = $this->getReplicaDB();
                                                $dbw = $this->getPrimaryDB();
                                                $lastId = 0;
                                        Severity: Minor
                                        Found in maintenance/removeInvalidEmails.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language