wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Method configure has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function configure( array $params ): void {
        $this->localDomain = isset( $params['localDomain'] )
            ? DatabaseDomain::newFromId( $params['localDomain'] )
            : DatabaseDomain::newUnspecified();

Severity: Major
Found in includes/libs/rdbms/loadbalancer/LoadBalancer.php - About 2 hrs to fix

    Method placeBlockUnsafe has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function placeBlockUnsafe( bool $reblock = false ): Status {
            $status = $this->blockUtils->validateTarget( $this->target );
    
            if ( !$status->isOK() ) {
                $this->logger->debug( 'placeBlockUnsafe: invalid target' );
    Severity: Major
    Found in includes/block/BlockUser.php - About 2 hrs to fix

      Method getAction has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getAction(
              string $actionName,
              $article,
              IContextSource $context
          ) {
      Severity: Major
      Found in includes/actions/ActionFactory.php - About 2 hrs to fix

        Method getCategoryLinks has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getCategoryLinks() {
                $out = $this->getOutput();
                $allCats = $out->getCategoryLinks();
                $title = $this->getTitle();
                $services = MediaWikiServices::getInstance();
        Severity: Major
        Found in includes/skins/Skin.php - About 2 hrs to fix

          Method tryEndExpect has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function tryEndExpect( $token ) {
                  // @phan-suppress-next-line PhanTypeArraySuspiciousNullable
                  switch ( $this->startToken[0] ) {
                      case T_DOUBLE_COLON:
                          // Skip over T_CLASS after T_DOUBLE_COLON because this is something like
          Severity: Major
          Found in includes/utils/ClassCollector.php - About 2 hrs to fix

            Method parseFlags has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function parseFlags() {
                    $text = $this->mText;
                    $flags = [];
                    $variantFlags = [];
            
            
            Severity: Major
            Found in includes/language/ConverterRule.php - About 2 hrs to fix

              Method parseRules has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function parseRules() {
                      $rules = $this->mRules;
                      $bidtable = [];
                      $unidtable = [];
                      $varsep_pattern = $this->mConverter->getVarSeparatorPattern();
              Severity: Major
              Found in includes/language/ConverterRule.php - About 2 hrs to fix

                Method getSearchResultData has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function getSearchResultData( SearchResult $result, $prop ) {
                        // Silently skip broken and missing titles
                        if ( $result->isBrokenTitle() || $result->isMissingRevision() ) {
                            return null;
                        }
                Severity: Major
                Found in includes/api/ApiQuerySearch.php - About 2 hrs to fix

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

                      public function getAllowedParams() {
                          $params = [
                              'filename' => [
                                  ParamValidator::PARAM_TYPE => 'string',
                              ],
                  Severity: Major
                  Found in includes/api/ApiUpload.php - About 2 hrs to fix

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

                        public function getAllowedParams() {
                            return [
                                'continue' => [
                                    ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
                                ],
                    Severity: Major
                    Found in includes/api/ApiQueryWatchlistRaw.php - About 2 hrs to fix

                      Method loadRedirectTargets has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function loadRedirectTargets() {
                              $titlesToResolve = [];
                              $db = $this->getDB();
                      
                              if ( $this->mPendingRedirectIDs ) {
                      Severity: Major
                      Found in includes/api/ApiPageSet.php - About 2 hrs to fix

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

                            public function execute() {
                                $params = $this->extractRequestParams();
                                $authority = $this->getAuthority();
                        
                                // make sure the user is allowed
                        Severity: Major
                        Found in includes/api/ApiManageTags.php - About 2 hrs to fix

                          Method fetchBlobs has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function fetchBlobs( array $keys, bool $getCasToken = false ) {
                                  /** @noinspection PhpUnusedLocalVariableInspection */
                                  $silenceScope = $this->silenceTransactionProfiler();
                          
                                  // Initialize order-preserved per-key results; set values for live keys below
                          Severity: Major
                          Found in includes/objectcache/SqlBagOStuff.php - About 2 hrs to fix

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

                                public function execute( $par ) {
                                    $this->useTransactionalTimeLimit();
                            
                                    $user = $this->getUser();
                            
                            
                            Severity: Major
                            Found in includes/specials/SpecialUndelete.php - About 2 hrs to fix

                              Method sendCacheControl has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function sendCacheControl() {
                                      $response = $this->getRequest()->response();
                                      $config = $this->getConfig();
                              
                                      $this->addVaryHeader( 'Cookie' );
                              Severity: Major
                              Found in includes/Output/OutputPage.php - About 2 hrs to fix

                                Method checkCondition has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function checkCondition( array $cond, User $user ): bool {
                                        if ( count( $cond ) < 1 ) {
                                            return false;
                                        }
                                
                                
                                Severity: Major
                                Found in includes/user/UserGroupManager.php - About 2 hrs to fix

                                  Method getShowHideLinks has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function getShowHideLinks( $row ) {
                                          // We don't want to see the links and
                                          if ( $this->flags == self::NO_ACTION_LINK ) {
                                              return '';
                                          }
                                  Severity: Major
                                  Found in includes/logging/LogEventsList.php - About 2 hrs to fix

                                    Method getThumbnailSource has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getThumbnailSource( $params ) {
                                            if ( $this->repo
                                                && $this->getHandler()->supportsBucketing()
                                                && isset( $params['physicalWidth'] )
                                            ) {
                                    Severity: Major
                                    Found in includes/filerepo/file/File.php - About 2 hrs to fix

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

                                          public function execute(): Response {
                                              $request = $this->getRequest();
                                              $from = $request->getPathParam( 'from' );
                                              $format = $request->getPathParam( 'format' );
                                      
                                      
                                      Severity: Major
                                      Found in includes/Rest/Handler/TransformHandler.php - About 2 hrs to fix

                                        Method checkPreconditions has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function checkPreconditions( RequestInterface $request ) {
                                                $parser = new IfNoneMatch;
                                                if ( $this->eTag !== null ) {
                                                    $resourceTag = $parser->parseETag( $this->eTag );
                                                    if ( !$resourceTag ) {
                                        Severity: Major
                                        Found in includes/Rest/ConditionalHeaderUtil.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language