luyadev/luya-module-admin

View on GitHub

Showing 503 of 503 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    $('#twofaForm').submit(function (e) {
        $('#errorsSecureContainer').hide();
        $('.login-btn[type="submit"]').attr('disabled', true);
        $('.login-spinner').show();
        $('.login-btn-label').hide();
Severity: Major
Found in src/resources/js/login.js and 1 other location - About 2 days to fix
src/resources/js/login.js on lines 55..90

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 365.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File angular-datepicker.js has 789 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*global angular document navigator*/
(function withAngular(angular, navigator) {

  'use strict';

Severity: Major
Found in src/resources/vendorlibs/angularjs-datepicker/angular-datepicker.js - About 1 day to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) {    return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
    Severity: Major
    Found in src/resources/angular-i18n/angular-locale_ua.js and 1 other location - About 1 day to fix
    src/resources/angular-i18n/angular-locale_ru.js on lines 126..126

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 264.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) {    return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
    Severity: Major
    Found in src/resources/angular-i18n/angular-locale_ru.js and 1 other location - About 1 day to fix
    src/resources/angular-i18n/angular-locale_ua.js on lines 141..141

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 264.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File admin.php has 508 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    return [
        'language_name' => 'Русский',
        'button_save' => 'Сохранить',
    Severity: Major
    Found in src/messages/ru/admin.php - About 1 day to fix

      File admin.php has 508 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      return [
          'language_name' => 'Português',
          'button_save' => 'Salvar',
      Severity: Major
      Found in src/messages/pt/admin.php - About 1 day to fix

        File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        return [
            'language_name' => 'Deutsch',
            'button_save' => 'Speichern',
        Severity: Major
        Found in src/messages/de/admin.php - About 1 day to fix

          File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          return [
              'language_name' => 'Ελληνικά',
              'button_save' => 'Αποθήκευση',
          Severity: Major
          Found in src/messages/el/admin.php - About 1 day to fix

            File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            return [
                'language_name' => '中文',
                'button_save' => '保存',
            Severity: Major
            Found in src/messages/cn/admin.php - About 1 day to fix

              File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              return [
                  'language_name' => 'Български',
                  'button_save' => 'Запазване',
              Severity: Major
              Found in src/messages/bg/admin.php - About 1 day to fix

                File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                return [
                    'language_name' => 'English',
                    'button_save' => 'Save',
                Severity: Major
                Found in src/messages/en/admin.php - About 1 day to fix

                  File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  return [
                      'language_name' => 'Türkçe',
                      'button_save' => 'Kaydet',
                  Severity: Major
                  Found in src/messages/tr/admin.php - About 1 day to fix

                    File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    return [
                        'language_name' => 'Bahasa',
                        'button_save' => 'Simpan',
                    Severity: Major
                    Found in src/messages/id/admin.php - About 1 day to fix

                      File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      return [
                          'language_name' => 'angol',
                          'button_save' => 'Mentés',
                      Severity: Major
                      Found in src/messages/hu/admin.php - About 1 day to fix

                        File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        return [
                            'language_name' => 'Việt Nam',
                            'button_save' => 'Lưu',
                        Severity: Major
                        Found in src/messages/vi/admin.php - About 1 day to fix

                          File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          return [
                              'language_name' => 'ภาษาไทย',
                              'button_save' => 'บันทึก',
                          Severity: Major
                          Found in src/messages/th/admin.php - About 1 day to fix

                            File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            return [
                                'language_name' => 'Italiano',
                                'button_save' => 'Salva',
                            Severity: Major
                            Found in src/messages/it/admin.php - About 1 day to fix

                              File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              
                              return [
                                  /** Start::No translation **/
                                  'layout_debug_assetmanager_forcecopy' => 'AssetManager forceCopy',
                              Severity: Major
                              Found in src/messages/fr/admin.php - About 1 day to fix

                                File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                
                                return [
                                    'language_name' => 'Polski',
                                    'button_save' => 'Zapisz',
                                Severity: Major
                                Found in src/messages/pl/admin.php - About 1 day to fix

                                  File admin.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  <?php
                                  
                                  return [
                                      'language_name' => 'Dutch',
                                      'button_save' => 'Opslaan',
                                  Severity: Major
                                  Found in src/messages/nl/admin.php - About 1 day to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language