wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function configFromStringAndFormat has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function configFromStringAndFormat(config) {
        // TODO: Move this to another part of the creation flow to prevent circular deps
        if (config._f === hooks.ISO_8601) {
            configFromISO(config);
            return;
Severity: Major
Found in resources/lib/moment/moment.js - About 2 hrs to fix

    Function resolve has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        function resolve( depth, deferred, handler, special ) {
                            return function() {
                                var that = this,
                                    args = arguments,
                                    mightThrow = function() {
    Severity: Major
    Found in resources/lib/jquery/jquery.js - About 2 hrs to fix

      Method checkQuickPermissions has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function checkQuickPermissions(
              $action,
              User $user,
              PermissionStatus $status,
              $rigor,
      Severity: Major
      Found in includes/Permissions/PermissionManager.php - About 2 hrs to fix

        Method getParserOutput has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getParserOutput(
                PageRecord $page,
                ParserOptions $parserOptions,
                ?RevisionRecord $revision = null,
                int $options = 0
        Severity: Major
        Found in includes/page/ParserOutputAccess.php - About 2 hrs to fix

          Method addCodeEditingIntro has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function addCodeEditingIntro(
                  IntroMessageList $messages,
                  MessageLocalizer $localizer,
                  Title $title,
                  Authority $performer
          Severity: Major
          Found in includes/editpage/IntroMessageBuilder.php - About 2 hrs to fix

            Method attemptQuery has 71 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function attemptQuery(
                    $sql,
                    string $fname,
                    bool $isPermWrite
                ) {
            Severity: Major
            Found in includes/libs/rdbms/database/Database.php - About 2 hrs to fix

              Method convertByteClassToUnicodeClass has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function convertByteClassToUnicodeClass( $byteClass ) {
                      $length = strlen( $byteClass );
                      // Input token queue
                      $x0 = $x1 = $x2 = '';
                      // Decoded queue
              Severity: Major
              Found in includes/title/Title.php - About 2 hrs to fix

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

                    public function execute() {
                        $params = $this->extractRequestParams();
                
                        $prop = array_fill_keys( $params['prop'], true );
                
                
                Severity: Major
                Found in includes/api/ApiQueryTags.php - About 2 hrs to fix

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

                      public function execute() {
                          $params = $this->extractRequestParams();
                  
                          $config = $this->getConfig();
                          if ( !$config->get( MainConfigNames::Feed ) ) {
                  Severity: Major
                  Found in includes/api/ApiFeedContributions.php - About 2 hrs to fix

                    Method showForm has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function showForm( $oldName, $newName, $warnings, $reason, $moveChecked, $suppressChecked ) {
                            $performer = $this->getUser();
                    
                            $formDescriptor = [
                                'oldusername' => [
                    Severity: Major
                    Found in includes/specials/SpecialRenameUser.php - About 2 hrs to fix

                      Method detectVirus has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function detectVirus( $file ) {
                              global $wgOut;
                              $mainConfig = MediaWikiServices::getInstance()->getMainConfig();
                              $antivirus = $mainConfig->get( MainConfigNames::Antivirus );
                              $antivirusSetup = $mainConfig->get( MainConfigNames::AntivirusSetup );
                      Severity: Major
                      Found in includes/upload/UploadBase.php - About 2 hrs to fix

                        Method trackOrphanText has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function trackOrphanText() {
                                # Wait until the blob_tracking table is available in the replica DB
                                $dbw = $this->getPrimaryDB();
                                $dbr = $this->getReplicaDB();
                                $this->getServiceContainer()->getDBLoadBalancerFactory()->waitForReplication( [ 'timeout' => 100_000 ] );
                        Severity: Major
                        Found in maintenance/storage/trackBlobs.php - About 2 hrs to fix

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

                              public function execute() {
                                  $dbw = $this->getPrimaryDB();
                                  $config = $this->getConfig();
                                  $specialPageFactory = $this->getServiceContainer()->getSpecialPageFactory();
                          
                          
                          Severity: Major
                          Found in maintenance/updateSpecialPages.php - About 2 hrs to fix

                            FileOp has 25 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            abstract class FileOp {
                                /** @var FileBackendStore */
                                protected $backend;
                                /** @var LoggerInterface */
                                protected $logger;
                            Severity: Minor
                            Found in includes/libs/filebackend/fileop/FileOp.php - About 2 hrs to fix

                              SpecialWatchlist has 25 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class SpecialWatchlist extends ChangesListSpecialPage {
                                  /** @var array */
                                  public const WATCHLIST_TAB_PATHS = [
                                      'Special:Watchlist',
                                      'Special:EditWatchlist',
                              Severity: Minor
                              Found in includes/specials/SpecialWatchlist.php - About 2 hrs to fix

                                SpecialUpload has 25 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class SpecialUpload extends SpecialPage {
                                
                                    private LocalRepo $localRepo;
                                    private UserOptionsLookup $userOptionsLookup;
                                    private NamespaceInfo $nsInfo;
                                Severity: Minor
                                Found in includes/specials/SpecialUpload.php - About 2 hrs to fix

                                  Job has 25 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  abstract class Job implements RunnableJob {
                                      /** @var string */
                                      public $command;
                                  
                                      /** @var array Array of job parameters */
                                  Severity: Minor
                                  Found in includes/jobqueue/Job.php - About 2 hrs to fix

                                    ActorStore has 25 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class ActorStore implements UserIdentityLookup, ActorNormalization {
                                    
                                        public const UNKNOWN_USER_NAME = 'Unknown user';
                                    
                                        private const LOCAL_CACHE_SIZE = 100;
                                    Severity: Minor
                                    Found in includes/user/ActorStore.php - About 2 hrs to fix

                                      OldLocalFile has 25 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class OldLocalFile extends LocalFile {
                                          /** @var string|int Timestamp */
                                          protected $requestedTime;
                                      
                                          /** @var string Archive name */
                                      Severity: Minor
                                      Found in includes/filerepo/file/OldLocalFile.php - About 2 hrs to fix

                                        ParsoidHandler has 25 functions (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        abstract class ParsoidHandler extends Handler {
                                        
                                            private RevisionLookup $revisionLookup;
                                            protected SiteConfig $siteConfig;
                                            protected PageConfigFactory $pageConfigFactory;
                                        Severity: Minor
                                        Found in includes/Rest/Handler/ParsoidHandler.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language