wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function OoUiToolbar has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

OO.ui.Toolbar = function OoUiToolbar( toolFactory, toolGroupFactory, config ) {
    // Allow passing positional parameters inside the config object
    if ( OO.isPlainObject( toolFactory ) && config === undefined ) {
        config = toolFactory;
        toolFactory = config.toolFactory;
Severity: Minor
Found in resources/lib/ooui/oojs-ui-toolbars.js - About 1 hr to fix

    Function OoUiFieldsetLayout has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    OO.ui.FieldsetLayout = function OoUiFieldsetLayout( config ) {
        // Configuration initialization
        config = config || {};
    
        // Parent constructor
    Severity: Minor
    Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

      Function createHelpElement has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      OO.ui.FieldLayout.prototype.createHelpElement = function ( help, $overlay ) {
          let helpId, helpWidget;
      
          if ( this.helpInline ) {
              helpWidget = new OO.ui.LabelWidget( {
      Severity: Minor
      Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

        Function _eventHandler has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _eventHandler: function( event ) {
                var options = this.options,
                    active = this.active,
                    clicked = $( event.currentTarget ),
                    clickedIsActive = clicked[ 0 ] === active[ 0 ],
        Severity: Minor
        Found in resources/lib/jquery.ui/jquery.ui.accordion.js - About 1 hr to fix

          Function gen_bitlen has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const gen_bitlen = (s, desc) => {
            //    deflate_state *s;
            //    tree_desc *desc;    /* the tree descriptor */
          
              const tree            = desc.dyn_tree;
          Severity: Minor
          Found in resources/lib/pako/pako_deflate.js - About 1 hr to fix

            Function result_select has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Chosen.prototype.result_select = function(evt) {
                  var high, item;
                  if (this.result_highlight) {
                    high = this.result_highlight;
                    this.result_clear_highlight();
            Severity: Minor
            Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

              Method internalCan has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function internalCan(
                      string $rigor,
                      string $action,
                      PageIdentity $target,
                      ?PermissionStatus $status,
              Severity: Minor
              Found in includes/Permissions/UserAuthority.php - About 1 hr to fix

                Method __construct has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function __construct( $options = [] ) {
                        $services = MediaWikiServices::getInstance();
                        if ( isset( $options['config'] ) ) {
                            $this->config = $options['config'];
                            if ( !$this->config instanceof Config ) {
                Severity: Minor
                Found in includes/session/SessionManager.php - About 1 hr to fix

                  Method doDeleteUpdates has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function doDeleteUpdates( WikiPage $page, RevisionRecord $revRecord ): void {
                          try {
                              $countable = $page->isCountable();
                          } catch ( TimeoutException $e ) {
                              throw $e;
                  Severity: Minor
                  Found in includes/page/DeletePage.php - About 1 hr to fix

                    Method showDeletedRevisionHeader has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function showDeletedRevisionHeader() {
                            if ( !$this->mRevisionRecord->isDeleted( RevisionRecord::DELETED_TEXT ) ) {
                                // Not deleted
                                return true;
                            }
                    Severity: Minor
                    Found in includes/page/Article.php - About 1 hr to fix

                      Method addImplementScript has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function addImplementScript( MinifierState $minifier,
                              $moduleName, $version, $scripts, $styles, $messages, $templates, $deprecationWarning
                          ) {
                              $implementKey = "$moduleName@$version";
                              // Plain functions are used instead of arrow functions to avoid
                      Severity: Minor
                      Found in includes/ResourceLoader/ResourceLoader.php - About 1 hr to fix

                        Method __construct has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function __construct( array $options = [], $localBasePath = null, $remoteBasePath = null ) {
                                if ( isset( $options[ 'codexComponents' ] ) ) {
                                    if ( !is_array( $options[ 'codexComponents' ] ) || count( $options[ 'codexComponents' ] ) === 0 ) {
                                        throw new InvalidArgumentException(
                                            "All 'codexComponents' properties in your module definition file " .
                        Severity: Minor
                        Found in includes/ResourceLoader/CodexModule.php - About 1 hr to fix

                          Method newTemplateFormatter has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function newTemplateFormatter( $minify ) {
                                  return new class( $minify ) extends HtmlFormatter {
                                      private $minify;
                          
                                      public function __construct( $minify ) {
                          Severity: Minor
                          Found in includes/ResourceLoader/VueComponentParser.php - About 1 hr to fix

                            Method getAuthorsBetween has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getAuthorsBetween(
                                    $pageId,
                                    RevisionRecord $old = null,
                                    RevisionRecord $new = null,
                                    Authority $performer = null,
                            Severity: Minor
                            Found in includes/Revision/RevisionStore.php - About 1 hr to fix

                              Method newRevisionFromArchiveRowAndSlots has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function newRevisionFromArchiveRowAndSlots(
                                      stdClass $row,
                                      $slots,
                                      int $queryFlags = 0,
                                      ?PageIdentity $page = null,
                              Severity: Minor
                              Found in includes/Revision/RevisionStore.php - About 1 hr to fix

                                Method runParallelBatches has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    protected static function runParallelBatches( array $pPerformOps, StatusValue $status ) {
                                        $aborted = false; // set to true on unexpected errors
                                        foreach ( $pPerformOps as $performOpsBatch ) {
                                            if ( $aborted ) { // check batch op abort flag...
                                                // We can't continue (even with $ignoreErrors) as $predicates is wrong.
                                Severity: Minor
                                Found in includes/libs/filebackend/FileOpBatch.php - About 1 hr to fix

                                  Method getParamInfo has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getParamInfo( $name, $settings, array $options ) {
                                          $settings = $this->normalizeSettings( $settings );
                                          $typeDef = $this->getTypeDef( $settings[self::PARAM_TYPE] );
                                          $info = [];
                                  
                                  
                                  Severity: Minor
                                  Found in includes/libs/ParamValidator/ParamValidator.php - About 1 hr to fix

                                    Method parseMimeInfo has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function parseMimeInfo( string $rawMimeInfo ): void {
                                            $rawMimeInfo = str_replace( [ "\r\n", "\n\r", "\n\n", "\r\r", "\r" ], "\n", $rawMimeInfo );
                                            $rawMimeInfo = str_replace( "\t", " ", $rawMimeInfo );
                                    
                                            $lines = explode( "\n", $rawMimeInfo );
                                    Severity: Minor
                                    Found in includes/libs/mime/MimeAnalyzer.php - About 1 hr to fix

                                      Method approvePrimaryChanges has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function approvePrimaryChanges( int $maxWriteDuration, $fname = __METHOD__ ) {
                                              $this->assertTransactionRoundStage( self::ROUND_FINALIZED );
                                              /** @noinspection PhpUnusedLocalVariableInspection */
                                              $scope = ScopedCallback::newScopedIgnoreUserAbort();
                                      
                                      
                                      Severity: Minor
                                      Found in includes/libs/rdbms/loadbalancer/LoadBalancer.php - About 1 hr to fix

                                        Method getQueryInfo has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getQueryInfo() {
                                                $queryInfo = $this->getRevisionQuery();
                                        
                                                if ( $this->deletedOnly ) {
                                                    $queryInfo['conds'][] = $this->revisionDeletedField . ' != 0';
                                        Severity: Minor
                                        Found in includes/pager/ContributionsPager.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language