wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function setup has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  setup(props, { emit, attrs, slots }) {
    const input = ref();
    const inputWrapper = ref();
    const menu = ref();
    const menuId = useGeneratedId("combobox");
Severity: Major
Found in resources/lib/codex/codex.js - About 3 hrs to fix

    Function openWindow has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    OO.ui.WindowManager.prototype.openWindow = function ( win, data, lifecycle, compatOpening ) {
        data = data || {};
    
        // Internal parameter 'lifecycle' allows this method to always return
        // a lifecycle even if the window still needs to be created
    Severity: Major
    Found in resources/lib/ooui/oojs-ui-windows.js - About 3 hrs to fix

      Method commitMainTransaction has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function commitMainTransaction() {
              $context = $this->context;
      
              $config = $context->getConfig();
              $request = $context->getRequest();
      Severity: Major
      Found in includes/MediaWikiEntryPoint.php - About 3 hrs to fix

        Method toHtml has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function toHtml( $options = [] ) {
                $services = MediaWikiServices::getInstance();
                $mainConfig = $services->getMainConfig();
                $nativeImageLazyLoading = $mainConfig->get( MainConfigNames::NativeImageLazyLoading );
                $enableLegacyMediaDOM = $mainConfig->get( MainConfigNames::ParserEnableLegacyMediaDOM );
        Severity: Major
        Found in includes/media/ThumbnailImage.php - About 3 hrs to fix

          Method getParserOutputInternal has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function getParserOutputInternal( ParserOptions $parserOptions ): Status {
                  // NOTE: ParserOutputAccess::getParserOutput() should be used for revisions
                  //       that come from the database. Either this revision is null to indicate
                  //       the current revision or the revision must have an ID.
                  // If we have a revision and the ID is 0 or null, then it's a fake revision
          Severity: Major
          Found in includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php - About 3 hrs to fix

            Method handleBatch has 85 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function handleBatch( int $lowId ): array {
                    $migratedCount = 0;
                    $res = $this->dbw->newSelectQueryBuilder()
                        ->select( '*' )
                        ->from( 'ipblocks' )
            Severity: Major
            Found in maintenance/migrateBlocks.php - About 3 hrs to fix

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

                  public function execute() {
                      $count = 0;
                      $oldGroup = $this->getArg( 0 );
                      $newGroup = $this->getArg( 1 );
                      $dbw = $this->getPrimaryDB();
              Severity: Major
              Found in maintenance/migrateUserGroup.php - About 3 hrs to fix

                File LinkRenderer.php has 308 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * This program is free software; you can redistribute it and/or modify
                 * it under the terms of the GNU General Public License as published by
                 * the Free Software Foundation; either version 2 of the License, or
                Severity: Minor
                Found in includes/linker/LinkRenderer.php - About 3 hrs to fix

                  File MessagesJa.php has 308 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /** Japanese (日本語)
                   *
                   * @file
                   * @ingroup Languages
                  Severity: Minor
                  Found in languages/messages/MessagesJa.php - About 3 hrs to fix

                    File PoolCounterRedis.php has 307 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * This program is free software; you can redistribute it and/or modify
                     * it under the terms of the GNU General Public License as published by
                     * the Free Software Foundation; either version 2 of the License, or
                    Severity: Minor
                    Found in includes/poolcounter/PoolCounterRedis.php - About 3 hrs to fix

                      File generateSitemap.php has 307 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /**
                       * Creates a sitemap for the site.
                       *
                       * Copyright © 2005, Ævar Arnfjörð Bjarmason, Jens Frank <jeluf@gmx.de> and
                      Severity: Minor
                      Found in maintenance/generateSitemap.php - About 3 hrs to fix

                        Function encapsulateSelection has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                encapsulateSelection: function ( options ) {
                                    return this.each( function () {
                                        let selText, isSample,
                                            pre = options.pre,
                                            post = options.post;
                        Severity: Major
                        Found in resources/src/jquery/jquery.textSelection.js - About 3 hrs to fix

                          Function getOptionsFromData has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              mw.widgets.TitleWidget.prototype.getOptionsFromData = function ( data ) {
                                  const currentPageName = new mw.Title( mw.config.get( 'wgRelevantPageName' ) ).getPrefixedText(),
                                      items = [],
                                      titles = [],
                                      disambigs = [],
                          Severity: Major
                          Found in resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js - About 3 hrs to fix

                            Method fetchKeys has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function fetchKeys( array $keys, array $checkKeys, float $now, $touchedCb = null ) {
                                    $resByKey = [];
                            
                                    // List of all sister keys that need to be fetched from cache
                                    $allSisterKeys = [];
                            Severity: Major
                            Found in includes/libs/objectcache/WANObjectCache.php - About 3 hrs to fix

                              Method getConnection has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getConnection( $server, LoggerInterface $logger = null ) {
                                      // The above @return also documents 'Redis' for convenience with IDEs.
                                      // RedisConnRef uses PHP magic methods, which wouldn't be recognised.
                              
                                      $logger = $logger ?: $this->logger;
                              Severity: Major
                              Found in includes/libs/redis/RedisConnectionPool.php - About 3 hrs to fix

                                Method makeLink has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function makeLink( $key, $item, $options = [] ) {
                                        $html = $item['html'] ?? null;
                                        $icon = $item['icon'] ?? null;
                                        if ( $html ) {
                                            return [
                                Severity: Major
                                Found in includes/skins/components/SkinComponentLink.php - About 3 hrs to fix

                                  Method loadUnguarded has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function loadUnguarded( $code, $mode ) {
                                          $success = false; // Keep track of success
                                          $staleCache = false; // a cache array with expired data, or false if none has been loaded
                                          $where = []; // Debug info, delayed to avoid spamming debug log too much
                                  
                                  
                                  Severity: Major
                                  Found in includes/language/MessageCache.php - About 3 hrs to fix

                                    Method parseCachedTable has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function parseCachedTable( $code, $subpage = '', $recursive = true ) {
                                            static $parsed = [];
                                    
                                            $key = 'Conversiontable/' . $code;
                                            if ( $subpage ) {
                                    Severity: Major
                                    Found in includes/language/LanguageConverter.php - About 3 hrs to fix

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

                                          public function execute() {
                                              $r = $this->parent->request;
                                              if ( $r->wasPosted() && $this->submit() ) {
                                                  return 'continue';
                                              }
                                      Severity: Major
                                      Found in includes/installer/WebInstallerName.php - About 3 hrs to fix

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

                                            public function getAllowedParams() {
                                                $ret = [
                                                    'title' => [
                                                        ParamValidator::PARAM_TYPE => 'string',
                                                    ],
                                        Severity: Major
                                        Found in includes/api/ApiQueryCategoryMembers.php - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language