YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/models/Menu.php

Summary

Maintainability
D
2 days
Test Coverage
F
56%

Function getBreadcrumbs has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getBreadcrumbs($pageTitle = false)
    {
        $breadcrumbs = [];
        $request = App\Request::init();
        $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
Severity: Minor
Found in modules/Vtiger/models/Menu.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 getBreadcrumbs has 109 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getBreadcrumbs($pageTitle = false)
    {
        $breadcrumbs = [];
        $request = App\Request::init();
        $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
Severity: Major
Found in modules/Vtiger/models/Menu.php - About 4 hrs to fix

    The class Vtiger_Menu_Model has an overall complexity of 78 which is very high. The configured complexity threshold is 50.
    Open

    class Vtiger_Menu_Model
    {
        /**
         * Static Function to get all the accessible menu models with/without ordering them by sequence.
         *
    Severity: Minor
    Found in modules/Vtiger/models/Menu.php by phpmd

    Function getMenuIcon has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function getMenuIcon($menu, $title = ''): string
        {
            if (empty($title) && !empty($menu['label'])) {
                $title = self::getLabelToDisplay($menu);
            }
    Severity: Minor
    Found in modules/Vtiger/models/Menu.php - About 1 hr 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 getLabelToDisplay has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function getLabelToDisplay(array $row): string
        {
            $name = '';
            $type = $row['type'];
            if (\is_int($type)) {
    Severity: Minor
    Found in modules/Vtiger/models/Menu.php - About 1 hr to fix

      Function getLabelToDisplay has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function getLabelToDisplay(array $row): string
          {
              $name = '';
              $type = $row['type'];
              if (\is_int($type)) {
      Severity: Minor
      Found in modules/Vtiger/models/Menu.php - About 1 hr 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 method.
      Open

                  return '<span class="c-menu__item__icon yfm-' . $menu['mod'] . '" aria-hidden="true"></span>';
      Severity: Major
      Found in modules/Vtiger/models/Menu.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return '';
        Severity: Major
        Found in modules/Vtiger/models/Menu.php - About 30 mins to fix

          The method getMenuIcon() has an NPath complexity of 675. The configured NPath complexity threshold is 200.
          Open

              public static function getMenuIcon($menu, $title = ''): string
              {
                  if (empty($title) && !empty($menu['label'])) {
                      $title = self::getLabelToDisplay($menu);
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          NPathComplexity

          Since: 0.1

          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

          Example

          class Foo {
              function bar() {
                  // lots of complicated code
              }
          }

          Source https://phpmd.org/rules/codesize.html#npathcomplexity

          The method getBreadcrumbs() has an NPath complexity of 39640. The configured NPath complexity threshold is 200.
          Open

              public static function getBreadcrumbs($pageTitle = false)
              {
                  $breadcrumbs = [];
                  $request = App\Request::init();
                  $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          NPathComplexity

          Since: 0.1

          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

          Example

          class Foo {
              function bar() {
                  // lots of complicated code
              }
          }

          Source https://phpmd.org/rules/codesize.html#npathcomplexity

          The method getBreadcrumbs() has 112 lines of code. Current threshold is set to 100. Avoid really long methods.
          Open

              public static function getBreadcrumbs($pageTitle = false)
              {
                  $breadcrumbs = [];
                  $request = App\Request::init();
                  $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          The method getMenuIcon() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
          Open

              public static function getMenuIcon($menu, $title = ''): string
              {
                  if (empty($title) && !empty($menu['label'])) {
                      $title = self::getLabelToDisplay($menu);
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          CyclomaticComplexity

          Since: 0.1

          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

          Example

          // Cyclomatic Complexity = 11
          class Foo {
          1   public function example() {
          2       if ($a == $b) {
          3           if ($a1 == $b1) {
                          fiddle();
          4           } elseif ($a2 == $b2) {
                          fiddle();
                      } else {
                          fiddle();
                      }
          5       } elseif ($c == $d) {
          6           while ($c == $d) {
                          fiddle();
                      }
          7        } elseif ($e == $f) {
          8           for ($n = 0; $n < $h; $n++) {
                          fiddle();
                      }
                  } else {
                      switch ($z) {
          9               case 1:
                              fiddle();
                              break;
          10              case 2:
                              fiddle();
                              break;
          11              case 3:
                              fiddle();
                              break;
                          default:
                              fiddle();
                              break;
                      }
                  }
              }
          }

          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

          The method getBreadcrumbs() has a Cyclomatic Complexity of 42. The configured cyclomatic complexity threshold is 10.
          Open

              public static function getBreadcrumbs($pageTitle = false)
              {
                  $breadcrumbs = [];
                  $request = App\Request::init();
                  $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          CyclomaticComplexity

          Since: 0.1

          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

          Example

          // Cyclomatic Complexity = 11
          class Foo {
          1   public function example() {
          2       if ($a == $b) {
          3           if ($a1 == $b1) {
                          fiddle();
          4           } elseif ($a2 == $b2) {
                          fiddle();
                      } else {
                          fiddle();
                      }
          5       } elseif ($c == $d) {
          6           while ($c == $d) {
                          fiddle();
                      }
          7        } elseif ($e == $f) {
          8           for ($n = 0; $n < $h; $n++) {
                          fiddle();
                      }
                  } else {
                      switch ($z) {
          9               case 1:
                              fiddle();
                              break;
          10              case 2:
                              fiddle();
                              break;
          11              case 3:
                              fiddle();
                              break;
                          default:
                              fiddle();
                              break;
                      }
                  }
              }
          }

          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

          The method getLabelToDisplay() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
          Open

              public static function getLabelToDisplay(array $row): string
              {
                  $name = '';
                  $type = $row['type'];
                  if (\is_int($type)) {
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          CyclomaticComplexity

          Since: 0.1

          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

          Example

          // Cyclomatic Complexity = 11
          class Foo {
          1   public function example() {
          2       if ($a == $b) {
          3           if ($a1 == $b1) {
                          fiddle();
          4           } elseif ($a2 == $b2) {
                          fiddle();
                      } else {
                          fiddle();
                      }
          5       } elseif ($c == $d) {
          6           while ($c == $d) {
                          fiddle();
                      }
          7        } elseif ($e == $f) {
          8           for ($n = 0; $n < $h; $n++) {
                          fiddle();
                      }
                  } else {
                      switch ($z) {
          9               case 1:
                              fiddle();
                              break;
          10              case 2:
                              fiddle();
                              break;
          11              case 3:
                              fiddle();
                              break;
                          default:
                              fiddle();
                              break;
                      }
                  }
              }
          }

          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

          Reduce the number of returns of this function 6, down to the maximum allowed 3.
          Open

              public static function getMenuIcon($menu, $title = ''): string
          Severity: Major
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

          Noncompliant Code Example

          With the default threshold of 3:

          function myFunction(){ // Noncompliant as there are 4 return statements
            if (condition1) {
              return true;
            } else {
              if (condition2) {
                return false;
              } else {
                return true;
              }
            }
            return false;
          }
          

          Refactor this function to reduce its Cognitive Complexity from 73 to the 15 allowed.
          Open

              public static function getBreadcrumbs($pageTitle = false)
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

          See

          Avoid using undefined variables such as '$menus' which will lead to PHP notices.
          Open

                  if (empty($menus)) {
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$menus' which will lead to PHP notices.
          Open

                                  $url = $menus[$mid]['dataurl'] ?? $parentList[$mid]['dataurl'] ?? $moduleModel->getDefaultUrl();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$menus' which will lead to PHP notices.
          Open

                  if (0 === \count($menus)) {
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$menus' which will lead to PHP notices.
          Open

                  return \Settings_Menu_Record_Model::parseToDisplay($menus);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          The method getBreadcrumbs has a boolean flag argument $pageTitle, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public static function getBreadcrumbs($pageTitle = false)
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          BooleanArgumentFlag

          Since: 1.4.0

          A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

          Example

          class Foo {
              public function bar($flag = true) {
              }
          }

          Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

          Avoid using static access to class '\App\Language' in method 'getBreadcrumbs'.
          Open

                                  'name' => \App\Language::translate($moduleName, $moduleName),
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'App\Language' in method 'getBreadcrumbs'.
          Open

                                  'name' => App\Language::translate($menuModel->get('name'), $qualifiedModuleName),
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'App\Request' in method 'getBreadcrumbs'.
          Open

                  $request = App\Request::init();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'Users_Privileges_Model' in method 'getBreadcrumbs'.
          Open

                  $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'Vtiger_Module_Model' in method 'getBreadcrumbs'.
          Open

                          $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          The method getBreadcrumbs uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      require 'user_privileges/menu_0.php';
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class 'Settings_Vtiger_MenuItem_Model' in method 'getBreadcrumbs'.
          Open

                      $menu = Settings_Vtiger_MenuItem_Model::getAll();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          The method getAll uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      require 'user_privileges/menu_0.php';
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class 'App\Language' in method 'getBreadcrumbs'.
          Open

                          $breadcrumbs[] = ['name' => App\Language::translate('LBL_HOME', $moduleName)];
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          The method getBreadcrumbs uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                      } else {
                          if ($pageTitle) {
                              $breadcrumbs[] = ['name' => App\Language::translate($pageTitle, $qualifiedModuleName)];
                          } elseif ('Edit' === $view && $request->isEmpty('record') && $request->isEmpty('parent_roleid')) {
                              $breadcrumbs[] = ['name' => App\Language::translate('LBL_VIEW_CREATE', $qualifiedModuleName)];
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class 'App\Language' in method 'getBreadcrumbs'.
          Open

                              $breadcrumbs[] = ['name' => App\Language::translate($pageTitle, $qualifiedModuleName)];
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'vtlib\Functions' in method 'getLabelToDisplay'.
          Open

          }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'App\Language' in method 'getBreadcrumbs'.
          Open

                              $breadcrumbs[] = ['name' => App\Language::translate('LBL_VIEW_CREATE', $qualifiedModuleName)];
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\App\Language' in method 'vtranslateMenu'.
          Open

                  return \App\Language::translate($key, $module);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\App\Language' in method 'getBreadcrumbs'.
          Open

                          'name' => \App\Language::translate('LBL_VIEW_SETTINGS', $qualifiedModuleName),
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\Vtiger_Theme' in method 'getMenuIcon'.
          Open

                      $icon = \Vtiger_Theme::getImagePath($menu['icon']);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'App\Language' in method 'getBreadcrumbs'.
          Open

                          $breadcrumbs[] = ['name' => App\Language::translate('LBL_VIEW_CREATE', $moduleName)];
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\App\Fields\Owner' in method 'getBreadcrumbs'.
          Open

                              $recordLabel = \App\Fields\Owner::getUserLabel($request->getInteger('record'));
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\Settings_Menu_Record_Model' in method 'getAll'.
          Open

                  return \Settings_Menu_Record_Model::parseToDisplay($menus);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          The method getBreadcrumbs uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                          } else {
                              $breadcrumbs[] = [
                                  'name' => \App\Language::translate($moduleName, $moduleName),
                              ];
                          }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class '\App\Language' in method 'getBreadcrumbs'.
          Open

                                  'name' => \App\Language::translate($moduleName, $moduleName),
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'App\Language' in method 'getBreadcrumbs'.
          Open

                          $breadcrumbs[] = ['name' => App\Language::translate('LBL_VIEW_' . strtoupper($view), $moduleName)];
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          The method getBreadcrumbs uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                              } else {
                                  $url = $moduleModel->getDefaultUrl();
                              }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class '\App\Language' in method 'vtranslateMenu'.
          Open

                  $string = \App\Language::translateSingleMod($key, 'Other.Menu');
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'vtlib\Functions' in method 'getBreadcrumbs'.
          Open

                          $recordLabel = vtlib\Functions::getCRMRecordLabel($request->getInteger('record'));
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\Vtiger_Theme' in method 'getMenuIcon'.
          Open

                      $iconName = \Vtiger_Theme::getImagePath($menu);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'Users_Privileges_Model' in method 'getAll'.
          Open

                  $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class 'App\Language' in method 'getBreadcrumbs'.
          Open

                                  'name' => App\Language::translate($parent->getLabel(), $qualifiedModuleName),
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          The method getLabelToDisplay uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                          } else {
                              $name = \App\Language::translate('LBL_QUICK_CREATE_MODULE', 'Menu') . ': ' . self::vtranslateMenu('SINGLE_' . $moduleName, $moduleName);
                          }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class '\App\Language' in method 'getLabelToDisplay'.
          Open

                              $name = \App\Language::translate('LBL_QUICK_CREATE_MODULE', 'Menu') . ': ' . self::vtranslateMenu('SINGLE_' . $moduleName, $moduleName);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\App\CustomView' in method 'getLabelToDisplay'.
          Open

                          $data = \App\CustomView::getCustomViewById($cvid);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          Avoid using static access to class '\App\Language' in method 'getLabelToDisplay'.
          Open

                          $name = self::vtranslateMenu($data['entitytype'], $data['entitytype']) . ': ' . \App\Language::translate($data['viewname'], $data['entitytype']);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          StaticAccess

          Since: 1.4.0

          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

          Example

          class Foo
          {
              public function bar()
              {
                  Bar::baz();
              }
          }

          Source https://phpmd.org/rules/cleancode.html#staticaccess

          The method getLabelToDisplay uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      $moduleName = $row['mod'] ?? '';
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Define a constant instead of duplicating this literal "dataurl" 5 times.
          Open

                                  $url = $menus[$mid]['dataurl'] ?? $parentList[$mid]['dataurl'] ?? $moduleModel->getDefaultUrl();
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "Alnum" 3 times.
          Open

                  $view = $request->getByType('view', 'Alnum');
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "record" 7 times.
          Open

                      } elseif ('Edit' === $view && $request->isEmpty('record')) {
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "entitytype" 3 times.
          Open

                          $name = self::vtranslateMenu($data['entitytype'], $data['entitytype']) . ': ' . \App\Language::translate($data['viewname'], $data['entitytype']);
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "label" 6 times.
          Open

                  if (empty($title) && !empty($menu['label'])) {
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "user_privileges/menu_0.php" 4 times.
          Open

                      require 'user_privileges/menu_0.php';
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "parent" 6 times.
          Open

                  $parent = $request->getByType('parent', 'Alnum');
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Call to method getUserLabel from undeclared class \App\Fields\Owner
          Open

                              $recordLabel = \App\Fields\Owner::getUserLabel($request->getInteger('record'));
          Severity: Critical
          Found in modules/Vtiger/models/Menu.php by phan

          Variable $menus is undeclared
          Open

                  if (0 === \count($menus)) {
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phan

          Variable $parentList is undeclared
          Open

                      $parentMenu = self::getParentMenu($parentList, $parent, $moduleName);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phan

          Variable $parentList is undeclared
          Open

                                  $url = $menus[$mid]['dataurl'] ?? $parentList[$mid]['dataurl'] ?? $moduleModel->getDefaultUrl();
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phan

          Argument 2 (emptyFunction) is 'Alnum' but \App\Request::isEmpty() takes bool|false defined at /code/app/Request.php:577
          Open

                  $mid = $request->isEmpty('mid', 'Alnum') ? null : $request->getInteger('mid');
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phan

          Variable $menus is undeclared
          Open

                  return \Settings_Menu_Record_Model::parseToDisplay($menus);
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phan

          Variable $parentList is undeclared
          Open

                      $parent = (!$parent && $mid) ? ($parentList[$mid]['parent'] ?? null) : $parent;
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phan

          Variable $parentList is undeclared
          Open

                          foreach ($parentList as &$parentItem) {
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phan

          Each class must be in a namespace of at least one level (a top-level vendor name)
          Open

          class Vtiger_Menu_Model

          The class Vtiger_Menu_Model is not named in CamelCase.
          Open

          class Vtiger_Menu_Model
          {
              /**
               * Static Function to get all the accessible menu models with/without ordering them by sequence.
               *
          Severity: Minor
          Found in modules/Vtiger/models/Menu.php by phpmd

          CamelCaseClassName

          Since: 0.2

          It is considered best practice to use the CamelCase notation to name classes.

          Example

          class class_name {
          }

          Source

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      require 'user_privileges/menu_0.php';

          Line exceeds 120 characters; contains 125 characters
          Open

                  $roleMenu = 'user_privileges/menu_' . filter_var($userPrivModel->get('roleid'), FILTER_SANITIZE_NUMBER_INT) . '.php';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ('AppComponents' !== $moduleName) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'url' => $url,

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              ];

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function vtranslateMenu($key, $module)

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return \App\Language::translate($key, $module);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $url = $moduleModel->getDefaultUrl();

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ($pageTitle) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $roleMenu = 'user_privileges/menu_' . filter_var($userPrivModel->get('roleid'), FILTER_SANITIZE_NUMBER_INT) . '.php';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      require $roleMenu;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if ($string !== $key) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $parentMenu = self::getParentMenu($parentList, $parent, $moduleName);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'name' => \App\Language::translate($moduleName, $moduleName),

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  } elseif ('Settings' === $parent) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getAll(): array

          Line exceeds 120 characters; contains 125 characters
          Open

                  $roleMenu = 'user_privileges/menu_' . filter_var($userPrivModel->get('roleid'), FILTER_SANITIZE_NUMBER_INT) . '.php';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  } else {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $breadcrumbs[] = ['name' => $pageTitle];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $breadcrumbs[] = ['name' => App\Language::translate('LBL_VIEW_' . strtoupper($view), $moduleName)];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      } elseif (empty($view)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = ['name' => $recordLabel];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      foreach ($menu as $menuModel) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  || $menuModel->isSelected($moduleName, $view, $request->getMode())

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($pageTitle as $title) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getParentMenu($parentList, $parent, $module, $return = []): array

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'url' => $parentList[$parent]['dataurl'],

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $data = \App\CustomView::getCustomViewById($cvid);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $name = self::vtranslateMenu($data['entitytype'], $data['entitytype']) . ': ' . \App\Language::translate($data['viewname'], $data['entitytype']);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (empty($menus)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if ('Settings' !== $parent) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (empty($parent)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($parentList as &$parentItem) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          } else {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if (!empty($recordLabel)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'name' => \App\Language::translate('LBL_VIEW_SETTINGS', $qualifiedModuleName),

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'name' => App\Language::translate($menuModel->get('name'), $qualifiedModuleName),

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'url' => $menuModel->getUrl(),

          Line exceeds 120 characters; contains 247 characters
          Open

                      if (false !== strpos($menu['icon'], 'adminIcon-') || false !== strpos($menu['icon'], 'AdditionalIcon-') || false !== strpos($menu['icon'], 'yfi-') || false !== strpos($menu['icon'], 'yfm-') || false !== strpos($menu['icon'], 'mdi-')) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          return '<span class="c-menu__item__icon ' . $menu['icon'] . '" aria-hidden="true"></span>';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      return '<span class="c-menu__item__icon yfm-' . $menu['mod'] . '" aria-hidden="true"></span>';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      case 'QuickCreate':

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $name = self::vtranslateMenu($moduleName, $moduleName);

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Static Function to get all the accessible menu models with/without ordering them by sequence.

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = [

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              )

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              break;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (\is_array($pageTitle)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          } elseif ('Edit' === $view && $request->isEmpty('record') && $request->isEmpty('parent_roleid')) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $title = self::getLabelToDisplay($menu);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          return '<img src="' . $icon . '" alt="' . $title . '" title="' . $title . '" class="c-menu__item__icon" />';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $type = \App\Menu::TYPES[$type];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $name = self::vtranslateMenu($row['label'], 'Menu');

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $name = \App\Language::translate('LBL_QUICK_CREATE_MODULE', 'Menu') . ': ' . self::vtranslateMenu('SINGLE_' . $moduleName, $moduleName);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $request = App\Request::init();

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      require $roleMenu;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $moduleName = $request->getModule();

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $moduleModel = Vtiger_Module_Model::getInstance($moduleName);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'name' => \App\Language::translate($moduleName, $moduleName),

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              ];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $breadcrumbs[] = ['name' => App\Language::translate('LBL_HOME', $moduleName)];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'url' => 'index.php?module=Vtiger&parent=Settings&view=Index',

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      case 'Separator':

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          break;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          } else {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $parent = (!$parent && $mid) ? ($parentList[$mid]['parent'] ?? null) : $parent;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              } else {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = [

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'icon' => 'fas fa-cog fa-fw',

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = [

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = $title;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function to get icon of element in menu.

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      case 'HomeIcon':

          Line exceeds 120 characters; contains 127 characters
          Open

                          $cvid = \is_int($row['type']) ? $row['dataurl'] : vtlib\Functions::getQueryParams($row['dataurl'])['viewname'];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $string = \App\Language::translateSingleMod($key, 'Other.Menu');

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          break;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      return $string;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $breadcrumbs = [];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      require 'user_privileges/menu_0.php';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $breadcrumbs = array_reverse($parentMenu);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if ($moduleModel && $moduleModel->getDefaultUrl()) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if ($mid) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          ) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $return[] = [

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (0 !== $parentList[$parent]['parent'] && \array_key_exists($parentList[$parent]['parent'], $parentList)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          return '<img src="' . $iconName . '" alt="' . $title . '" title="' . $title . '" class="c-menu__item__icon" />';

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return string

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getLabelToDisplay(array $row): string

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  } else {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          break;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      case 'CustomFilter':

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $name;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (file_exists($roleMenu)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      require 'user_privileges/menu_0.php';

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (\count($parentMenu) > 0) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $url = $menus[$mid]['dataurl'] ?? $parentList[$mid]['dataurl'] ?? $moduleModel->getDefaultUrl();

          Line exceeds 120 characters; contains 127 characters
          Open

                                  (($request->has('record') || 'Edit' === $view) && $menuModel->getModuleName() === $qualifiedModuleName)

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string|array $menu

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (\is_string($menu)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          return '<span class="' . $menu['icon'] . ' c-menu__item__icon"></span>';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (isset($menu['type']) && 'Module' === $menu['type']) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Get label to display.

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  switch ($type) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if ('' != $row['label']) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $name = self::vtranslateMenu($row['label'], 'Menu');

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (0 === \count($menus)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return \Settings_Menu_Record_Model::parseToDisplay($menus);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if ($moduleName === $parentItem['mod']) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      } elseif (!empty($view) && 'index' !== $view && 'Index' !== $view) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ($moduleModel && !$request->isEmpty('record', true) && $moduleModel->isEntityModule()) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $breadcrumbs[] = [

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = [

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              ];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      } else {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = ['name' => App\Language::translate($pageTitle, $qualifiedModuleName)];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return '';

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $name = self::vtranslateMenu('LBL_SEPARATOR', 'Menu');

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      require 'user_privileges/menu_0.php';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $view = $request->getByType('view', 'Alnum');

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  break;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      } elseif ('Edit' === $view && $request->isEmpty('record')) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $recordLabel = vtlib\Functions::getCRMRecordLabel($request->getInteger('record'));

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $breadcrumbs[] = ['name' => App\Language::translate('LBL_VIEW_CREATE', $qualifiedModuleName)];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $return = self::getParentMenu($parentList, $parentList[$parent]['parent'], $module, $return);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getBreadcrumbs($pageTitle = false)

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $recordLabel = \App\Fields\Owner::getUserLabel($request->getInteger('record'));

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (empty($title) && !empty($menu['label'])) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $iconName = \Vtiger_Theme::getImagePath($menu);

          Line exceeds 120 characters; contains 124 characters
          Open

                          return '<img src="' . $icon . '" alt="' . $title . '" title="' . $title . '" class="c-menu__item__icon" />';

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      case 'RecycleBin':

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $roleMenu = 'user_privileges/menu_' . filter_var($userPrivModel->get('roleid'), FILTER_SANITIZE_NUMBER_INT) . '.php';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (file_exists($roleMenu)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if ($menuModel->isPermitted() && (

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'name' => App\Language::translate($parent->getLabel(), $qualifiedModuleName),

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ];

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $name = '';

          Line exceeds 120 characters; contains 161 characters
          Open

                          $name = self::vtranslateMenu($data['entitytype'], $data['entitytype']) . ': ' . \App\Language::translate($data['viewname'], $data['entitytype']);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $parent = $request->getByType('parent', 'Alnum');

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $mid = $request->isEmpty('mid', 'Alnum') ? null : $request->getInteger('mid');

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $parent = $parentItem['parent'];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $menu = Settings_Vtiger_MenuItem_Model::getAll();

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $breadcrumbs;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ($icon) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      case 'Module':

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  } else {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $breadcrumbs[] = ['name' => App\Language::translate('LBL_VIEW_CREATE', $moduleName)];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $qualifiedModuleName = $request->getModule(false);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'icon' => $parent->get('icon'),

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              ];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if (!$request->isEmpty('record') && 'Users' === $moduleName) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (!empty($menu['icon'])) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (false !== strpos($menu['icon'], 'adminIcon-') || false !== strpos($menu['icon'], 'AdditionalIcon-') || false !== strpos($menu['icon'], 'yfi-') || false !== strpos($menu['icon'], 'yfm-') || false !== strpos($menu['icon'], 'mdi-')) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $moduleName = $row['mod'] ?? '';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          break;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if ($pageTitle) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $return = [];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (!empty($parent) && !empty($parentList[$parent])) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'name' => self::getLabelToDisplay($parentList[$parent]),

          Line exceeds 120 characters; contains 121 characters
          Open

                      if (0 !== $parentList[$parent]['parent'] && \array_key_exists($parentList[$parent]['parent'], $parentList)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $return;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $icon = \Vtiger_Theme::getImagePath($menu['icon']);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $type = $row['type'];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (\is_int($type)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          break;

          Line exceeds 120 characters; contains 156 characters
          Open

                              $name = \App\Language::translate('LBL_QUICK_CREATE_MODULE', 'Menu') . ': ' . self::vtranslateMenu('SINGLE_' . $moduleName, $moduleName);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $name = self::vtranslateMenu('LBL_HOME', 'Menu');

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $cvid = \is_int($row['type']) ? $row['dataurl'] : vtlib\Functions::getQueryParams($row['dataurl'])['viewname'];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  'icon' => $menuModel->get('iconpath'),

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $breadcrumbs[] = ['name' => $recordLabel];

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return string

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getMenuIcon($menu, $title = ''): string

          Line exceeds 120 characters; contains 128 characters
          Open

                          return '<img src="' . $iconName . '" alt="' . $title . '" title="' . $title . '" class="c-menu__item__icon" />';

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (false !== strpos($menu['icon'], 'fa-')) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param array $row

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $moduleName = $row['name'];

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $name = self::vtranslateMenu((empty($row['label']) ? $moduleName : $row['label']), $moduleName);

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          break;

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      default:

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  (($request->has('record') || 'Edit' === $view) && $menuModel->getModuleName() === $qualifiedModuleName)

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $parent = $menuModel->getBlock();

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (!empty($recordLabel)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string       $title

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (file_exists($iconName)) {

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          break;

          Class name "Vtiger_Menu_Model" is not in camel caps format
          Open

          class Vtiger_Menu_Model

          There are no issues that match your filters.

          Category
          Status