madbob/GASdottoNG

View on GitHub

Showing 501 of 501 total issues

Function printableUserHeader has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function printableUserHeader()
    {
        $ret = $this->printableHeader();

        $user = Auth::user();
Severity: Minor
Found in code/app/Aggregate.php - About 35 mins 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

Avoid too many return statements within this function.
Open

        return result;
Severity: Major
Found in code/resources/assets/js/translate.js - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return $ret;
    Severity: Major
    Found in code/app/View/Icons/User.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return null;
      Severity: Major
      Found in code/app/Singletons/ModifierEngine.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return $this->errorResponse($e->getMessage());
        Severity: Major
        Found in code/app/Http/Controllers/ImportController.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return $this->saveValue($modifier, $obj_mod_target, $altered_amount);
          Severity: Major
          Found in code/app/Singletons/ModifierEngine.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return $this->errorResponse(_i('Comando %s/%s non valido', [$type, $step]));
            Severity: Major
            Found in code/app/Http/Controllers/ImportController.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return output_csv($filename, $headers, $suppliers, function($supplier) use ($currencies) {
                                      $row = [];
                                      $row[] = $supplier->id;
                                      $row[] = $supplier->printableName();
              
              
              Severity: Major
              Found in code/app/Http/Controllers/MovementsController.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return null;
                Severity: Major
                Found in code/app/Singletons/ModifierEngine.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return printablePrice($product->getPrice());
                  Severity: Major
                  Found in code/app/Formatters/Order.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                        return view($importer->finalTemplate(), $parameters);
                    Severity: Major
                    Found in code/app/Http/Controllers/ImportController.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return $obj->birthday;
                      Severity: Major
                      Found in code/app/Formatters/User.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return view('booking.quantityselectrow', ['product' => $product, 'order' => $order, 'populate' => false, 'while_shipping' => true]);
                        Severity: Major
                        Found in code/app/Http/Controllers/ProductsController.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return false;
                          Severity: Major
                          Found in code/app/Observers/MovementObserver.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                return printablePrice($summary->variant->unitPrice());
                            Severity: Major
                            Found in code/app/Formatters/Order.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                  return $this->exportIntegralCES($user->gas, $suppliers, $filename, $body);
                              Severity: Major
                              Found in code/app/Http/Controllers/MovementsController.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                        return true;
                                Severity: Major
                                Found in code/app/Observers/MovementObserver.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                          return $this->verifyConsistency($movement);
                                  Severity: Major
                                  Found in code/app/Observers/MovementObserver.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return $ret;
                                    Severity: Major
                                    Found in code/app/Formatters/Order.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return $ret;
                                      Severity: Major
                                      Found in code/app/Formatters/User.php - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language