wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Method mergeHtmlMetaDataFrom has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function mergeHtmlMetaDataFrom( ParserOutput $source ): void {
        // HTML and HTTP
        $this->mHeadItems = self::mergeMixedList( $this->mHeadItems, $source->getHeadItems() );
        $this->addModules( $source->getModules() );
        $this->addModuleStyles( $source->getModuleStyles() );
Severity: Minor
Found in includes/parser/ParserOutput.php - About 1 hr to fix

    Method internalParse has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function internalParse( $text, $isMain = true, $frame = false ) {
            $origText = $text;
    
            # Hook to suspend the parser in this state
            if ( !$this->hookRunner->onParserBeforeInternalParse( $this, $text, $this->mStripState ) ) {
    Severity: Minor
    Found in includes/parser/Parser.php - About 1 hr to fix

      Method convertPageBundleVariant has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function convertPageBundleVariant(
              PageBundle $pageBundle,
              Bcp47Code $targetVariant,
              ?Bcp47Code $sourceVariant = null
          ): PageBundle {
      Severity: Minor
      Found in includes/parser/Parsoid/LanguageVariantConverter.php - About 1 hr to fix

        Method saveContent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function saveContent() {
                $logRestrictions = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::LogRestrictions );
        
                $dbw = MediaWikiServices::getInstance()->getConnectionProvider()->getPrimaryDatabase();
        
        
        Severity: Minor
        Found in includes/logging/LogPage.php - About 1 hr to fix

          Method insertNewUser has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private static function insertNewUser( callable $insertActor, $name, $params = [] ) {
                  foreach ( [ 'password', 'newpassword', 'newpass_time', 'password_expires' ] as $field ) {
                      if ( isset( $params[$field] ) ) {
                          wfDeprecated( __METHOD__ . " with param '$field'", '1.27' );
                          unset( $params[$field] );
          Severity: Minor
          Found in includes/user/User.php - About 1 hr to fix

            Method verifyFile has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function verifyFile() {
                    $config = MediaWikiServices::getInstance()->getMainConfig();
                    $verifyMimeType = $config->get( MainConfigNames::VerifyMimeType );
                    $disableUploadScriptChecks = $config->get( MainConfigNames::DisableUploadScriptChecks );
                    $status = $this->verifyPartialFile();
            Severity: Minor
            Found in includes/upload/UploadBase.php - About 1 hr to fix

              Method getHtml has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getHtml(): ParserOutput {
                      if ( $this->processedParserOutput ) {
                          return $this->processedParserOutput;
                      }
              
              
              Severity: Minor
              Found in includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php - About 1 hr to fix

                Method createNewContent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function createNewContent() {
                        $contentHandlerFactory = $this->contentHandlerFactory;
                
                        $title = $this->page->getTitle();
                        $latestRevRecord = $this->revLookup->getRevisionByTitle( $this->pageIdentity );
                Severity: Minor
                Found in includes/content/ContentModelChange.php - About 1 hr to fix

                  Method rebuildRecentChangesTablePass4 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function rebuildRecentChangesTablePass4() {
                          global $wgUseRCPatrol, $wgUseNPPatrol, $wgUseFilePatrol, $wgMiserMode;
                  
                          $dbw = $this->getPrimaryDB();
                  
                  
                  Severity: Minor
                  Found in maintenance/rebuildrecentchanges.php - About 1 hr to fix

                    Method getTextSpawnedOnce has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function getTextSpawnedOnce( $address ) {
                            if ( is_int( $address ) || intval( $address ) ) {
                                $address = SqlBlobStore::makeAddressFromTextId( (int)$address );
                            }
                    
                    
                    Severity: Minor
                    Found in maintenance/includes/TextPassDumper.php - About 1 hr to fix

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

                          public function execute() {
                              $user = $this->getOption( 'user' );
                              $services = $this->getServiceContainer();
                              $userNameUtils = $services->getUserNameUtils();
                              $user = $userNameUtils->isIP( $user ) ? $user : $userNameUtils->getCanonical( $user );
                      Severity: Minor
                      Found in maintenance/rollbackEdits.php - About 1 hr to fix

                        Method updateBatch has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function updateBatch( IResultWrapper $res ) {
                                if ( !$this->dryRun ) {
                                    $this->beginTransaction( $this->dbw, __METHOD__ );
                                }
                                foreach ( $res as $row ) {
                        Severity: Minor
                        Found in maintenance/updateCollation.php - About 1 hr to fix

                          Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  ServiceOptions $options,
                                  SpecialPageFactory $specialPageFactory,
                                  NamespaceInfo $nsInfo,
                                  GroupPermissionsLookup $groupPermissionsLookup,
                                  UserGroupManager $userGroupManager,
                          Severity: Major
                          Found in includes/Permissions/PermissionManager.php - About 1 hr to fix

                            Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    HookContainer $hookContainer,
                                    JobQueueGroup $jobQueueGroup,
                                    IConnectionProvider $dbProvider,
                                    ReadOnlyMode $readOnlyMode,
                                    RepoGroup $repoGroup,
                            Severity: Major
                            Found in includes/page/UndeletePage.php - About 1 hr to fix

                              Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      WebRequest $request,
                                      Config $config,
                                      ObjectFactory $objectFactory,
                                      HookContainer $hookContainer,
                                      ReadOnlyMode $readOnlyMode,
                              Severity: Major
                              Found in includes/auth/AuthManager.php - About 1 hr to fix

                                Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        Config $config,
                                        LinkRenderer $linkRenderer,
                                        PermissionManager $permManager,
                                        UserNameUtils $userNameUtils,
                                        TempUserCreator $tempUserCreator,
                                Severity: Major
                                Found in includes/editpage/IntroMessageBuilder.php - About 1 hr to fix

                                  Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          UserIdentity $author,
                                          PageIdentity $page,
                                          DerivedPageDataUpdater $derivedDataUpdater,
                                          IConnectionProvider $dbProvider,
                                          RevisionStore $revisionStore,
                                  Severity: Major
                                  Found in includes/Storage/PageUpdater.php - About 1 hr to fix

                                    Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            ServiceOptions $options,
                                            Language $contLang,
                                            AuthManager $authManager,
                                            LinkRenderer $linkRenderer,
                                            NamespaceInfo $nsInfo,
                                    Severity: Major
                                    Found in includes/preferences/DefaultPreferencesFactory.php - About 1 hr to fix

                                      Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              PermissionManager $permissionManager,
                                              RevisionStore $revisionStore,
                                              RevisionRenderer $revisionRenderer,
                                              IContentHandlerFactory $contentHandlerFactory,
                                              NameTableStore $changeTagDefStore,
                                      Severity: Major
                                      Found in includes/specials/SpecialUndelete.php - About 1 hr to fix

                                        Method __construct has 15 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                                ParsoidOutputStash $parsoidOutputStash,
                                                StatsdDataFactoryInterface $statsDataFactory,
                                                ParserOutputAccess $parserOutputAccess,
                                                PageLookup $pageLookup,
                                                RevisionLookup $revisionLookup,
                                        Severity: Major
                                        Found in includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language