luyadev/luya-module-admin

View on GitHub

Showing 331 of 503 total issues

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/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/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' => '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 [
                /** 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 506 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                return [
                    'language_name' => 'Español',
                    'button_save' => 'Guardar',
                Severity: Major
                Found in src/messages/es/admin.php - About 1 day to fix

                  File Api.php has 505 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  namespace luya\admin\ngrest\base;
                  
                  use luya\admin\base\RestActiveController;
                  Severity: Major
                  Found in src/ngrest/base/Api.php - About 1 day to fix

                    File _angulardirectives.php has 499 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    use luya\admin\Module as Admin;
                    
                    ?>
                    <div class="loading-overlay" ng-if="LuyaLoading.getState()">
                    Severity: Minor
                    Found in src/views/layouts/_angulardirectives.php - About 1 day to fix

                      Function getModules has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getModules()
                          {
                              if ($this->_modules !== null) {
                                  return $this->_modules;
                              }
                      Severity: Minor
                      Found in src/components/AdminMenu.php - About 7 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      NgRestModel has 51 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      abstract class NgRestModel extends ActiveRecord implements GenericSearchInterface, NgRestModelInterface
                      {
                          /**
                           * @var string This event will be trigger after the find population of each row when ngrest loads the data from the server to edit data. (When click on edit icon)
                           */
                      Severity: Major
                      Found in src/ngrest/base/NgRestModel.php - About 7 hrs to fix

                        File NgRestModel.php has 454 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        namespace luya\admin\ngrest\base;
                        
                        use luya\admin\base\GenericSearchInterface;
                        Severity: Minor
                        Found in src/ngrest/base/NgRestModel.php - About 6 hrs to fix

                          File main.php has 446 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          use luya\admin\Module as Admin;
                          use luya\helpers\Url;
                          
                          $user = Yii::$app->adminuser->getIdentity();
                          Severity: Minor
                          Found in src/views/layouts/main.php - About 6 hrs to fix

                            Function getModuleItems has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getModuleItems($nodeId)
                                {
                                    if (isset($this->_nodeItems[$nodeId])) {
                                        return $this->_nodeItems[$nodeId];
                                    }
                            Severity: Minor
                            Found in src/components/AdminMenu.php - About 6 hrs to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Config has 45 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class Config extends BaseObject implements ConfigInterface
                            {
                                private $_model;
                            
                                /**
                            Severity: Minor
                            Found in src/ngrest/Config.php - About 6 hrs to fix

                              File BaseFileSystemStorage.php has 421 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              
                              namespace luya\admin\storage;
                              
                              use luya\admin\events\FileEvent;
                              Severity: Minor
                              Found in src/storage/BaseFileSystemStorage.php - About 6 hrs to fix

                                File RenderCrud.php has 419 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                
                                namespace luya\admin\ngrest\render;
                                
                                use luya\admin\components\Auth;
                                Severity: Minor
                                Found in src/ngrest/render/RenderCrud.php - About 6 hrs to fix

                                  Function observeLogin has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  var observeLogin = function (form, url, secureUrl, twoFaUrl) {
                                  
                                      $(form).submit(function (e) {
                                          $('#errorsContainer').hide();
                                          $('.login-btn[type="submit"]').attr('disabled', true);
                                  Severity: Major
                                  Found in src/resources/js/login.js - About 5 hrs to fix

                                    RenderCrud has 41 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class RenderCrud extends Render implements ViewContextInterface, RenderCrudInterface
                                    {
                                        public const TYPE_LIST = 'list';
                                    
                                        public const TYPE_CREATE = 'create';
                                    Severity: Minor
                                    Found in src/ngrest/render/RenderCrud.php - About 5 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language