wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

PagerNavigationBuilder has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

class PagerNavigationBuilder {
    /** @var MessageLocalizer */
    private $messageLocalizer;

    /** @var PageReference */
Severity: Minor
Found in includes/Navigation/PagerNavigationBuilder.php - About 2 hrs to fix

    MapCacheLRU has 22 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class MapCacheLRU implements ExpirationAwareness {
        /** @var array Map of (key => value) */
        private $cache = [];
        /** @var array Map of (key => (UNIX timestamp, (field => UNIX timestamp))) */
        private $timestamps = [];
    Severity: Minor
    Found in includes/libs/MapCacheLRU.php - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                      if ( $this->getAuthority()->probablyCan( 'edit', $title ) ) {
                          // Builds CSS class for talk page links
                          $isTalkClass = $isTalk ? ' istalk' : '';
                          // Whether the user is editing the page
                          $isEditing = $onPage && ( $action == 'edit' || $action == 'submit' );
      Severity: Critical
      Found in includes/skins/SkinTemplate.php - About 2 hrs to fix

        ImageListPager has 22 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class ImageListPager extends TablePager {
        
            /** @var string[]|null */
            protected $mFieldNames = null;
            /**
        Severity: Minor
        Found in includes/specials/pagers/ImageListPager.php - About 2 hrs to fix

          PPFrame_Hash has 22 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class PPFrame_Hash implements Stringable, PPFrame {
          
              /**
               * @var Parser
               */
          Severity: Minor
          Found in includes/parser/PPFrame_Hash.php - About 2 hrs to fix

            TempUserCreator has 22 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class TempUserCreator implements TempUserConfig {
                private RealTempUserConfig $config;
                private UserFactory $userFactory;
                private AuthManager $authManager;
                private CentralIdLookup $centralIdLookup;
            Severity: Minor
            Found in includes/user/TempUser/TempUserCreator.php - About 2 hrs to fix

              UserOptionsManager has 22 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class UserOptionsManager extends UserOptionsLookup {
              
                  /**
                   * @internal For use by ServiceWiring
                   */
              Severity: Minor
              Found in includes/user/Options/UserOptionsManager.php - About 2 hrs to fix

                PageContentHelper has 22 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class PageContentHelper {
                
                    /**
                     * The maximum cache duration for page content.
                     *
                Severity: Minor
                Found in includes/Rest/Handler/Helper/PageContentHelper.php - About 2 hrs to fix

                  CategoryViewer has 22 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class CategoryViewer extends ContextSource {
                      use ProtectedHookAccessorTrait;
                      use DeprecationHelper;
                  
                      /** @var int */
                  Severity: Minor
                  Found in includes/Category/CategoryViewer.php - About 2 hrs to fix

                    CategoryLinksTable has 22 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class CategoryLinksTable extends TitleLinksTable {
                        /**
                         * @var array Associative array of new links, with the category name in the
                         *   key. The value is a list consisting of the sort key prefix and the sort
                         *   key.
                    Severity: Minor
                    Found in includes/deferred/LinksUpdate/CategoryLinksTable.php - About 2 hrs to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if (
                                      ( $params['omit_bots'] && $this->mAttribs['rc_bot'] ) ||
                                      ( $params['omit_anon'] && !$performer->isRegistered() ) ||
                                      ( $params['omit_user'] && $performer->isRegistered() ) ||
                                      ( $params['omit_minor'] && $this->mAttribs['rc_minor'] ) ||
                      Severity: Critical
                      Found in includes/recentchanges/RecentChange.php - About 2 hrs to fix

                        Function batchRequest has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function batchRequest( batch ) {
                                if ( !batch.length ) {
                                    return;
                                }
                        
                        
                        Severity: Major
                        Found in resources/src/startup/mediawiki.loader.js - About 2 hrs to fix

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

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

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

                            function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
                              const _component_cdx_icon = resolveComponent("cdx-icon");
                              const _component_cdx_menu = resolveComponent("cdx-menu");
                              return openBlock(), createElementBlock("div", {
                                class: normalizeClass(["cdx-select-vue", _ctx.rootClasses]),
                            Severity: Major
                            Found in resources/lib/codex/codex.js - About 2 hrs to fix

                              Function makeApi has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function makeApi(sinon) {
                              
                                      // Adapted from https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug
                                      var hasDontEnumBug = (function () {
                                          var obj = {
                              Severity: Major
                              Found in resources/lib/sinonjs/sinon.js - About 2 hrs to fix

                                Function localeWeekdaysParse has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function localeWeekdaysParse(weekdayName, format, strict) {
                                        var i, mom, regex;
                                
                                        if (this._weekdaysParseExact) {
                                            return handleStrictParse$1.call(this, weekdayName, format, strict);
                                Severity: Major
                                Found in resources/lib/moment/moment.js - About 2 hrs to fix

                                  Function deflate_rle has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const deflate_rle = (s, flush) => {
                                  
                                      let bflush;            /* set if current block must be flushed */
                                      let prev;              /* byte at distance one to match */
                                      let scan, strend;      /* scan goes up to strend for length of run */
                                  Severity: Major
                                  Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

                                    Function defineStore has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function defineStore(
                                      // TODO: add proper types from above
                                      idOrOptions, setup, setupOptions) {
                                          let id;
                                          let options;
                                    Severity: Major
                                    Found in resources/lib/pinia/pinia.iife.js - About 2 hrs to fix

                                      Method updateRecentChange has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function updateRecentChange(
                                              IDatabase $dbw,
                                              RevisionRecord $current,
                                              RevisionRecord $target
                                          ) {
                                      Severity: Major
                                      Found in includes/page/RollbackPage.php - About 2 hrs to fix

                                        Method provideSessionInfo has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function provideSessionInfo( WebRequest $request ) {
                                                $sessionId = $this->getCookie( $request, $this->params['sessionName'], '' );
                                                $info = [
                                                    'provider' => $this,
                                                    'forceHTTPS' => $this->getCookie( $request, 'forceHTTPS', '', false )
                                        Severity: Major
                                        Found in includes/session/CookieSessionProvider.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language