wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function MwWidgetsTableWidget has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

mw.widgets.TableWidget = function MwWidgetsTableWidget( config ) {
    // Configuration initialization
    config = config || {};

    // Parent constructor
Severity: Major
Found in resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js - About 3 hrs to fix

    Function size$1 has 76 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const size$1 = function(options) {
      if (options === void 0) {
        options = {};
      }
      return {
    Severity: Major
    Found in resources/lib/codex/codex.js - About 3 hrs to fix

      Function _sfc_render$o has 76 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
        const _component_cdx_input_chip = resolveComponent("cdx-input-chip");
        return openBlock(), createElementBlock(
          "div",
          {
      Severity: Major
      Found in resources/lib/codex/codex.js - About 3 hrs to fix

        Function _sfc_render$i has 76 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
          const _component_cdx_text_input = resolveComponent("cdx-text-input");
          const _component_cdx_icon = resolveComponent("cdx-icon");
          const _component_cdx_button = resolveComponent("cdx-button");
          const _component_cdx_menu = resolveComponent("cdx-menu");
        Severity: Major
        Found in resources/lib/codex/codex.js - About 3 hrs to fix

          Method getApplicableBlock has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getApplicableBlock(
                  string $action,
                  User $user,
                  string $rigor,
                  $page,
          Severity: Major
          Found in includes/Permissions/PermissionManager.php - About 3 hrs to fix

            Method run has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function run( $action, $module ) {
                    $actions = [ 'update', 'verify', 'make-sri', 'make-cdx' ];
                    if ( !in_array( $action, $actions ) ) {
                        $this->error( "Invalid action.\n\nMust be one of " . implode( ', ', $actions ) . '.' );
                        return false;
            Severity: Major
            Found in includes/ResourceLoader/ForeignResourceManager.php - About 3 hrs to fix

              Method showHeader has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function showHeader(): void {
                      $out = $this->context->getOutput();
                      $user = $this->context->getUser();
                      if ( $this->isConflict ) {
                          $this->addExplainConflictHeader();
              Severity: Major
              Found in includes/editpage/EditPage.php - About 3 hrs to fix

                Method saveRevision has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function saveRevision( CommentStoreComment $summary, int $flags = 0 ) {
                        $this->setFlags( $flags );
                
                        if ( $this->wasCommitted() ) {
                            throw new RuntimeException(
                Severity: Major
                Found in includes/Storage/PageUpdater.php - About 3 hrs to fix

                  Method collapseContactInfo has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function collapseContactInfo( array $vals ) {
                          if ( !( isset( $vals['CiAdrExtadr'] )
                              || isset( $vals['CiAdrCity'] )
                              || isset( $vals['CiAdrCtry'] )
                              || isset( $vals['CiEmailWork'] )
                  Severity: Major
                  Found in includes/media/FormatMetadata.php - About 3 hrs to fix

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

                        public function execute() {
                            $pUser = $this->getUser();
                    
                            // Deny if the user is blocked and doesn't have the full 'userrights' permission.
                            // This matches what Special:UserRights does for the web UI.
                    Severity: Major
                    Found in includes/api/ApiUserrights.php - About 3 hrs to fix

                      Method formatRevisionRow has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function formatRevisionRow( $row, $earliestLiveTime, $remaining ) {
                              $revRecord = $this->revisionStore->newRevisionFromArchiveRow(
                                      $row,
                                      IDBAccessObject::READ_NORMAL,
                                      $this->mTargetObj
                      Severity: Major
                      Found in includes/specials/SpecialUndelete.php - About 3 hrs to fix

                        Method register has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function register( Parser $parser, ServiceOptions $options ) {
                                $options->assertRequiredOptions( self::REGISTER_OPTIONS );
                                $allowDisplayTitle = $options->get( MainConfigNames::AllowDisplayTitle );
                                $allowSlowParserFunctions = $options->get( MainConfigNames::AllowSlowParserFunctions );
                        
                        
                        Severity: Major
                        Found in includes/parser/CoreParserFunctions.php - About 3 hrs to fix

                          Method doExecuteJob has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function doExecuteJob( RunnableJob $job ) {
                                  $jType = $job->getType();
                                  $msg = $job->toString() . " STARTING";
                                  $this->logger->debug( $msg, [ 'job_type' => $job->getType() ] );
                                  $this->debugCallback( $msg );
                          Severity: Major
                          Found in includes/jobqueue/JobRunner.php - About 3 hrs to fix

                            Method newLogEntry has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function newLogEntry( $timestamp,
                                    $logPage, $user, $actionComment, $ip,
                                    $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '',
                                    $revId = 0, $isPatrollable = false, $forceBotFlag = null
                                ) {
                            Severity: Major
                            Found in includes/recentchanges/RecentChange.php - About 3 hrs to fix

                              Method trackRevisions has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function trackRevisions() {
                                      $dbw = $this->getPrimaryDB();
                                      $dbr = $this->getReplicaDB();
                              
                                      $textClause = $this->getTextClause();
                              Severity: Major
                              Found in maintenance/storage/trackBlobs.php - About 3 hrs to fix

                                Method doPerfTest has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    protected function doPerfTest( FileBackend $backend ) {
                                        $ops1 = [];
                                        $ops2 = [];
                                        $ops3 = [];
                                        $ops4 = [];
                                Severity: Major
                                Found in maintenance/fileOpPerfTest.php - About 3 hrs to fix

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

                                      public function execute() {
                                          if ( !$this->hasOption( 'delete' ) ) {
                                              $this->output( "Use --delete to actually confirm this script\n" );
                                              return;
                                          }
                                  Severity: Major
                                  Found in maintenance/deleteArchivedFiles.php - About 3 hrs to fix

                                    File SlotRecord.php has 293 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    <?php
                                    /**
                                     * Value object representing a content slot associated with a page revision.
                                     *
                                     * This program is free software; you can redistribute it and/or modify
                                    Severity: Minor
                                    Found in includes/Revision/SlotRecord.php - About 3 hrs to fix

                                      File MessagesEl.php has 293 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      <?php
                                      /** Greek (Ελληνικά)
                                       *
                                       * @file
                                       * @ingroup Languages
                                      Severity: Minor
                                      Found in languages/messages/MessagesEl.php - About 3 hrs to fix

                                        File UserAuthority.php has 292 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/Permissions/UserAuthority.php - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language