YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/Module.php

Summary

Maintainability
C
1 day
Test Coverage
D
68%

Method setRelatedList has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
    {
        $db = \App\Db::getInstance();
        if (empty($moduleInstance)) {
            return;
Severity: Major
Found in vtlib/Vtiger/Module.php - About 2 hrs to fix

    Function createFiles has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createFiles(Field $entityField)
        {
            $targetpath = 'modules/' . $this->name;
    
            if (!is_file($targetpath)) {
    Severity: Minor
    Found in vtlib/Vtiger/Module.php - About 2 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Method createFiles has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function createFiles(Field $entityField)
        {
            $targetpath = 'modules/' . $this->name;
    
            if (!is_file($targetpath)) {
    Severity: Minor
    Found in vtlib/Vtiger/Module.php - About 1 hr to fix

      Function setRelatedList has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
          {
              $db = \App\Db::getInstance();
              if (empty($moduleInstance)) {
                  return;
      Severity: Minor
      Found in vtlib/Vtiger/Module.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 setRelatedList has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
      Severity: Minor
      Found in vtlib/Vtiger/Module.php - About 45 mins to fix

        Method addLink has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function addLink($type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null)
        Severity: Minor
        Found in vtlib/Vtiger/Module.php - About 45 mins to fix

          The method setRelatedList() has an NPath complexity of 288. The configured NPath complexity threshold is 200.
          Open

              public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
              {
                  $db = \App\Db::getInstance();
                  if (empty($moduleInstance)) {
                      return;
          Severity: Minor
          Found in vtlib/Vtiger/Module.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 setRelatedList() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
          Open

              public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
              {
                  $db = \App\Db::getInstance();
                  if (empty($moduleInstance)) {
                      return;
          Severity: Minor
          Found in vtlib/Vtiger/Module.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

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

              public function createFiles(Field $entityField)
          Severity: Critical
          Found in vtlib/Vtiger/Module.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

          The class Module has a coupling between objects value of 20. Consider to reduce the number of dependencies under 13.
          Open

          class Module extends ModuleBasic
          {
              /**
               * Allow export.
               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          CouplingBetweenObjects

          Since: 1.1.0

          A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

          Example

          class Foo {
              /**
               * @var \foo\bar\X
               */
              private $x = null;
          
              /**
               * @var \foo\bar\Y
               */
              private $y = null;
          
              /**
               * @var \foo\bar\Z
               */
              private $z = null;
          
              public function setFoo(\Foo $foo) {}
              public function setBar(\Bar $bar) {}
              public function setBaz(\Baz $baz) {}
          
              /**
               * @return \SplObjectStorage
               * @throws \OutOfRangeException
               * @throws \InvalidArgumentException
               * @throws \ErrorException
               */
              public function process(\Iterator $it) {}
          
              // ...
          }

          Source https://phpmd.org/rules/design.html#couplingbetweenobjects

          Missing class import via use statement (line '144', column '14').
          Open

                  $id = (new \App\Db\Query())
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          MissingImport

          Since: 2.7.0

          Importing all external classes in a file through use statements makes them clearly visible.

          Example

          function make() {
              return new \stdClass();
          }

          Source http://phpmd.org/rules/cleancode.html#MissingImport

          Missing class import via use statement (line '216', column '19').
          Open

                      $objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($templatepath, $flags), \RecursiveIteratorIterator::SELF_FIRST);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          MissingImport

          Since: 2.7.0

          Importing all external classes in a file through use statements makes them clearly visible.

          Example

          function make() {
              return new \stdClass();
          }

          Source http://phpmd.org/rules/cleancode.html#MissingImport

          Missing class import via use statement (line '92', column '22').
          Open

                      $allFields = (new \App\Db\Query())->select(['fieldid', 'fieldname'])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          MissingImport

          Since: 2.7.0

          Importing all external classes in a file through use statements makes them clearly visible.

          Example

          function make() {
              return new \stdClass();
          }

          Source http://phpmd.org/rules/cleancode.html#MissingImport

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

              public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
          Severity: Minor
          Found in vtlib/Vtiger/Module.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

          Missing class import via use statement (line '339', column '27').
          Open

                      $menuRecordModel = new \Settings_Menu_Record_Model();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          MissingImport

          Since: 2.7.0

          Importing all external classes in a file through use statements makes them clearly visible.

          Example

          function make() {
              return new \stdClass();
          }

          Source http://phpmd.org/rules/cleancode.html#MissingImport

          Missing class import via use statement (line '33', column '15').
          Open

                  return (new \App\Db\Query())->from('vtiger_relatedlists')->where(['tabid' => $this->id])->max('sequence') + 1;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          MissingImport

          Since: 2.7.0

          Importing all external classes in a file through use statements makes them clearly visible.

          Example

          function make() {
              return new \stdClass();
          }

          Source http://phpmd.org/rules/cleancode.html#MissingImport

          Missing class import via use statement (line '68', column '20').
          Open

                  $isExists = (new \App\Db\Query())
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          MissingImport

          Since: 2.7.0

          Importing all external classes in a file through use statements makes them clearly visible.

          Example

          function make() {
              return new \stdClass();
          }

          Source http://phpmd.org/rules/cleancode.html#MissingImport

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

              public function deleteLink($type, $label, $url = false)
          Severity: Minor
          Found in vtlib/Vtiger/Module.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

          Missing class import via use statement (line '216', column '50').
          Open

                      $objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($templatepath, $flags), \RecursiveIteratorIterator::SELF_FIRST);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          MissingImport

          Since: 2.7.0

          Importing all external classes in a file through use statements makes them clearly visible.

          Example

          function make() {
              return new \stdClass();
          }

          Source http://phpmd.org/rules/cleancode.html#MissingImport

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

                          } else {
                              $fileContent = file_get_contents($name);
                              $replacevars = [
                                  '<ModuleName>' => $this->name,
                                  '<ModuleLabel>' => $this->label,
          Severity: Minor
          Found in vtlib/Vtiger/Module.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 'vtlib\Utils' in method 'getClassInstance'.
          Open

                  if (Utils::checkFileAccessForInclusion($filepath, false)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Link' in method 'deleteLink'.
          Open

                  Link::deleteLink($this->id, $type, $label, $url);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Module' in method 'toggleModuleAccess'.
          Open

                      $tabId = \App\Module::getModuleId($moduleName);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Link' in method 'getLinks'.
          Open

                  return Link::getAll($this->id);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Cache' in method 'toggleModuleAccess'.
          Open

                      \App\Cache::delete('moduleTabById', $tabId);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Relation' in method 'unsetRelatedList'.
          Open

                  \App\Relation::clearCacheById($id);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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_GlobalPermission_Record_Model' in method 'toggleModuleAccess'.
          Open

                      \Settings_GlobalPermission_Record_Model::recalculate();
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Module' in method 'toggleModuleAccess'.
          Open

                      \App\Module::createModuleMetaFile();
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Log' in method 'setRelatedList'.
          Open

                      \App\Log::trace("Setting relation with $moduleInstance->name [$useactionsText] ... Error, the related module already exists", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Link' in method 'addLink'.
          Open

                  Link::addLink($this->id, $type, $label, $url, $iconpath, $sequence, $handlerInfo);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Webservice' in method 'initWebservice'.
          Open

                  Webservice::initialize($this);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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 'createFiles'.
          Open

                      $languages = \App\Language::getAll(false);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Log' in method 'fireEvent'.
          Open

                      \App\Log::trace("Invoking moduleHandler for $eventType ...DONE", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Cache' in method 'toggleModuleAccess'.
          Open

                      \App\Cache::staticDelete('module', $moduleName);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Cache' in method 'toggleModuleAccess'.
          Open

                      \App\Cache::delete('moduleTabs', 'all');
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Deprecated' in method 'getClassInstance'.
          Open

                      Deprecated::checkFileAccessForInclusion($filepath);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Db' in method 'setRelatedList'.
          Open

                  $db = \App\Db::getInstance();
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Log' in method 'fireEvent'.
          Open

                      \App\Log::trace("Invoking moduleHandler for $eventType ...START", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Cache' in method 'toggleModuleAccess'.
          Open

                      \App\Cache::delete('moduleTabByName', $moduleName);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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_Relation_Model' in method 'setRelatedList'.
          Open

                      $refTableName = \Vtiger_Relation_Model::getReferenceTableInfo($moduleInstance->name, $this->name);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Log' in method 'setRelatedList'.
          Open

                  \App\Log::trace("Setting relation with $moduleInstance->name  ... DONE", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Log' in method 'unsetRelatedList'.
          Open

                  \App\Log::trace("Unsetting relation with $moduleInstance->name ... DONE", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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 'getInstance'.
          Open

                  $data = Functions::getModuleData($value);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Cache' in method 'setRelatedList'.
          Open

                  \App\Cache::clear();
          Severity: Minor
          Found in vtlib/Vtiger/Module.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\Cache' in method 'toggleModuleAccess'.
          Open

                      \App\Cache::staticDelete('module', $tabId);
          Severity: Minor
          Found in vtlib/Vtiger/Module.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

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

                      $allFields = (new \App\Db\Query())->select(['fieldid', 'fieldname'])
          Severity: Critical
          Found in vtlib/Vtiger/Module.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" 3 times.
          Open

                      ->where(['tabid' => $this->id, 'related_tabid' => $moduleInstance->id, 'name' => $functionName, 'label' => $label, 'field_name' => $fieldName])
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "table" 10 times.
          Open

                      if (!$schema->getTableSchema($refTableName['table'])) {
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "related_tabid" 3 times.
          Open

                      ->where(['tabid' => $this->id, 'related_tabid' => $moduleInstance->id, 'name' => $functionName, 'label' => $label, 'field_name' => $fieldName])
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "vtiger_relatedlists" 5 times.
          Open

                  return (new \App\Db\Query())->from('vtiger_relatedlists')->where(['tabid' => $this->id])->max('sequence') + 1;
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "tabid" 5 times.
          Open

                  return (new \App\Db\Query())->from('vtiger_relatedlists')->where(['tabid' => $this->id])->max('sequence') + 1;
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "crmid" 5 times.
          Open

                              'crmid' => 'int',
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "relcrmid" 3 times.
          Open

                              'relcrmid' => 'int',
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "relation_id" 5 times.
          Open

                      ->select(['relation_id'])
          Severity: Critical
          Found in vtlib/Vtiger/Module.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 "sequence" 3 times.
          Open

                  return (new \App\Db\Query())->from('vtiger_relatedlists')->where(['tabid' => $this->id])->max('sequence') + 1;
          Severity: Critical
          Found in vtlib/Vtiger/Module.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.

          Avoid unused local variables such as '$object'.
          Open

                      foreach ($objects as $name => $object) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          UnusedLocalVariable

          Since: 0.2

          Detects when a local variable is declared and/or assigned, but not used.

          Example

          class Foo {
              public function doSomething()
              {
                  $i = 5; // Unused
              }
          }

          Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

          Avoid unused local variables such as '$language'.
          Open

                      foreach ($languages as $prefix => $language) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          UnusedLocalVariable

          Since: 0.2

          Detects when a local variable is declared and/or assigned, but not used.

          Example

          class Foo {
              public function doSomething()
              {
                  $i = 5; // Unused
              }
          }

          Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

          Argument 1 (str) is false but \strtolower() takes string
          Open

                                  '<_baseTableName_>' => 'u_' . (\App\Db::getInstance()->getConfig('base')['tablePrefix']) . strtolower($this->name),
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Label to display in related list (default is target module name)': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Label to display in related list (default is target module name)
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db\Query::select
          Open

                  $isExists = (new \App\Db\Query())
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Callback function name of this module to use as handler': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Callback function name of this module to use as handler
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db\Query::select
          Open

                  $id = (new \App\Db\Query())
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string HREF value to use for generated link': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string HREF value to use for generated link
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Argument 1 (tabid) is false but \vtlib\Link::deleteLink() takes int defined at /code/vtlib/Vtiger/Link.php:119
          Open

                  Link::deleteLink($this->id, $type, $label, $url);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Argument 1 (str) is false but \strtolower() takes string
          Open

                                  '<modulename>' => strtolower($this->name),
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Call to method trace from undeclared class \App\Log
          Open

                      \App\Log::trace("Setting relation with $moduleInstance->name [$useactionsText] ... Error, the related module already exists", __METHOD__);
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                          $db->createCommand()->createIndex("{$refTableName['table']}_relcrmid_idx", $refTableName['table'], 'relcrmid')->execute();
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Type can be like 'DETAIL_VIEW_BASIC', 'LISTVIEW' etc..': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Type can be like 'DETAIL_VIEW_BASIC', 'LISTVIEW' etc..
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param \Module Instance of target module with which relation should be setup': after \Module, did not see an element name (will guess based on comment order)
          Open

               * @param \Module Instance of target module with which relation should be setup
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Path to the image file (relative or absolute)': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Path to the image file (relative or absolute)
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                          $db->createCommand()->addForeignKey(
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Argument 1 (tabid) is false but \vtlib\Link::getAll() takes int defined at /code/vtlib/Vtiger/Link.php:158
          Open

                  return Link::getAll($this->id);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
          Open

                  $targetpath = 'modules/' . $this->name;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param Module Instance of target module with which relation should be setup': after Module, did not see an element name (will guess based on comment order)
          Open

               * @param Module Instance of target module with which relation should be setup
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                          $db->createCommand()->createIndex("{$refTableName['table']}_crmid_idx", $refTableName['table'], 'crmid')->execute();
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param int Sequence of appearance': after int, did not see an element name (will guess based on comment order)
          Open

               * @param int Sequence of appearance
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
          Open

                      $langFile = 'languages/' . \App\Language::DEFAULT_LANG . '/' . $this->name . '.json';
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db\Query::from
          Open

                  return (new \App\Db\Query())->from('vtiger_relatedlists')->where(['tabid' => $this->id])->max('sequence') + 1;
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db\Query::select
          Open

                      $allFields = (new \App\Db\Query())->select(['fieldid', 'fieldname'])
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                  $db->createCommand()->insert('vtiger_relatedlists', [
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                          $db->createCommand()->insert('vtiger_relatedlists_fields', [
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to method trace from undeclared class \App\Log
          Open

                  \App\Log::trace("Setting relation with $moduleInstance->name  ... DONE", __METHOD__);
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                  $createCommand = \App\Db::getInstance()->createCommand();
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to method trace from undeclared class \App\Log
          Open

                  \App\Log::trace("Unsetting relation with $moduleInstance->name ... DONE", __METHOD__);
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param array List of action button to show ('ADD', 'SELECT')': after array, did not see an element name (will guess based on comment order)
          Open

               * @param array List of action button to show ('ADD', 'SELECT')
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Label to use for display': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Label to use for display
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Display label to lookup': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Display label to lookup
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                          $db->createCommand()->addForeignKey(
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Label to display in related list (default is target module name)': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Label to display in related list (default is target module name)
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Type can be like 'DETAIL_VIEW_BASIC', 'LISTVIEW' etc..': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Type can be like 'DETAIL_VIEW_BASIC', 'LISTVIEW' etc..
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Argument 1 (tabid) is false but \vtlib\Link::addLink() takes int defined at /code/vtlib/Vtiger/Link.php:80
          Open

                  Link::addLink($this->id, $type, $label, $url, $iconpath, $sequence, $handlerInfo);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Argument 2 (replace) is false but \str_replace() takes array|string
          Open

                          $targetPath = str_replace('_ModuleName_', $this->name, $targetPath);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Callback function name of this module to use as handler': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Callback function name of this module to use as handler
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::getSchema
          Open

                      $schema = $db->getSchema();
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string URL value to lookup': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string URL value to lookup
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param string Module name': after string, did not see an element name (will guess based on comment order)
          Open

               * @param string Module name
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Call to undeclared method \App\Db::createCommand
          Open

                      \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['presence' => $enableDisable], ['name' => $moduleName])->execute();
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Call to method trace from undeclared class \App\Log
          Open

                      \App\Log::trace("Invoking moduleHandler for $eventType ...START", __METHOD__);
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Saw possibly unextractable annotation for a fragment of comment '* @param mixed id or name of the module': after mixed, did not see an element name (will guess based on comment order)
          Open

               * @param mixed id or name of the module
          Severity: Info
          Found in vtlib/Vtiger/Module.php by phan

          Argument 2 (key) is bool|int but \App\Cache::staticDelete() takes string defined at /code/app/Cache.php:169
          Open

                      \App\Cache::staticDelete('module', $tabId);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
          Open

                              copy($langFile, 'languages/' . $prefix . '/' . $this->name . '.json');
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Call to method trace from undeclared class \App\Log
          Open

                      \App\Log::trace("Invoking moduleHandler for $eventType ...DONE", __METHOD__);
          Severity: Critical
          Found in vtlib/Vtiger/Module.php by phan

          Argument 2 (key) is bool|int but \App\Cache::delete() takes string defined at /code/app/Cache.php:105
          Open

                      \App\Cache::delete('moduleTabById', $tabId);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phan

          Avoid variables with short names like $id. Configured minimum length is 3.
          Open

                  $id = (new \App\Db\Query())
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          ShortVariable

          Since: 0.2

          Detects when a field, local, or parameter has a very short name.

          Example

          class Something {
              private $q = 15; // VIOLATION - Field
              public static function main( array $as ) { // VIOLATION - Formal
                  $r = 20 + $this->q; // VIOLATION - Local
                  for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                      $r += $this->q;
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#shortvariable

          Avoid variables with short names like $id. Configured minimum length is 3.
          Open

                      $id = $db->getLastInsertID('vtiger_relatedlists_relation_id_seq');
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          ShortVariable

          Since: 0.2

          Detects when a field, local, or parameter has a very short name.

          Example

          class Something {
              private $q = 15; // VIOLATION - Field
              public static function main( array $as ) { // VIOLATION - Formal
                  $r = 20 + $this->q; // VIOLATION - Local
                  for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                      $r += $this->q;
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#shortvariable

          Avoid variables with short names like $db. Configured minimum length is 3.
          Open

                  $db = \App\Db::getInstance();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          ShortVariable

          Since: 0.2

          Detects when a field, local, or parameter has a very short name.

          Example

          class Something {
              private $q = 15; // VIOLATION - Field
              public static function main( array $as ) { // VIOLATION - Formal
                  $r = 20 + $this->q; // VIOLATION - Local
                  for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                      $r += $this->q;
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#shortvariable

          The parameter $function_name is not named in camelCase.
          Open

              public function unsetRelatedList($moduleInstance, $label = '', $function_name = 'getRelatedList')
              {
                  if (empty($moduleInstance)) {
                      return;
                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          CamelCaseParameterName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name parameters.

          Example

          class ClassName {
              public function doSomething($user_name) {
              }
          }

          Source

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Only one argument is allowed per line in a multi-line function call
          Open

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param Module Instance of target module with which relation should be setup
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $label = $moduleInstance->name;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param array List of action button to show ('ADD', 'SELECT')
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $useactionsText = $actions;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Callback function name of this module to use as handler
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $useactionsText = strtoupper($useactionsText);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $isExists = (new \App\Db\Query())
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 150 characters
          Open

                      \App\Log::trace("Setting relation with $moduleInstance->name [$useactionsText] ... Error, the related module already exists", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'label' => $label,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              'relation_id' => $id,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $db->createCommand()->createIndex("{$refTableName['table']}_relcrmid_idx", $refTableName['table'], 'relcrmid')->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->exists();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $db->createCommand()->addForeignKey(
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'sequence' => $sequence,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          ->from('vtiger_field')
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              'fieldid' => $allFields[$value]['fieldid'],
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $id = (new \App\Db\Query())
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed      $iconpath
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed      $sequence
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed|null $handlerInfo
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $targetPath = str_replace('_ModuleName_', $this->name, $targetPath);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $label
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          } else {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Get all the custom links related to this module.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Initialize webservice setup for this module instance.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function initWebservice()
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              $replacevars = [
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '<ModuleLabel>' => $this->label,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $fields
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->select(['relation_id'])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'tabid' => $this->id,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'presence' => $presence,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->scalar();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $createCommand->delete('vtiger_relatedlists', ['relation_id' => $id])->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Label to use for display
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * $RECORD (record on which link is dispalyed)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Display label to lookup
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $targetpath = 'modules/' . $this->name;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      foreach ($objects as $name => $object) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '<ModuleName>' => $this->name,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 139 characters
          Open

                                  '<_baseTableName_>' => 'u_' . (\App\Db::getInstance()->getConfig('base')['tablePrefix']) . strtolower($this->name),
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @var bool
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'field_name' => $fieldName,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 139 characters
          Open

                              "fk_2_{$refTableName['table']}", $refTableName['table'], 'relcrmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      return;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Type can be like 'DETAIL_VIEW_BASIC', 'LISTVIEW' etc..
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string URL value to lookup
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $type
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $db = \App\Db::getInstance();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $actions = ['ADD'];
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->from('vtiger_relatedlists')
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      return;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'related_tabid' => $moduleInstance->id,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              'relcrmid' => 'int',
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 138 characters
          Open

                          $db->createCommand()->createIndex("{$refTableName['table']}_relcrmid_idx", $refTableName['table'], 'relcrmid')->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * NOTE: $url can have variables like $MODULE (module for which link is associated),
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $templatepath = 'vtlib/ModuleDir/BaseModule/';
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              if (!is_dir($targetPath)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public $allowExport = false;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Get related list sequence to use.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 155 characters
          Open

                      ->where(['tabid' => $this->id, 'related_tabid' => $moduleInstance->id, 'name' => $functionName, 'label' => $label, 'field_name' => $fieldName])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if ($fields) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          ->indexBy('fieldname')->all();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $db->createTable($refTableName['table'], [
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  \App\Log::trace("Setting relation with $moduleInstance->name  ... DONE", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (empty($label)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->select(['relation_id'])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $createCommand = \App\Db::getInstance()->createCommand();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function addLink($type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function deleteLink($type, $label, $url = false)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function getLinks()
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if ($isExists) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if ('getManyToMany' === $functionName) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Label to display in related list (default is target module name)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->from('vtiger_relatedlists')
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->where(['tabid' => $this->id, 'related_tabid' => $moduleInstance->id, 'name' => $function_name, 'label' => $label])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Add custom link for a module page.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $url
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          if (is_dir($name)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '<entityfieldlabel>' => $entityField->label,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Set related list information between other module.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      ->where(['tabid' => $this->id, 'related_tabid' => $moduleInstance->id, 'name' => $functionName, 'label' => $label, 'field_name' => $fieldName])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $db->createCommand()->createIndex("{$refTableName['table']}_crmid_idx", $refTableName['table'], 'crmid')->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $db->createCommand()->addForeignKey(
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function unsetRelatedList($moduleInstance, $label = '', $function_name = 'getRelatedList')
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  \App\Relation::clearCacheById($id);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  \App\Log::trace("Unsetting relation with $moduleInstance->name ... DONE", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Path to the image file (relative or absolute)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (empty($label)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          ]);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Callback function name of this module to use as handler
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '<_baseTableName_>' => 'u_' . (\App\Db::getInstance()->getConfig('base')['tablePrefix']) . strtolower($this->name),
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'actions' => $useactionsText,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 132 characters
          Open

                          $db->createCommand()->createIndex("{$refTableName['table']}_crmid_idx", $refTableName['table'], 'crmid')->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Unset related list information that exists with other module.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $label
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  Link::deleteLink($this->id, $type, $label, $url);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $flags = \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $moduleInstance
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $fieldName
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      return;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (\is_array($actions)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  ])->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              'sequence' => $key,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $schema = $db->getSchema();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      if (!$schema->getTableSchema($refTableName['table'])) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param \Module Instance of target module with which relation should be setup
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $function_name
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (empty($moduleInstance)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed      $type
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  Link::addLink($this->id, $type, $label, $url, $iconpath, $sequence, $handlerInfo);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  Webservice::initialize($this);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 150 characters
          Open

                      $objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($templatepath, $flags), \RecursiveIteratorIterator::SELF_FIRST);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  mkdir($targetPath, 0755);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '<entityfieldname>' => $entityField->name,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '_ModuleName_' => $this->name,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Allow export.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $actions
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $functionName
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      'name' => $functionName,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $allFields = (new \App\Db\Query())->select(['fieldid', 'fieldname'])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          ->where(['tabid' => $moduleInstance->id])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          ])->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 136 characters
          Open

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          )->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function createFiles(Field $entityField)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function __getNextRelatedListSequence()
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $label
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  // Allow ADD action of other module records (default)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (false === $actions) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          )->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $createCommand->delete('vtiger_relatedlists_fields', ['relation_id' => $id])->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Delete custom link of a module.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (!is_file($targetpath)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($templatepath, $flags), \RecursiveIteratorIterator::SELF_FIRST);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $targetPath = str_replace($templatepath, '', $name);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @return int
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Label to display in related list (default is target module name)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $sequence = $this->__getNextRelatedListSequence();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $db->createCommand()->insert('vtiger_relatedlists_fields', [
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $refTableName = \Vtiger_Relation_Model::getReferenceTableInfo($moduleInstance->name, $this->name);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string HREF value to use for generated link
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed      $label
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Type can be like 'DETAIL_VIEW_BASIC', 'LISTVIEW' etc..
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 125 characters
          Open

                      $flags = \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              $fileContent = file_get_contents($name);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $useactionsText = implode(',', $actions);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Log::trace("Setting relation with $moduleInstance->name [$useactionsText] ... Error, the related module already exists", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $label = $moduleInstance->name;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param int Sequence of appearance
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return Link::getAll($this->id);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '<modulename>' => strtolower($this->name),
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return (new \App\Db\Query())->from('vtiger_relatedlists')->where(['tabid' => $this->id])->max('sequence') + 1;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 149 characters
          Open

              public function setRelatedList($moduleInstance, $label = '', $actions = false, $functionName = 'getRelatedList', $fieldName = null, $fields = [])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (empty($moduleInstance)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $presence = 0; // 0 - Enabled, 1 - Disabled
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $db->createCommand()->insert('vtiger_relatedlists', [
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $id = $db->getLastInsertID('vtiger_relatedlists_relation_id_seq');
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      foreach ($fields as $key => $value) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              'crmid' => 'int',
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              "fk_1_{$refTableName['table']}", $refTableName['table'], 'crmid', 'vtiger_crmentity', 'crmid', 'CASCADE', 'RESTRICT'
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  \App\Cache::clear();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $moduleInstance
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 128 characters
          Open

                      ->where(['tabid' => $this->id, 'related_tabid' => $moduleInstance->id, 'name' => $function_name, 'label' => $label])
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  '<entitycolumn>' => $entityField->column,
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $value
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Get instance of the module class.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      if (null !== $fire && true !== $fire) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return $return;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @return bool
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @return self
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public static function getInstance($value)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $modulename
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $eventType
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Log::trace("Invoking moduleHandler for $eventType ...START", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $eventType = false;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function isModuleUpgradable(): bool
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      Deprecated::checkFileAccessForInclusion($filepath);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return $instance;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public static function fireEvent($modulename, $eventType)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Cache::delete('moduleTabByName', $moduleName);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Check if this module is customized.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return $this->allowExport || ($this->isCustomizable() && 0 === $this->premium);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          if (\App\Language::DEFAULT_LANG !== $prefix) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Log::trace("Invoking moduleHandler for $eventType ...DONE", __METHOD__);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public static function toggleModuleAccess($moduleName, $enableDisable)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $enableDisable = 0;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $eventType = self::EVENT_MODULE_ENABLED;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Cache::staticDelete('module', $moduleName);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Fire the event for the module (if moduleHandler is defined).
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function isCustomizable(): bool
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $languages = \App\Language::getAll(false);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Get instance by id or name.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $instance->initialize($data);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $filepath = "modules/$modulename/$modulename.php";
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (true === $enableDisable) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Cache::delete('moduleTabById', $tabId);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if (Utils::checkFileAccessForInclusion($filepath, false)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $moduleName
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $enableDisable = 1;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Cache::staticDelete('module', $tabId);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return $this->isCustomizable() && 0 === $this->premium;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              copy($langFile, 'languages/' . $prefix . '/' . $this->name . '.json');
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @return bool
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed id or name of the module
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      if (class_exists($modulename)) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['presence' => $enableDisable], ['name' => $moduleName])->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Cache::delete('moduleTabs', 'all');
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              ];
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              foreach ($replacevars as $key => $value) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $menuRecordModel = new \Settings_Menu_Record_Model();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public function isExportable(): bool
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              file_put_contents($targetPath, $fileContent);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $modulename
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $fire = $instance->moduleHandler((string) $modulename, (string) $eventType);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                                  $fileContent = str_replace($key, addslashes($value), $fileContent);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param string Module name
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $instance = false;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if ($instance && method_exists($instance, 'moduleHandler')) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @param mixed $enableDisable
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $fire = self::fireEvent($moduleName, $eventType);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \Settings_GlobalPermission_Record_Model::recalculate();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $menuRecordModel->refreshMenuFiles();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $instance = false;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return $instance;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              public static function getClassInstance($modulename)
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $return = true;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $instance = self::getClassInstance((string) $modulename);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  return 1 === $this->customized;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $instance = new $modulename();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                          $return = false;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Toggle the module (enable/disable).
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $eventType = self::EVENT_MODULE_DISABLED;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if ($fire) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          Line exceeds 120 characters; contains 142 characters
          Open

                      \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['presence' => $enableDisable], ['name' => $moduleName])->execute();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      \App\Module::createModuleMetaFile();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               */
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  if ($data) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $instance = new self();
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              /**
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      include_once $filepath;
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

              {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Check if this module is upgradable.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * @return bool
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               * Check if this module is exportable.
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $langFile = 'languages/' . \App\Language::DEFAULT_LANG . '/' . $this->name . '.json';
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      foreach ($languages as $prefix => $language) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

               *
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  $data = Functions::getModuleData($value);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                  } elseif (false === $enableDisable) {
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

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

                      $tabId = \App\Module::getModuleId($moduleName);
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpcodesniffer

          The variable $function_name is not named in camelCase.
          Open

              public function unsetRelatedList($moduleInstance, $label = '', $function_name = 'getRelatedList')
              {
                  if (empty($moduleInstance)) {
                      return;
                  }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          CamelCaseVariableName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name variables.

          Example

          class ClassName {
              public function doSomething() {
                  $data_module = new DataModule();
              }
          }

          Source

          The method __getNextRelatedListSequence is not named in camelCase.
          Open

              public function __getNextRelatedListSequence()
              {
                  return (new \App\Db\Query())->from('vtiger_relatedlists')->where(['tabid' => $this->id])->max('sequence') + 1;
              }
          Severity: Minor
          Found in vtlib/Vtiger/Module.php by phpmd

          CamelCaseMethodName

          Since: 0.2

          It is considered best practice to use the camelCase notation to name methods.

          Example

          class ClassName {
              public function get_name() {
              }
          }

          Source

          There are no issues that match your filters.

          Category
          Status