wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

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

    public static function makeSearchButtonInternal( $mode, $searchData, $attrs = [] ) {
        switch ( $mode ) {
            case 'go':
                $attrs['value'] ??= wfMessage( 'searcharticle' )->text();
                return Html::element(
Severity: Minor
Found in includes/skins/SkinTemplate.php - About 1 hr to fix

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

        private function subPageSubtitleInternal() {
            $services = MediaWikiServices::getInstance();
            $linkRenderer = $services->getLinkRenderer();
            $out = $this->getOutput();
            $title = $out->getTitle();
    Severity: Minor
    Found in includes/skins/Skin.php - About 1 hr to fix

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

          public function getInputHTML( $value ) {
              if ( !$this->isPersistent() ) {
                  $value = '';
              }
      
      
      Severity: Minor
      Found in includes/htmlform/fields/HTMLTextField.php - About 1 hr to fix

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

            protected function generateSkinOptions( User $user, IContextSource $context, array $validSkinNames ) {
                $ret = [];
        
                $mptitle = Title::newMainPage();
                $previewtext = $context->msg( 'skin-preview' )->escaped();
        Severity: Minor
        Found in includes/preferences/DefaultPreferencesFactory.php - About 1 hr to fix

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

              private function parsoidTransform(
                  ParserOutput $po, ?ParserOptions $popts, array &$options
              ): ParserOutput {
                  // TODO will use HTMLHolder in the future
                  $doc = null;
          Severity: Minor
          Found in includes/OutputTransform/ContentDOMTransformStage.php - About 1 hr to fix

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

                protected function mainLoginForm( array $requests, $msg = '', $msgtype = 'error' ) {
                    $user = $this->getUser();
                    $out = $this->getOutput();
            
                    // FIXME how to handle empty $requests - restart, or no form, just an error message?
            Severity: Minor
            Found in includes/specialpage/LoginSignupSpecialPage.php - About 1 hr to fix

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

                  public function execute() {
                      $this->useTransactionalTimeLimit();
              
                      $user = $this->getUser();
                      $params = $this->extractRequestParams();
              Severity: Minor
              Found in includes/api/ApiRollback.php - About 1 hr to fix

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

                    public function getAllowedParams() {
                        $retval = [
                            'title' => [
                                ParamValidator::PARAM_TYPE => 'string',
                            ],
                Severity: Minor
                Found in includes/api/ApiQueryBacklinks.php - About 1 hr to fix

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

                      public function __construct(
                          ApiQuery $query,
                          $moduleName,
                          NamespaceInfo $namespaceInfo,
                          GenderCache $genderCache,
                  Severity: Minor
                  Found in includes/api/ApiQueryAllLinks.php - About 1 hr to fix

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

                        private function getBlockDetails(
                            Block $block,
                            $language = null
                        ) {
                            $language ??= $this->getLanguage();
                    Severity: Minor
                    Found in includes/api/ApiBlockInfoTrait.php - About 1 hr to fix

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

                          public function getAllowedParams( $flags = 0 ) {
                              $result = [
                                  'titles' => [
                                      ParamValidator::PARAM_ISMULTI => true,
                                      ApiBase::PARAM_HELP_MSG => 'api-pageset-param-titles',
                      Severity: Minor
                      Found in includes/api/ApiPageSet.php - About 1 hr to fix

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

                            public function execute( $par ) {
                                $this->setHeaders();
                                $this->outputHeader();
                                $this->getOutput()->addModuleStyles( 'mediawiki.special' );
                                $this->addHelpLink( 'Help:Protected_pages' );
                        Severity: Minor
                        Found in includes/specials/SpecialProtectedPages.php - About 1 hr to fix

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

                              public function execute( $par ) {
                                  $request = $this->getRequest();
                                  $out = $this->getOutput();
                          
                                  // Fetch the search term
                          Severity: Minor
                          Found in includes/specials/SpecialSearch.php - About 1 hr to fix

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

                                public function execute( $sub ) {
                                    $this->setHeaders();
                                    $out = $this->getOutput();
                                    $this->addHelpLink( 'Help:RestSandbox' );
                            
                            
                            Severity: Minor
                            Found in includes/specials/SpecialRestSandbox.php - About 1 hr to fix

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

                                  private function getClientSideLibraries() {
                                      $this->addTocSubSection( $this->msg( 'version-libraries-client' )->text(), 'mw-version-libraries-client' );
                              
                                      $out = Html::element(
                                          'h3',
                              Severity: Minor
                              Found in includes/specials/SpecialVersion.php - About 1 hr to fix

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

                                    private function dispatch() {
                                        // the various namespaces supported by Special:Redirect
                                        switch ( $this->mType ) {
                                            case 'user':
                                                $status = $this->dispatchUser();
                                Severity: Minor
                                Found in includes/specials/SpecialRedirect.php - About 1 hr to fix

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

                                      public function __construct(
                                          IContextSource $context,
                                          HookContainer $hookContainer,
                                          LinkBatchFactory $linkBatchFactory,
                                          IConnectionProvider $dbProvider,
                                  Severity: Minor
                                  Found in includes/specials/pagers/UsersPager.php - About 1 hr to fix

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

                                        private function getImageParams( $handler ) {
                                            if ( $handler ) {
                                                $handlerClass = get_class( $handler );
                                            } else {
                                                $handlerClass = '';
                                    Severity: Minor
                                    Found in includes/parser/Parser.php - About 1 hr to fix

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

                                          private function handleDoubleUnderscore( $text ) {
                                              # The position of __TOC__ needs to be recorded
                                              $mw = $this->magicWordFactory->get( 'toc' );
                                              if ( $mw->match( $text ) ) {
                                                  $this->mShowToc = true;
                                      Severity: Minor
                                      Found in includes/parser/Parser.php - About 1 hr to fix

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

                                            protected function doBatchPush( array $jobs, $flags ) {
                                                // Convert the jobs into field maps (de-duplicated against each other)
                                                $items = []; // (job ID => job fields map)
                                                foreach ( $jobs as $job ) {
                                                    $item = $this->getNewJobFields( $job );
                                        Severity: Minor
                                        Found in includes/jobqueue/JobQueueRedis.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language