wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Method getStartBody has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function getStartBody() {
        $this->oldIdChecked = 0;
        $s = '';
        // Button container stored in $this->buttons for re-use in getEndBody()
        $this->buttons = '';
Severity: Minor
Found in includes/actions/pagers/HistoryPager.php - About 1 hr to fix

    Method getInputOOUI has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getInputOOUI( $value ) {
            if ( !$this->isPersistent() ) {
                $value = '';
            }
    
    
    Severity: Minor
    Found in includes/htmlform/fields/HTMLTextField.php - About 1 hr to fix

      Method getMsgFromNamespace has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getMsgFromNamespace( $title, $code ) {
              // Load all MediaWiki page definitions into cache. Note that individual keys
              // already loaded into the cache during this request remain in the cache, which
              // includes the value of hook-defined messages.
              $this->load( $code );
      Severity: Minor
      Found in includes/language/MessageCache.php - About 1 hr to fix

        Method getNamespaceAliases has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getNamespaceAliases() {
                if ( $this->namespaceAliases === null ) {
                    $aliases = $this->localisationCache->getItem( $this->mCode, 'namespaceAliases' );
                    if ( !$aliases ) {
                        $aliases = [];
        Severity: Minor
        Found in includes/language/Language.php - About 1 hr to fix

          Method executePath has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function executePath( $path, IContextSource $context, $including = false,
                  LinkRenderer $linkRenderer = null
              ) {
                  if ( $path instanceof PageReference ) {
                      $path = $path->getDBkey();
          Severity: Minor
          Found in includes/specialpage/SpecialPageFactory.php - About 1 hr to fix

            Method getGoodLinkRowInternal has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function getGoodLinkRowInternal(
                    TitleValue $link,
                    callable $fetchCallback = null,
                    int $queryFlags = IDBAccessObject::READ_NORMAL
                ): array {
            Severity: Minor
            Found in includes/cache/LinkCache.php - About 1 hr to fix

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

                  public function execute() {
                      $params = $this->extractRequestParams();
                      $helper = new ApiAuthManagerHelper( $this, $this->authManager );
                      $ret = [
                          'canauthenticatenow' => $this->authManager->canAuthenticateNow(),
              Severity: Minor
              Found in includes/api/ApiQueryAuthManagerInfo.php - About 1 hr to fix

                Method describeIndex has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function describeIndex( $idx ) {
                        // first fetch the key (which is a list of columns ords) and
                        // the table the index applies to (an oid)
                        $q = <<<END
                SELECT indkey, indrelid FROM pg_namespace, pg_class, pg_index
                Severity: Minor
                Found in includes/installer/PostgresUpdater.php - About 1 hr to fix

                  Method getParsedContent has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function getParsedContent(
                          WikiPage $page, $popts, $suppressCache, $pageId, $rev, $getContent
                      ) {
                          $revId = $rev ? $rev->getId() : null;
                          $isDeleted = $rev && $rev->isDeleted( RevisionRecord::DELETED_TEXT );
                  Severity: Minor
                  Found in includes/api/ApiParse.php - About 1 hr to fix

                    Method addPersonalizationOptions has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function addPersonalizationOptions() {
                            $parent = $this->parent;
                            $this->addHTML(
                                $this->getFieldsetStart( 'config-personalization-settings' ) .
                                Html::rawElement( 'div', [
                    Severity: Minor
                    Found in includes/installer/WebInstallerOptions.php - About 1 hr to fix

                      Method getIndexErrorOutput has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function getIndexErrorOutput( $introText, $longTitle, $longHtml ) {
                              $encLogo =
                                  htmlspecialchars( str_replace( '//', '/', $this->scriptPath . '/' ) .
                                      'resources/assets/mediawiki.png' );
                      
                      
                      Severity: Minor
                      Found in includes/PHPVersionCheck.php - About 1 hr to fix

                        Method deleteObjectsExpiringBefore has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function deleteObjectsExpiringBefore(
                                $timestamp,
                                callable $progress = null,
                                $limit = INF,
                                string $tag = null
                        Severity: Minor
                        Found in includes/objectcache/SqlBagOStuff.php - About 1 hr to fix

                          Method setTopText has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function setTopText( FormOptions $opts ) {
                                  $nondefaults = $opts->getChangedValues();
                                  $form = '';
                                  $user = $this->getUser();
                          
                          
                          Severity: Minor
                          Found in includes/specials/SpecialWatchlist.php - About 1 hr to fix

                            Method setTopText has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function setTopText( FormOptions $opts ) {
                                    $message = $this->msg( 'recentchangestext' )->inContentLanguage();
                                    if ( !$message->isDisabled() ) {
                                        $contLang = $this->getContentLanguage();
                                        // Parse the message in this weird ugly way to preserve the ability to include interlanguage
                            Severity: Minor
                            Found in includes/specials/SpecialRecentChanges.php - About 1 hr to fix

                              Method listAuthors has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function listAuthors( $authors, $extName, $extDir ): string {
                                      $hasOthers = false;
                                      $linkRenderer = $this->getLinkRenderer();
                              
                                      $list = [];
                              Severity: Minor
                              Found in includes/specials/SpecialVersion.php - About 1 hr to fix

                                Method createMobilePreferencesForm has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function createMobilePreferencesForm() {
                                        $sectionButtons = [];
                                        $sectionContents = [];
                                        $iconNames = $this->getIconNames();
                                
                                
                                Severity: Minor
                                Found in includes/specials/forms/PreferencesFormOOUI.php - About 1 hr to fix

                                  Method interwikiMap has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function interwikiMap(): array {
                                          // Unfortunate that this mostly duplicates \ApiQuerySiteinfo::appendInterwikiMap()
                                          if ( $this->interwikiMap !== null ) {
                                              return $this->interwikiMap;
                                          }
                                  Severity: Minor
                                  Found in includes/parser/Parsoid/Config/SiteConfig.php - About 1 hr to fix

                                    Method limitTitle has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function limitTitle( $page, $pattern ) {
                                            if ( !$page instanceof PageReference ) {
                                                // NOTE: For some types of logs, the title may be something strange, like "User:#12345"!
                                                $page = Title::newFromText( $page );
                                                if ( !$page ) {
                                    Severity: Minor
                                    Found in includes/logging/LogPager.php - About 1 hr to fix

                                      Method purgeExpired has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function purgeExpired() {
                                              if ( $this->readOnlyMode->isReadOnly( $this->wikiId ) ) {
                                                  return false;
                                              }
                                      
                                      
                                      Severity: Minor
                                      Found in includes/user/UserGroupManager.php - About 1 hr to fix

                                        Method disableStorage has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function disableStorage() {
                                                if ( $this->storageDisabled ) {
                                                    return;
                                                }
                                        
                                        
                                        Severity: Minor
                                        Found in includes/MediaWikiServices.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language