wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Method triggerAsyncJobs has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function triggerAsyncJobs( $n, LoggerInterface $runJobsLogger ) {
        // Do not send request if there are probably no jobs
        $group = $this->getJobQueueGroupFactory()->makeJobQueueGroup();
        if ( !$group->queuesHaveJobs( JobQueueGroup::TYPE_DEFAULT ) ) {
            return true;
Severity: Major
Found in includes/MediaWikiEntryPoint.php - About 2 hrs to fix

    Method getTemplateData has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getTemplateData() {
            $title = $this->getTitle();
            $out = $this->getOutput();
            $user = $this->getUser();
            $isMainPage = $title->isMainPage();
    Severity: Major
    Found in includes/skins/Skin.php - About 2 hrs to fix

      Method expandAttributes has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function expandAttributes( array $attribs ) {
              $ret = '';
              foreach ( $attribs as $key => $value ) {
                  // Support intuitive [ 'checked' => true/false ] form
                  if ( $value === false || $value === null ) {
      Severity: Major
      Found in includes/Html/Html.php - About 2 hrs to fix

        Method getButtons has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getButtons() {
                $buttons = '';
        
                if ( $this->mShowSubmit ) {
                    $attribs = [];
        Severity: Major
        Found in includes/htmlform/HTMLForm.php - About 2 hrs to fix

          Method expand has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function expand( string $url, $defaultProto = PROTO_FALLBACK ): ?string {
                  if ( $defaultProto === PROTO_CANONICAL ) {
                      $serverUrl = $this->canonicalServer;
                  } elseif ( $defaultProto === PROTO_INTERNAL ) {
                      $serverUrl = $this->internalServer;
          Severity: Major
          Found in includes/utils/UrlUtils.php - About 2 hrs to fix

            Method get has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function get( $key, $useDB = true, $language = null, &$usedKey = '' ) {
                    if ( is_int( $key ) ) {
                        // Fix numerical strings that somehow become ints on their way here
                        $key = (string)$key;
                    } elseif ( !is_string( $key ) ) {
            Severity: Major
            Found in includes/language/MessageCache.php - About 2 hrs to fix

              Method getPathInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function getPathInfo( $want = 'all' ) {
                      // PATH_INFO is mangled due to https://bugs.php.net/bug.php?id=31892
                      // And also by Apache 2.x, double slashes are converted to single slashes.
                      // So we will use REQUEST_URI if possible.
                      $url = $this->getServerInfo( 'REQUEST_URI' );
              Severity: Major
              Found in includes/Request/WebRequest.php - About 2 hrs to fix

                Method load has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function load( $subPage ) {
                        $this->loadRequestParameters();
                        if ( $this->mLoaded ) {
                            return;
                        }
                Severity: Major
                Found in includes/specialpage/LoginSignupSpecialPage.php - About 2 hrs to fix

                  Method recache has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function recache( $limit, $unused = true ) {
                          if ( !$this->isCacheable() ) {
                              return 0;
                          }
                  
                  
                  Severity: Major
                  Found in includes/specialpage/QueryPage.php - About 2 hrs to fix

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

                        public function execute() {
                            // If there is no LocalSettings.php, continue to the installer welcome page
                            $vars = Installer::getExistingLocalSettings();
                            if ( !$vars ) {
                                return 'skip';
                    Severity: Major
                    Found in includes/installer/WebInstallerExistingWiki.php - About 2 hrs to fix

                      Method canCreateAccounts has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function canCreateAccounts() {
                              $status = $this->getConnection( self::CONN_CREATE_DATABASE );
                              if ( !$status->isOK() ) {
                                  return false;
                              }
                      Severity: Major
                      Found in includes/installer/MysqlInstaller.php - About 2 hrs to fix

                        File ApiQueryBase.php has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
                         *
                         * This program is free software; you can redistribute it and/or modify
                        Severity: Minor
                        Found in includes/api/ApiQueryBase.php - About 2 hrs to fix

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

                              public function getAllowedParams() {
                                  return [
                                      'namespace' => [
                                          ParamValidator::PARAM_ISMULTI => true,
                                          ParamValidator::PARAM_TYPE => 'namespace',
                          Severity: Major
                          Found in includes/api/ApiQueryProtectedTitles.php - About 2 hrs to fix

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

                                public function execute() {
                                    $user = $this->getUser();
                                    if ( !$user->isRegistered()
                                        || ( $user->isTemp() && !$user->isAllowed( 'editmywatchlist' ) )
                                    ) {
                            Severity: Major
                            Found in includes/api/ApiWatch.php - About 2 hrs to fix

                              Method getModuleSourceInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function getModuleSourceInfo() {
                                      if ( $this->mModuleSource !== false ) {
                                          return $this->mModuleSource;
                                      }
                              
                              
                              Severity: Major
                              Found in includes/api/ApiBase.php - About 2 hrs to fix

                                Method modifyTableSpecificBlobsForChangeTTL has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function modifyTableSpecificBlobsForChangeTTL(
                                        IDatabase $db,
                                        string $ptable,
                                        float $mtime,
                                        array $argsByKey,
                                Severity: Major
                                Found in includes/objectcache/SqlBagOStuff.php - About 2 hrs to fix

                                  Method findTitleInternal has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function findTitleInternal( $subpage, $forTransclusion ) {
                                          // base = title without the language code suffix
                                          // provided = the title as it was given
                                          $base = $provided = null;
                                          if ( $subpage !== null ) {
                                  Severity: Major
                                  Found in includes/specials/SpecialMyLanguage.php - About 2 hrs to fix

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

                                        public function execute( $subpage ) {
                                            $this->setHeaders();
                                            $this->addHelpLink( 'Help:ExpandTemplates' );
                                    
                                            $request = $this->getRequest();
                                    Severity: Major
                                    Found in includes/specials/SpecialExpandTemplates.php - About 2 hrs to fix

                                      Method partitionBacklinkJob has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function partitionBacklinkJob( Job $job, $bSize, $cSize, $opts = [] ) {
                                              $class = get_class( $job );
                                              $title = $job->getTitle();
                                              $params = $job->getParams();
                                      
                                      
                                      Severity: Major
                                      Found in includes/jobqueue/utils/BacklinkJobUtils.php - About 2 hrs to fix

                                        Method getHeadLinksSyndicationArray has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function getHeadLinksSyndicationArray( Config $config ) {
                                                if ( !$config->get( MainConfigNames::Feed ) ) {
                                                    return [];
                                                }
                                        
                                        
                                        Severity: Major
                                        Found in includes/Output/OutputPage.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language