wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function dayOfYearFromWeekInfo has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function dayOfYearFromWeekInfo(config) {
        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;

        w = config._w;
        if (w.GG != null || w.W != null || w.E != null) {
Severity: Minor
Found in resources/lib/moment/moment.js - About 1 hr to fix

    Function defineLocale has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function defineLocale(name, config) {
            if (config !== null) {
                var locale,
                    parentConfig = baseConfig;
                config.abbr = name;
    Severity: Minor
    Found in resources/lib/moment/moment.js - About 1 hr to fix

      Function updateInputSize has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      OO.ui.TagMultiselectWidget.prototype.updateInputSize = function () {
          if ( this.inputPosition === 'inline' && !this.isDisabled() ) {
              if ( this.input.$input[ 0 ].scrollWidth === 0 ) {
                  // Input appears to be attached but not visible.
                  // Don't attempt to adjust its size, because our measurements
      Severity: Minor
      Found in resources/lib/ooui/oojs-ui-widgets.js - About 1 hr to fix

        Function isElementInViewport has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        OO.ui.mixin.FloatableElement.prototype.isElementInViewport = function ( $element, $container ) {
            const direction = $element.css( 'direction' );
        
            const elemRect = $element[ 0 ].getBoundingClientRect();
            let contRect;
        Severity: Minor
        Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

          Function adjustSize has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          OO.ui.MultilineTextInputWidget.prototype.adjustSize = function ( force ) {
              if ( force || this.$input.val() !== this.valCache ) {
                  if ( this.autosize ) {
                      this.$clone
                          .val( this.$input.val() )
          Severity: Minor
          Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

            Function effect has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                effect: function( /* effect, options, speed, callback */ ) {
                    var args = _normalizeArguments.apply( this, arguments ),
                        mode = args.mode,
                        queue = args.queue,
                        effectMethod = $.effects.effect[ args.effect ],
            Severity: Minor
            Found in resources/lib/jquery.ui/jquery.ui.effect.js - About 1 hr to fix

              Function _destroy has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _destroy: function() {
                      if ( this.xhr ) {
                          this.xhr.abort();
                      }
              
              
              Severity: Minor
              Found in resources/lib/jquery.ui/jquery.ui.tabs.js - About 1 hr to fix

                Function _generatePosition has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _generatePosition: function(event) {
                
                        var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
                        var pageX = event.pageX;
                        var pageY = event.pageY;
                Severity: Minor
                Found in resources/lib/jquery.ui/jquery.ui.draggable.js - About 1 hr to fix

                  Function createLogger has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function createLogger (ref) {
                      if ( ref === void 0 ) ref = {};
                      var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
                      var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
                      var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
                  Severity: Minor
                  Found in resources/lib/vuex/vuex.global.js - About 1 hr to fix

                    Function deflateInit2 has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {
                    
                        if (!strm) { // === Z_NULL
                          return Z_STREAM_ERROR;
                        }
                    Severity: Minor
                    Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

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

                          public function setNotificationTimestampsForUser(
                              UserIdentity $user,
                              $timestamp,
                              array $targets = []
                          ): bool {
                      Severity: Minor
                      Found in includes/watchlist/WatchedItemStore.php - About 1 hr to fix

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

                            public function refreshSessionInfo( SessionInfo $info, WebRequest $request, &$metadata ) {
                                $missingKeys = array_diff(
                                    [ 'centralId', 'appId', 'token' ],
                                    array_keys( $metadata )
                                );
                        Severity: Minor
                        Found in includes/session/BotPasswordSessionProvider.php - About 1 hr to fix

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

                              private function getWatchedItemsWithRCInfoQueryFilterConds(
                                  IReadableDatabase $dbr,
                                  User $user,
                                  array $options
                              ) {
                          Severity: Minor
                          Found in includes/watchlist/WatchedItemQueryService.php - About 1 hr to fix

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

                                public function loadFromSubmission( array $data ) {
                                    $fields = array_filter( $this->getFieldInfo(), static function ( $info ) {
                                        return $info['type'] !== 'null';
                                    } );
                                    if ( !$fields ) {
                            Severity: Minor
                            Found in includes/auth/AuthenticationRequest.php - About 1 hr to fix

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

                                  public function getAuthenticationRequests( $action, UserIdentity $user = null ) {
                                      $options = [];
                                      $providerAction = $action;
                              
                                      // Figure out which providers to query
                              Severity: Minor
                              Found in includes/auth/AuthManager.php - About 1 hr to fix

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

                                    private function getAuthenticationRequestsInternal(
                                        $providerAction, array $options, array $providers, UserIdentity $user = null
                                    ) {
                                        $user = $user ?: RequestContext::getMain()->getUser();
                                        $options['username'] = $user->isRegistered() ? $user->getName() : null;
                                Severity: Minor
                                Found in includes/auth/AuthManager.php - About 1 hr to fix

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

                                      protected function waitForSlotOrNotif( $doWakeup, $timeout = null ) {
                                          if ( $this->slot !== null ) {
                                              return Status::newGood( PoolCounter::LOCK_HELD ); // already acquired
                                          }
                                  
                                  
                                  Severity: Minor
                                  Found in includes/poolcounter/PoolCounterRedis.php - About 1 hr to fix

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

                                        protected function doStreamFile( array $params ) {
                                            $status = $this->newStatus();
                                    
                                            $flags = !empty( $params['headless'] ) ? HTTPFileStreamer::STREAM_HEADLESS : 0;
                                    
                                    
                                    Severity: Minor
                                    Found in includes/libs/filebackend/SwiftFileBackend.php - About 1 hr to fix

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

                                          public static function attempt( array $performOps, array $opts ) {
                                              $status = StatusValue::newGood();
                                      
                                              $n = count( $performOps );
                                              if ( $n > self::MAX_BATCH_SIZE ) {
                                      Severity: Minor
                                      Found in includes/libs/filebackend/FileOpBatch.php - About 1 hr to fix

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

                                            protected function open( $server, $user, $password, $db, $schema, $tablePrefix ) {
                                                $this->close( __METHOD__ );
                                        
                                                if ( $schema !== null ) {
                                                    throw $this->newExceptionAfterConnectError( "Got schema '$schema'; not supported." );
                                        Severity: Minor
                                        Found in includes/libs/rdbms/database/DatabaseMySQL.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language