wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

ContributionsPager has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class ContributionsPager extends RangeChronologicalPager {

    /** @inheritDoc */
    public $mGroupByDate = true;

Severity: Minor
Found in includes/pager/ContributionsPager.php - About 2 hrs to fix

    TransformationalImageHandler has 21 functions (exceeds 20 allowed). Consider refactoring.
    Open

    abstract class TransformationalImageHandler extends ImageHandler {
        /**
         * @stable to override
         * @param File $image
         * @param array &$params Transform parameters. Entries with the keys 'width'
    Severity: Minor
    Found in includes/media/TransformationalImageHandler.php - About 2 hrs to fix

      MysqlInstaller has 21 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class MysqlInstaller extends DatabaseInstaller {
      
          /** @inheritDoc */
          protected $globalNames = [
              'wgDBserver',
      Severity: Minor
      Found in includes/installer/MysqlInstaller.php - About 2 hrs to fix

        ApiParse has 21 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class ApiParse extends ApiBase {
        
            /** @var string|false|null */
            private $section = null;
        
        
        Severity: Minor
        Found in includes/api/ApiParse.php - About 2 hrs to fix

          SpecialSearch has 21 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class SpecialSearch extends SpecialPage {
              /**
               * Current search profile. Search profile is just a name that identifies
               * the active search tab on the search page (content, discussions...)
               * For users tt replaces the set of enabled namespaces from the query
          Severity: Minor
          Found in includes/specials/SpecialSearch.php - About 2 hrs to fix

            MWExceptionHandler has 21 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class MWExceptionHandler {
                /** Error caught and reported by this exception handler */
                public const CAUGHT_BY_HANDLER = 'mwe_handler';
                /** Error caught and reported by a script entry point */
                public const CAUGHT_BY_ENTRYPOINT = 'entrypoint';
            Severity: Minor
            Found in includes/exception/MWExceptionHandler.php - About 2 hrs to fix

              LinkRenderer has 21 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class LinkRenderer {
              
                  public const CONSTRUCTOR_OPTIONS = [
                      'renderForComment',
                  ];
              Severity: Minor
              Found in includes/linker/LinkRenderer.php - About 2 hrs to fix

                GenerateSitemap has 21 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class GenerateSitemap extends Maintenance {
                    private const GS_MAIN = -2;
                    private const GS_TALK = -1;
                
                    /**
                Severity: Minor
                Found in maintenance/generateSitemap.php - About 2 hrs to fix

                  Function formatRequest has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          formatRequest: function ( displayParams, rawParams, method, ajaxOptions ) {
                              let jsonLayout, phpLayout,
                                  apiUrl = new URL( mw.util.wikiScript( 'api' ), location.origin ).toString(),
                                  items = [
                                      new OO.ui.MenuOptionWidget( {
                  Severity: Major
                  Found in resources/src/mediawiki.special.apisandbox/apisandbox.js - About 2 hrs to fix

                    Function MwRcfiltersUiSavedLinksListWidget has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const SavedLinksListWidget = function MwRcfiltersUiSavedLinksListWidget( controller, model, config ) {
                        const $labelNoEntries = $( '<div>' )
                            .append(
                                $( '<div>' )
                                    .addClass( 'mw-rcfilters-ui-savedLinksListWidget-placeholder-title' )
                    Severity: Major
                    Found in resources/src/mediawiki.rcfilters/ui/SavedLinksListWidget.js - About 2 hrs to fix

                      Function detectOverflow has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function detectOverflow(state, options) {
                        return __async(this, null, function* () {
                          var _await$platform$isEle;
                          if (options === void 0) {
                            options = {};
                      Severity: Major
                      Found in resources/lib/codex/codex.js - About 2 hrs to fix

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

                          setup(props, { attrs, emit }) {
                            const wrappedModel = useModelWrapper(toRef(props, "modelValue"), emit);
                            const idAttribute = attrs.id;
                            const {
                              computedDisabled,
                        Severity: Major
                        Found in resources/lib/codex/codex.js - About 2 hrs to fix

                          Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              init = jQuery.fn.init = function( selector, context, root ) {
                                  var match, elem;
                          
                                  // HANDLE: $(""), $(null), $(undefined), $(false)
                                  if ( !selector ) {
                          Severity: Major
                          Found in resources/lib/jquery/jquery.js - About 2 hrs to fix

                            Function deflateSetDictionary has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const deflateSetDictionary = (strm, dictionary) => {
                            
                                let dictLength = dictionary.length;
                            
                                if (deflateStateCheck(strm)) {
                            Severity: Major
                            Found in resources/lib/pako/pako_deflate.js - About 2 hrs to fix

                              Method handleTypeTar has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function handleTypeTar( $moduleName, $destDir, array $info, string $fileType ) {
                                      $info += [ 'src' => null, 'integrity' => null, 'dest' => null ];
                                      if ( $info['src'] === null ) {
                                          throw new LogicException( "Module '$moduleName' must have a 'src' key." );
                                      }
                              Severity: Major
                              Found in includes/ResourceLoader/ForeignResourceManager.php - About 2 hrs to fix

                                Method securitySensitiveOperationStatus has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function securitySensitiveOperationStatus( $operation ) {
                                        $status = self::SEC_OK;
                                
                                        $this->logger->debug( __METHOD__ . ": Checking $operation" );
                                
                                
                                Severity: Major
                                Found in includes/auth/AuthManager.php - About 2 hrs to fix

                                  Method getRequirements has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getRequirements( array $info, $includeDev ) {
                                          // Quick shortcuts
                                          if ( !$includeDev || !isset( $info['dev-requires'] ) ) {
                                              return $info['requires'] ?? [];
                                          }
                                  Severity: Major
                                  Found in includes/registration/ExtensionProcessor.php - About 2 hrs to fix

                                    Method loadSlotContent has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function loadSlotContent(
                                            SlotRecord $slot,
                                            ?string $blobData = null,
                                            ?string $blobFlags = null,
                                            ?string $blobFormat = null,
                                    Severity: Major
                                    Found in includes/Revision/RevisionStore.php - About 2 hrs to fix

                                      Method doMoveInternal has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function doMoveInternal( array $params ) {
                                              $status = $this->newStatus();
                                      
                                              [ $srcCont, $srcRel ] = $this->resolveStoragePathReal( $params['src'] );
                                              if ( $srcRel === null ) {
                                      Severity: Major
                                      Found in includes/libs/filebackend/SwiftFileBackend.php - About 2 hrs to fix

                                        Method getTimeAndDelay has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function getTimeAndDelay( $lockFile, $clockSeqSize, $counterSize, $offsetSize ) {
                                                // Get the UID lock file handle
                                                if ( isset( $this->fileHandles[$this->$lockFile] ) ) {
                                                    $handle = $this->fileHandles[$this->$lockFile];
                                                } else {
                                        Severity: Major
                                        Found in includes/libs/uuid/GlobalIdGenerator.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language