wikimedia/mediawiki-extensions-Translate

View on GitHub

Showing 994 of 1,238 total issues

Method processGroups has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function processGroups( array $groups ): array {
        $fixedGroups = [];
        foreach ( $groups as $g ) {
            $name = $g['name'];

Severity: Minor
Found in src/MessageGroupConfiguration/PremadeMediaWikiExtensionGroups.php - About 1 hr to fix

    Method tuxLanguageSelector has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function tuxLanguageSelector(): string {
            if ( $this->options['language'] === $this->getConfig()->get( 'TranslateDocumentationLanguageCode' ) ) {
                $targetLangName = $this->msg( 'translate-documentation-language' )->text();
                $targetLanguage = $this->contentLanguage;
            } else {
    Severity: Minor
    Found in src/TranslatorInterface/TranslateSpecialPage.php - About 1 hr to fix

      Method makeGroupFacetRows has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function makeGroupFacetRows(
              array $groups,
              array $counts,
              int $level = 0,
              string $pathString = ''
      Severity: Minor
      Found in src/TtmServer/SearchTranslationsSpecialPage.php - About 1 hr to fix

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

            public function execute() {
                $name = $this->getOption( 'name', MessageChangeStorage::DEFAULT_NAME );
                if ( !MessageChangeStorage::isValidCdbName( $name ) ) {
                    $this->fatalError( 'Invalid name' );
                }
        Severity: Minor
        Found in src/Synchronization/ImportExternalTranslationsMaintenanceScript.php - About 1 hr to fix

          Method unflatten has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function unflatten( array $flat ): array {
                  $unflat = [];
          
                  if ( $this->parseCLDRPlurals ) {
                      $unflattenedPlurals = [];
          Severity: Minor
          Found in src/MessageProcessing/ArrayFlattener.php - About 1 hr to fix

            Method getIssues has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getIssues( Message $message, string $targetLanguage ): ValidationIssues {
                    $issues = new ValidationIssues();
            
                    // We skip certain validations if we don't know the expected keywords
                    $expectedKeywords = UnicodePlural::getPluralKeywords( $targetLanguage );
            Severity: Minor
            Found in src/Validation/Validators/UnicodePluralValidator.php - About 1 hr to fix

              Function setValues has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Color.prototype.setValues = function (space, vals) {
                  var values = this.values;
                  var spaces = this.spaces;
                  var maxes = this.maxes;
                  var alpha = 1;
              Severity: Minor
              Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                Function requestSelectHandler has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function requestSelectHandler( e ) {
                        var request = e.target,
                            $detailsPane = $( '.details.pane' ),
                            $requestCheckboxes = $( '.request-selector' ),
                            $selectAll = $( '.request-selector-all' ),
                Severity: Minor
                Found in resources/js/ext.translate.special.managetranslatorsandbox.js - About 1 hr to fix

                  Function hsv has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  convert.rgb.hsv = function (rgb) {
                      var rdif;
                      var gdif;
                      var bdif;
                      var h;
                  Severity: Minor
                  Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                    Function associate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function associate( event, subGroupId ) {
                            var $target = $( event.target ),
                                $parent = $target.parents( '.mw-tpa-group' ),
                                parentId = $parent.data( 'id' ),
                                subgroupName = $parent
                    Severity: Minor
                    Found in resources/js/ext.translate.special.aggregategroups.js - About 1 hr to fix

                      Function fitWithPointLabels has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function fitWithPointLabels(scale) {
                      
                          // Right, this is really confusing and there is a lot of maths going on here
                          // The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
                          //
                      Severity: Minor
                      Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                        Function update has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            update: function(config) {
                                var me = this;
                                var i, ilen;
                        
                                if (!config || typeof config !== 'object') {
                        Severity: Minor
                        Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                          Method submitRaw has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function submitRaw( array $data ): bool {
                                  $retainedLines = trim( $data['Titles'] );
                                  $retainedGroups = $retainedLines ? array_map( 'trim', explode( "\n", $retainedLines ) ) : [];
                                  $current = $this->messageGroupSubscription->getUserSubscriptions( $this->getUser() );
                          
                          
                          Severity: Minor
                          Found in src/PageTranslation/ManageMessageGroupSubscriptionsSpecialPage.php - About 1 hr to fix

                            Method getCommonFormFields has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function getCommonFormFields(): array {
                                    return [
                                        'wpOldTitle' => [
                                            'type' => 'text',
                                            'name' => 'wpOldTitle',
                            Severity: Minor
                            Found in src/PageTranslation/MoveTranslatableBundleSpecialPage.php - About 1 hr to fix

                              Method preventDirectEditing has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function preventDirectEditing( Title $title, User $user, $action, &$result ) {
                                      if ( self::$allowTargetEdit ) {
                                          return true;
                                      }
                              
                              
                              Severity: Minor
                              Found in src/PageTranslation/Hooks.php - About 1 hr to fix

                                Method hasCacheEntry has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function hasCacheEntry(
                                        MessageGroupCache $cache,
                                        MessageCollection $collection,
                                        string $messageKey
                                    ): bool {
                                Severity: Minor
                                Found in src/Synchronization/ExternalMessageSourceStateComparator.php - About 1 hr to fix

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

                                      public function execute() {
                                          $this->checkUserRightsAny( self::RIGHT );
                                          $block = $this->getUser()->getBlock();
                                          if ( $block && $block->isSitewide() ) {
                                              $this->dieBlocked( $block );
                                  Severity: Minor
                                  Found in src/Synchronization/ManageGroupSynchronizationCacheActionApi.php - About 1 hr to fix

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

                                        public function __construct() {
                                            parent::__construct();
                                            $this->addDescription( 'Script for processing message changes in file based message groups' );
                                            $this->addOption(
                                                'group',
                                    Severity: Minor
                                    Found in src/Synchronization/ImportExternalTranslationsMaintenanceScript.php - About 1 hr to fix

                                      Method onBeforeCreateEchoEvent has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function onBeforeCreateEchoEvent(
                                              array &$notifications,
                                              array &$notificationCategories,
                                              array &$notificationIcons
                                          ) {
                                      Severity: Minor
                                      Found in src/MessageGroupProcessing/MessageGroupSubscriptionHookHandler.php - About 1 hr to fix

                                        Method addForm has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function addForm(): void {
                                                $formDescriptor = [
                                                    'language' => [
                                                        'type' => 'text',
                                                        'name' => 'language',
                                        Severity: Minor
                                        Found in src/Statistics/LanguageStatsSpecialPage.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language