wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Method loadAsComponents has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function loadAsComponents( bool $inlineReferences = false ): array {
        $schemas = [];
        $defs = [];
        $obsolete = [];

Severity: Minor
Found in includes/Settings/Source/ReflectionSchemaSource.php - About 1 hr to fix

    Method showProtectionIndicator has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function showProtectionIndicator(): void {
            $title = $this->getTitle();
            $context = $this->getContext();
            $outputPage = $context->getOutput();
    
    
    Severity: Minor
    Found in includes/page/Article.php - About 1 hr to fix

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

          public function load(): array {
              $key = $this->cache->makeGlobalKey(
                  __CLASS__,
                  $this->source->getHashKey()
              );
      Severity: Minor
      Found in includes/Settings/Cache/CachedSource.php - About 1 hr to fix

        Method showRedirectedFromHeader has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function showRedirectedFromHeader() {
                $context = $this->getContext();
                $redirectSources = $context->getConfig()->get( MainConfigNames::RedirectSources );
                $outputPage = $context->getOutput();
                $request = $context->getRequest();
        Severity: Minor
        Found in includes/page/Article.php - About 1 hr to fix

          Method getPreloadLinks has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getPreloadLinks( Context $context ): array {
                  if ( !in_array( 'logo', $this->features ) ) {
                      return [];
                  }
          
          
          Severity: Minor
          Found in includes/ResourceLoader/SkinModule.php - About 1 hr to fix

            Method handleExtensionDependency has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function handleExtensionDependency( $dependencyName, $constraint, $checkedExt,
                    $type
                ) {
                    // Check if the dependency is even installed
                    if ( !isset( $this->loaded[$dependencyName] ) ) {
            Severity: Minor
            Found in includes/registration/VersionChecker.php - About 1 hr to fix

              Method combineSlotOutput has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function combineSlotOutput( RenderedRevision $rrev, ParserOptions $options, array $hints = [] ) {
                      $revision = $rrev->getRevision();
                      $slots = $revision->getSlots()->getSlots();
              
                      $withHtml = $hints['generate-html'] ?? true;
              Severity: Minor
              Found in includes/Revision/RevisionRenderer.php - About 1 hr to fix

                Method stripComments has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function stripComments( $json ) {
                        // Ensure we have a string
                        $str = (string)$json;
                        $buffer = '';
                        $maxLen = strlen( $str );
                Severity: Minor
                Found in includes/json/FormatJson.php - About 1 hr to fix

                  Method factorCondsWithCommonFields has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function factorCondsWithCommonFields( $condsArray ) {
                          $first = $condsArray[array_key_first( $condsArray )];
                          if ( count( $first ) === 1 ) {
                              // IN clause
                              $field = array_key_first( $first );
                  Severity: Minor
                  Found in includes/libs/rdbms/platform/SQLPlatform.php - About 1 hr to fix

                    Method tabAction has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function tabAction( $title, $message, $selected, $query = '', $checkEdit = false ) {
                            $classes = [];
                            if ( $selected ) {
                                $classes[] = 'selected';
                            }
                    Severity: Minor
                    Found in includes/skins/SkinTemplate.php - About 1 hr to fix

                      Method compile has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function compile( $templateName ) {
                              $filename = $this->getTemplateFilename( $templateName );
                      
                              if ( !file_exists( $filename ) ) {
                                  throw new RuntimeException( "Could not find template `{$templateName}` at {$filename}" );
                      Severity: Minor
                      Found in includes/Html/TemplateParser.php - About 1 hr to fix

                        Method onView has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function onView() {
                                $this->getOutput()->addModuleStyles( [
                                    'mediawiki.interface.helpers.styles',
                                    'mediawiki.action.styles',
                                ] );
                        Severity: Minor
                        Found in includes/actions/InfoAction.php - About 1 hr to fix

                          Method loadSites has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              protected function loadSites() {
                                  $this->sites = new SiteList();
                          
                                  $dbr = $this->dbProvider->getReplicaDatabase();
                          
                          
                          Severity: Minor
                          Found in includes/site/DBSiteStore.php - About 1 hr to fix

                            Method run has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function run( $resultPageSet = null ) {
                                    $params = $this->extractRequestParams();
                                    $search = $params['search'];
                                    $limit = $params['limit'];
                                    $offset = $params['offset'];
                            Severity: Minor
                            Found in includes/api/ApiQueryPrefixSearch.php - About 1 hr to fix

                              Method patch has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function patch( $base, $diff ) {
                                      if ( function_exists( 'xdiff_string_bpatch' ) ) {
                                          return xdiff_string_bpatch( $base, $diff );
                                      }
                              
                              
                              Severity: Minor
                              Found in includes/historyblob/DiffHistoryBlob.php - About 1 hr to fix

                                Method recordCondition has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function recordCondition(
                                        DataMessageValue $message, $name, $value, array $settings, array $options
                                    ) {
                                        /** @var \ApiBase $module */
                                        $module = $options['module'];
                                Severity: Minor
                                Found in includes/api/Validator/ApiParamValidatorCallbacks.php - About 1 hr to fix

                                  Method mergeThumbParams has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function mergeThumbParams( $image, $thumbParams, $otherParams ) {
                                          if ( $thumbParams === null ) {
                                              // No scaling requested
                                              return null;
                                          }
                                  Severity: Minor
                                  Found in includes/api/ApiQueryImageInfo.php - About 1 hr to fix

                                    Method checkRequiredPHPVersion has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function checkRequiredPHPVersion() {
                                            $minimumVersion = '7.4.3';
                                    
                                            /**
                                             * This is a list of known-bad ranges of PHP versions. Syntax is like SemVer – either:
                                    Severity: Minor
                                    Found in includes/PHPVersionCheck.php - About 1 hr to fix

                                      Method modifyTableSpecificBlobsForCas has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function modifyTableSpecificBlobsForCas(
                                              IDatabase $db,
                                              string $ptable,
                                              float $mtime,
                                              array $argsByKey,
                                      Severity: Minor
                                      Found in includes/objectcache/SqlBagOStuff.php - About 1 hr to fix

                                        Method outputHTMLForm has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function outputHTMLForm( $namespace = NS_MAIN,
                                                $from = '', $to = '', $hideRedirects = false
                                            ) {
                                                $miserMode = (bool)$this->getConfig()->get( MainConfigNames::MiserMode );
                                                $formDescriptor = [
                                        Severity: Minor
                                        Found in includes/specials/SpecialAllPages.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language