HaaseIT/HCSF

View on GitHub

Showing 151 of 151 total issues

Function preparePage has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
Open

    public function preparePage()
    {
        $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager);
        $this->P->cb_pagetype = 'content';

Severity: Minor
Found in src/Controller/Shop/Updatecart.php - About 2 days 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

Function getPage has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring.
Open

    public function getPage()
    {
        // Maintenance page
        if ($this->config->getCore('maintenancemode')) {
            try {
Severity: Minor
Found in src/Router.php - About 1 day 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

Method handleShopAdmin has 235 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function handleShopAdmin($CSA)
    {
        $aSData = [];
        $aData = [];
        $getaction = filter_input(INPUT_GET, 'action');
Severity: Major
Found in src/Controller/Admin/Shop/Shopadmin.php - About 1 day to fix

    Function handleShopAdmin has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
    Open

        private function handleShopAdmin($CSA)
        {
            $aSData = [];
            $aData = [];
            $getaction = filter_input(INPUT_GET, 'action');
    Severity: Minor
    Found in src/Controller/Admin/Shop/Shopadmin.php - About 1 day 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

    Function preparePage has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
    Open

        public function preparePage()
        {
            $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager);
            $this->P->cb_pagetype = 'content';
    
    
    Severity: Minor
    Found in src/Controller/Customer/Userhome.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

    File Helper.php has 428 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /*
        HCSF - A multilingual CMS and Shopsystem
        Copyright (C) 2014  Marcus Haase - mail@marcus.haase.name
    Severity: Minor
    Found in src/Shop/Helper.php - About 6 hrs to fix

      Function handleCustomerAdmin has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
      Open

          private function handleCustomerAdmin($CUA, $twig)
          {
              $sType = 'all';
              $type = filter_input(INPUT_GET, 'type');
              if ($type !== null) {
      Severity: Minor
      Found in src/Controller/Admin/Customer/Customeradmin.php - About 5 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

      Function validateCustomerForm has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

          public function validateCustomerForm($sLang, $aErr = [], $bEdit = false)
          {
              if (empty(filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL))) {
                  $aErr['email'] = true;
              }
      Severity: Minor
      Found in src/Customer/Helper.php - About 5 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

      Method handleCustomerAdmin has 138 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function handleCustomerAdmin($CUA, $twig)
          {
              $sType = 'all';
              $type = filter_input(INPUT_GET, 'type');
              if ($type !== null) {
      Severity: Major
      Found in src/Controller/Admin/Customer/Customeradmin.php - About 5 hrs to fix

        Function preparePage has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
        Open

            public function preparePage()
            {
                $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager, [], 'admin/base.twig');
                $this->P->cb_pagetype = 'content';
                $this->P->cb_subnav = 'admin';
        Severity: Minor
        Found in src/Controller/Admin/Shop/Itemgroupadmin.php - About 4 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

        Function preparePage has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
        Open

            public function preparePage()
            {
                $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager, [], 'admin/base.twig');
                $this->P->cb_pagetype = 'content';
                $this->P->cb_subnav = 'admin';
        Severity: Minor
        Found in src/Controller/Admin/Shop/Itemadmin.php - About 4 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

        Method buildCustomerForm has 111 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function buildCustomerForm($sLang, $sPurpose = 'none', $aErr = [], $aUserData = false)
            {
                $sDefaultCountry = $this->getCustomerFormDefaultValue('cust_country', 'country', $aUserData);
        
                // Purposes: shoppingcart, userhome, shopadmin, editprofile, register
        Severity: Major
        Found in src/Customer/Helper.php - About 4 hrs to fix

          File Itemadmin.php has 343 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /*
              HCSF - A multilingual CMS and Shopsystem
              Copyright (C) 2014  Marcus Haase - mail@marcus.haase.name
          Severity: Minor
          Found in src/Controller/Admin/Shop/Itemadmin.php - About 4 hrs to fix

            Method preparePage has 105 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function preparePage()
                {
                    $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager, [], 'admin/base.twig');
                    $this->P->cb_pagetype = 'content';
                    $this->P->cb_subnav = 'admin';
            Severity: Major
            Found in src/Controller/Admin/Shop/Itemgroupadmin.php - About 4 hrs to fix

              Method preparePage has 104 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function preparePage()
                  {
                      $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager);
                      $this->P->cb_pagetype = 'content';
              
              
              Severity: Major
              Found in src/Controller/Shop/Updatecart.php - About 4 hrs to fix

                Method getPage has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getPage()
                    {
                        // Maintenance page
                        if ($this->config->getCore('maintenancemode')) {
                            try {
                Severity: Major
                Found in src/Router.php - About 4 hrs to fix

                  Function preparePage has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function preparePage()
                      {
                          $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager);
                          $this->P->cb_pagetype = 'content';
                  
                  
                  Severity: Minor
                  Found in src/Controller/Customer/Resetpassword.php - About 3 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

                  Function preparePage has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function preparePage()
                      {
                          $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager);
                          $this->P->cb_pagetype = 'content';
                  
                  
                  Severity: Minor
                  Found in src/Controller/Shop/Paypalnotify.php - About 3 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

                  File Shopadmin.php has 328 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  /*
                      HCSF - A multilingual CMS and Shopsystem
                      Copyright (C) 2014  Marcus Haase - mail@marcus.haase.name
                  Severity: Minor
                  Found in src/Controller/Admin/Shop/Shopadmin.php - About 3 hrs to fix

                    File Shoppingcart.php has 328 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    /*
                        HCSF - A multilingual CMS and Shopsystem
                        Copyright (C) 2014  Marcus Haase - mail@marcus.haase.name
                    Severity: Minor
                    Found in src/Controller/Shop/Shoppingcart.php - About 3 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language