wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

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

    final public function cancelAtomic(
        $fname = __METHOD__,
        AtomicSectionIdentifier $sectionId = null
    ) {
        $this->transactionManager->onCancelAtomicBeforeCriticalSection( $this, $fname );
Severity: Major
Found in includes/libs/rdbms/database/Database.php - About 2 hrs to fix

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

        protected function open( $server, $user, $password, $db, $schema, $tablePrefix ) {
            if ( !function_exists( 'pg_connect' ) ) {
                throw $this->newExceptionAfterConnectError(
                    "Postgres functions missing, have you compiled PHP with the --with-pgsql\n" .
                    "option? (Note: if you recently installed PHP, you may need to restart your\n" .
    Severity: Major
    Found in includes/libs/rdbms/database/DatabasePostgres.php - About 2 hrs to fix

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

          private function reuseOrOpenConnectionForNewRef( $i, DatabaseDomain $domain, $flags = 0 ) {
              // Figure out which connection pool to use based on the flags
              if ( $this->fieldHasBit( $flags, self::CONN_UNTRACKED_GAUGE ) ) {
                  // Use low timeouts, use autocommit mode, ignore transaction rounds
                  $category = self::CATEGORY_GAUGE;
      Severity: Major
      Found in includes/libs/rdbms/loadbalancer/LoadBalancer.php - About 2 hrs to fix

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

            public function doAutoblock( DatabaseBlock $parentBlock, $autoblockIP ) {
                // If autoblocks are disabled, go away.
                if ( !$parentBlock->isAutoblocking() ) {
                    return false;
                }
        Severity: Major
        Found in includes/block/DatabaseBlockStore.php - About 2 hrs to fix

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

              public function __construct(
                  LinkRenderer $linkRenderer,
                  LinkBatchFactory $linkBatchFactory,
                  HookContainer $hookContainer,
                  RevisionStore $revisionStore,
          Severity: Major
          Found in includes/pager/ContributionsPager.php - About 2 hrs to fix

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

                public function getInputHTML( $value ) {
                    $html = '';
                    $tableContents = '';
                    $rows = $this->mParams['rows'];
                    $columns = $this->mParams['columns'];
            Severity: Major
            Found in includes/htmlform/fields/HTMLCheckMatrix.php - About 2 hrs to fix

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

                  public function modifyDisplayQueryBuilder(
                      SelectQueryBuilder $queryBuilder,
                      $table,
                      $filter_tag = '',
                      bool $exclude = false
              Severity: Major
              Found in includes/changetags/ChangeTagsStore.php - About 2 hrs to fix

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

                function wfThumbIsStandard( File $file, array $params ) {
                    global $wgThumbLimits, $wgImageLimits, $wgResponsiveImages;
                
                    $multipliers = [ 1 ];
                    if ( $wgResponsiveImages ) {
                Severity: Major
                Found in includes/GlobalFunctions.php - About 2 hrs to fix

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

                      protected function trySubmit() {
                          $status = false;
                  
                          $form = $this->getAuthForm( $this->authRequests, $this->authAction );
                          $form->setSubmitCallback( [ $this, 'handleFormSubmit' ] );
                  Severity: Major
                  Found in includes/specialpage/AuthManagerSpecialPage.php - About 2 hrs to fix

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

                        protected function registerFilters() {
                            $this->registerFiltersFromDefinitions( $this->filterGroupDefinitions );
                    
                            // Make sure this is not being transcluded (we don't want to show this
                            // information to all users just because the user that saves the edit can
                    Severity: Major
                    Found in includes/specialpage/ChangesListSpecialPage.php - About 2 hrs to fix

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

                          public function execute() {
                              global $wgLang;
                              $r = $this->parent->request;
                              $userLang = $r->getVal( 'uselang' );
                              $contLang = $r->getVal( 'ContLang' );
                      Severity: Major
                      Found in includes/installer/WebInstallerLanguage.php - About 2 hrs to fix

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

                            public function execute() {
                                $this->mParams = $this->extractRequestParams();
                        
                                // Instantiate requested modules
                                $allModules = [];
                        Severity: Major
                        Found in includes/api/ApiQuery.php - About 2 hrs to fix

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

                              public function load() {
                                  $this->loadStatus = new Status();
                          
                                  $request = $this->getRequest();
                                  $this->searchEngineType = $request->getVal( 'srbackend' );
                          Severity: Major
                          Found in includes/specials/SpecialSearch.php - About 2 hrs to fix

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

                                protected function getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) {
                                    # Initialize form
                                    $form = new UploadForm(
                                        [
                                            'watch' => $this->getWatchCheck(),
                            Severity: Major
                            Found in includes/specials/SpecialUpload.php - About 2 hrs to fix

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

                                  private function cleanUpTocLine( Node $container ) {
                                      '@phan-var Element|DocumentFragment $container';  // @var Element|DocumentFragment $container
                                      # Strip out HTML
                                      # Allowed tags are:
                                      # * <sup> and <sub> (T10393)
                              Severity: Major
                              Found in includes/parser/Parser.php - About 2 hrs to fix

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

                                    public function upload( $src, $comment, $pageText, $flags = 0, $props = false,
                                        $timestamp = false, Authority $uploader = null, $tags = [],
                                        $createNullRevision = true, $revert = false
                                    ) {
                                        if ( $this->getRepo()->getReadOnlyReason() !== false ) {
                                Severity: Major
                                Found in includes/filerepo/file/LocalFile.php - About 2 hrs to fix

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

                                      protected function pb2pb( array $attribs ) {
                                          $opts = $attribs['opts'];
                                  
                                          $revision = $opts['previous'] ?? $opts['original'] ?? null;
                                          if ( !isset( $revision['html'] ) ) {
                                  Severity: Major
                                  Found in includes/Rest/Handler/ParsoidHandler.php - About 2 hrs to fix

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

                                        public function getJsData() {
                                            $output = [
                                                'name' => $this->name,
                                                'type' => $this->type,
                                                'fullCoverage' => $this->isFullCoverage,
                                    Severity: Major
                                    Found in includes/recentchanges/ChangesListFilterGroup.php - About 2 hrs to fix

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

                                          public static function buildItems( $rows ) {
                                              $items = [];
                                      
                                              # Merge adjacent edits by one user
                                              $sorted = [];
                                      Severity: Major
                                      Found in includes/recentchanges/ChangesFeed.php - About 2 hrs to fix

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

                                            public function start() {
                                                // Trap SIGTERM
                                                pcntl_signal( SIGTERM, [ $this, 'handleTermSignal' ], false );
                                        
                                                do {
                                        Severity: Major
                                        Found in maintenance/includes/ForkController.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language