YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
D
1 day
Test Coverage
F
32%

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

<?php

/**
 * Watching Model Class.
 *
Severity: Minor
Found in modules/Vtiger/models/Watchdog.php - About 3 hrs to fix

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

    class Vtiger_Watchdog_Model extends \App\Base
    {
        const RECORD_ACTIVE = 1;
    
        protected static $cacheFile = 'user_privileges/watchdogModule.php';
    Severity: Minor
    Found in modules/Vtiger/models/Watchdog.php by phpmd

    Function getWatchingUsers has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getWatchingUsers($restrictUsers = [])
        {
            if (!$this->watchingUsers) {
                $users = $this->getModuleUsers();
                if ($this->has('record')) {
    Severity: Minor
    Found in modules/Vtiger/models/Watchdog.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

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

        public static function reloadCache()
        {
            $members = $users = [];
            $dataReader = (new App\Db\Query())->from('u_#__watchdog_module')->createCommand()->query();
            while ($row = $dataReader->read()) {
    Severity: Minor
    Found in modules/Vtiger/models/Watchdog.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 reloadCache has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function reloadCache()
        {
            $members = $users = [];
            $dataReader = (new App\Db\Query())->from('u_#__watchdog_module')->createCommand()->query();
            while ($row = $dataReader->read()) {
    Severity: Minor
    Found in modules/Vtiger/models/Watchdog.php - About 1 hr to fix

      Method getWatchingMembers has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getWatchingMembers($getData = false)
          {
              $query = (new App\Db\Query())
                  ->select(['member', 'lock', 'exceptions'])
                  ->from('u_#__watchdog_module')
      Severity: Minor
      Found in modules/Vtiger/models/Watchdog.php - About 1 hr to fix

        Method getWatchingUsers has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getWatchingUsers($restrictUsers = [])
            {
                if (!$this->watchingUsers) {
                    $users = $this->getModuleUsers();
                    if ($this->has('record')) {
        Severity: Minor
        Found in modules/Vtiger/models/Watchdog.php - About 1 hr to fix

          Function setSchedulerByUser has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function setSchedulerByUser($sendNotifications, $frequency, $ownerId = false)
              {
                  if (false === $ownerId) {
                      $ownerId = \App\User::getCurrentUserId();
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php - About 45 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function getWatchingModulesSchedule has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function getWatchingModulesSchedule($ownerId = false, $isName = false)
              {
                  if (false === $ownerId) {
                      $ownerId = \App\User::getCurrentUserId();
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php - About 45 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function getWatchingMembers has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getWatchingMembers($getData = false)
              {
                  $query = (new App\Db\Query())
                      ->select(['member', 'lock', 'exceptions'])
                      ->from('u_#__watchdog_module')
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php - About 45 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function getWatchingModules has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function getWatchingModules($userId = false)
              {
                  if (false === $userId) {
                      $userId = \App\User::getCurrentUserId();
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php - About 25 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

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

              public static function reloadCache()
              {
                  $members = $users = [];
                  $dataReader = (new App\Db\Query())->from('u_#__watchdog_module')->createCommand()->query();
                  while ($row = $dataReader->read()) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 18 to the 15 allowed.
          Open

              public function getWatchingUsers($restrictUsers = [])
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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

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

              public static function reloadCache()
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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

          Missing class import via use statement (line '150', column '17').
          Open

                  $state = (new \App\Db\Query())->select(['state'])->from('u_#__watchdog_record')->where(['userid' => $userId, 'record' => $this->get('record')])->scalar();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 getWatchingModulesSchedule has a boolean flag argument $ownerId, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public static function getWatchingModulesSchedule($ownerId = false, $isName = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 '208', column '16').
          Open

                  $data = (new \App\Db\Query())
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 getWatchingModules has a boolean flag argument $userId, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public static function getWatchingModules($userId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 '128', column '15').
          Open

                  return (new \App\Db\Query())
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 getWatchingModulesSchedule has a boolean flag argument $isName, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public static function getWatchingModulesSchedule($ownerId = false, $isName = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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

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

              public static function getInstanceById($record, $moduleName, $userId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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

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

              public static function getInstance($moduleName, $userId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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

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

              public static function setSchedulerByUser($sendNotifications, $frequency, $ownerId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 '445', column '22').
          Open

                  $dataReader = (new App\Db\Query())->from('u_#__watchdog_module')->createCommand()->query();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 '335', column '21').
          Open

                      $isExists = (new \App\Db\Query())->from('u_#__watchdog_schedule')->where(['userid' => $ownerId])->exists();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 getWatchingMembers has a boolean flag argument $getData, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public function getWatchingMembers($getData = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 '356', column '24').
          Open

                          $dataReader = (new App\Db\Query())->select(['userid', 'state'])
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 '391', column '17').
          Open

                  $query = (new App\Db\Query())
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 isLock has a boolean flag argument $moduleId, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public function isLock($moduleId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 '431', column '22').
          Open

                  $exceptions = (new App\Db\Query())
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 changeModuleState has a boolean flag argument $member, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public function changeModuleState($state, $member = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          BooleanArgumentFlag

          Since: 1.4.0

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

          Example

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

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

          Avoid using static access to class '\App\Module' in method 'getInstance'.
          Open

                      $moduleName = \App\Module::getModuleName($moduleName);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'isWatchingRecord'.
          Open

                      return (bool) \App\Cache::staticGet('isWatchingRecord', $cacheName);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getInstance'.
          Open

                  if (\App\Cache::staticHas('WatchdogModel', $cacheName)) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getInstance'.
          Open

                  $instance->set('moduleId', $moduleId ?: \App\Module::getModuleId($moduleName));
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingModules'.
          Open

                      return \App\Cache::staticGet('getWatchingModules', $userId);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingModules'.
          Open

                  \App\Cache::staticSave('getWatchingModules', $userId, $modules);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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\User' in method 'getWatchingModules'.
          Open

                      $userId = \App\User::getCurrentUserId();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingModules'.
          Open

                  if (\App\Cache::staticHas('getWatchingModules', $userId)) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingModulesSchedule'.
          Open

                      return \App\Cache::staticGet('getWatchingModulesSchedule', $cacheName);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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\Config' in method 'getInstance'.
          Open

                  if (false === App\Config::module('ModTracker', 'WATCHDOG')) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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_Loader' in method 'getInstance'.
          Open

                  $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'Watchdog', $moduleName);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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\User' in method 'getInstance'.
          Open

                      $userId = \App\User::getCurrentUserId();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingModulesSchedule'.
          Open

                  if (\App\Cache::staticHas('getWatchingModulesSchedule', $cacheName)) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getInstance'.
          Open

                      return \App\Cache::staticGet('WatchdogModel', $cacheName);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getInstance'.
          Open

                  \App\Cache::staticSave('WatchdogModel', $cacheName, $instance);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'isWatchingRecord'.
          Open

                  if (\App\Cache::staticHas('isWatchingRecord', $cacheName)) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'setSchedulerByUser'.
          Open

                  $db = \App\Db::getInstance();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingMembers'.
          Open

                                  $name = \App\Language::translate(\App\Fields\Owner::getGroupName($data[1]), $this->get('module'));
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingModulesSchedule'.
          Open

                  \App\Cache::staticSave('getWatchingModulesSchedule', $cacheName, $data);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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\PrivilegeUtil' in method 'reloadCache'.
          Open

                      $users = \App\PrivilegeUtil::getUserByMember($row['member']);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                  } else {
                      $isExists = $this->isWatchingModuleConfig($member);
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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

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

                              } else {
                                  unset($users[$row['userid']]);
                              }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          ElseExpression

          Since: 1.4.0

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

          Example

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

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

          Avoid using static access to class '\App\Module' in method 'getWatchingExceptions'.
          Open

                      ->where(['module' => \App\Module::getModuleId($this->get('module')), 'member' => $member])->scalar();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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\Utils' in method 'reloadCache'.
          Open

                  App\Utils::saveToFile(static::$cacheFile, \App\Utils::varExport($cache), '', LOCK_EX, true);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingModulesSchedule'.
          Open

                              $moduleId = \App\Module::getModuleName($moduleId);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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\PrivilegeUtil' in method 'getWatchingMembers'.
          Open

                                  $name = \App\Language::translate(\App\PrivilegeUtil::getRoleName($data[1]), $this->get('module'));
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                      } else {
                          $members[$row['module']]['byUsers'] = $users;
                      }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          ElseExpression

          Since: 1.4.0

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

          Example

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

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

          Avoid using static access to class '\App\Cache' in method 'isWatchingRecord'.
          Open

                  \App\Cache::staticSave('isWatchingRecord', $cacheName, $return);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'changeRecordState'.
          Open

                  $db = \App\Db::getInstance();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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\User' in method 'setSchedulerByUser'.
          Open

                      $ownerId = \App\User::getCurrentUserId();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                  } else {
                      $users = $this->watchingUsers;
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          ElseExpression

          Since: 1.4.0

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

          Example

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

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

          Avoid using static access to class 'App\Utils' in method 'reloadCache'.
          Open

                  App\Utils::saveToFile(static::$cacheFile, \App\Utils::varExport($cache), '', LOCK_EX, true);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                  return Vtiger_Module_Model::getAll([0], ['Integration', 'Dashboard', 'ModComments', 'Notification'], true);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                  } else {
                      if (\is_array($sendNotifications)) {
                          $sendNotifications = implode(',', $sendNotifications);
                      }
                      $isExists = (new \App\Db\Query())->from('u_#__watchdog_schedule')->where(['userid' => $ownerId])->exists();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          ElseExpression

          Since: 1.4.0

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

          Example

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

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

          Avoid using static access to class '\App\User' in method 'getWatchingModulesSchedule'.
          Open

                      $ownerId = \App\User::getCurrentUserId();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'changeModuleState'.
          Open

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

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                                  $name = \App\Language::translate(\App\Fields\Owner::getGroupName($data[1]), $this->get('module'));
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                  } else {
                      $members = $query->column();
                  }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          ElseExpression

          Since: 1.4.0

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

          Example

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

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

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

                                  $name = \App\Fields\Owner::getUserLabel($data[1]);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 'getWatchingMembers'.
          Open

                                  $name = \App\Language::translate(\App\PrivilegeUtil::getRoleName($data[1]), $this->get('module'));
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          StaticAccess

          Since: 1.4.0

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

          Example

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

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

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

                      } else {
                          $db->createCommand()->insert('u_#__watchdog_schedule', ['frequency' => $frequency, 'modules' => $sendNotifications, 'userid' => $ownerId])->execute();
                      }
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          ElseExpression

          Since: 1.4.0

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

          Example

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

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

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

                  if (\App\Cache::staticHas('isWatchingRecord', $cacheName)) {
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "getWatchingModulesSchedule" 3 times.
          Open

                  if (\App\Cache::staticHas('getWatchingModulesSchedule', $cacheName)) {
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "modules" 5 times.
          Open

                      $data['modules'] = explode(',', $data['modules']);
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "u_#__watchdog_record" 4 times.
          Open

                  $state = (new \App\Db\Query())->select(['state'])->from('u_#__watchdog_record')->where(['userid' => $userId, 'record' => $this->get('record')])->scalar();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "module" 17 times.
          Open

                  $instance->set('module', $moduleName);
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "Groups" 3 times.
          Open

                              case 'Groups':
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "userid" 12 times.
          Open

                  $state = (new \App\Db\Query())->select(['state'])->from('u_#__watchdog_record')->where(['userid' => $userId, 'record' => $this->get('record')])->scalar();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "getWatchingModules" 3 times.
          Open

                  if (\App\Cache::staticHas('getWatchingModules', $userId)) {
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "WatchdogModel" 3 times.
          Open

                  if (\App\Cache::staticHas('WatchdogModel', $cacheName)) {
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "byUsers" 4 times.
          Open

                          $members[$row['module']]['byUsers'] = array_merge($members[$row['module']]['byUsers'], $users);
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "u_#__watchdog_module" 8 times.
          Open

                      ->from('u_#__watchdog_module')
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "Users" 3 times.
          Open

                              case 'Users':
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "member" 10 times.
          Open

                      ->where(['member' => $member, 'module' => $this->get('moduleId')])
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "isRecordExists" 3 times.
          Open

                  $this->set('isRecordExists', false);
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "moduleId" 9 times.
          Open

                  $instance->set('moduleId', $moduleId ?: \App\Module::getModuleId($moduleName));
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "u_#__watchdog_schedule" 5 times.
          Open

                      ->from('u_#__watchdog_schedule')
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "userId" 7 times.
          Open

                  $instance->set('userId', $userId);
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by sonar-php

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

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

          Noncompliant Code Example

          With the default threshold of 3:

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

          Compliant Solution

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

          Exceptions

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

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

                  $instance->set('record', $record);
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "exceptions" 7 times.
          Open

                      ->update('u_#__watchdog_module', ['exceptions' => $exceptions], ['member' => $member, 'module' => $this->get('moduleId')])
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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 "state" 4 times.
          Open

                  $state = (new \App\Db\Query())->select(['state'])->from('u_#__watchdog_record')->where(['userid' => $userId, 'record' => $this->get('record')])->scalar();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.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.

          Default value for int $userId can't be false
          Open

              public static function getInstance($moduleName, $userId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Returning type int but isWatchingRecord() is declared to return bool
          Open

                  return $return;
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Default value for int $ownerId can't be false
          Open

              public static function getWatchingModulesSchedule($ownerId = false, $isName = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  $data = (new \App\Db\Query())
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                          $db->createCommand()->update('u_#__watchdog_schedule', ['frequency' => $frequency, 'modules' => $sendNotifications], ['userid' => $ownerId])->execute();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Suspicious array access to false
          Open

                  return isset(static::$cache[$moduleId][$userId]) ? (bool) static::$cache[$moduleId][$userId] : false;
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Argument 2 (key) is int but \App\Cache::staticHas() takes string defined at /code/app/Cache.php:141
          Open

                  if (\App\Cache::staticHas('getWatchingModules', $userId)) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
          Open

                      $ownerId = \App\User::getCurrentUserId();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                          $db->createCommand()->insert('u_#__watchdog_schedule', ['frequency' => $frequency, 'modules' => $sendNotifications, 'userid' => $ownerId])->execute();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  $dataReader = (new App\Db\Query())->from('u_#__watchdog_module')->createCommand()->query();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Default value for int $ownerId can't be false
          Open

              public static function setSchedulerByUser($sendNotifications, $frequency, $ownerId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                          $dataReader = (new App\Db\Query())->select(['userid', 'state'])
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Default value for string $member can't be false
          Open

              public function changeModuleState($state, $member = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  $query = (new App\Db\Query())
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
          Open

                      $userId = \App\User::getCurrentUserId();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  $state = (new \App\Db\Query())->select(['state'])->from('u_#__watchdog_record')->where(['userid' => $userId, 'record' => $this->get('record')])->scalar();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Argument 1 (tabId) is string but \App\Module::getModuleName() takes int defined at /code/app/Module.php:129
          Open

                              $moduleId = \App\Module::getModuleName($moduleId);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  return $db->createCommand()->update(('u_#__watchdog_record'), $row, ['userid' => $this->get('userId'), 'record' => $this->get('record')])->execute();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Method \Vtiger_Watchdog_Model::setSchedulerByUser is declared to return int but has no return value
          Open

              public static function setSchedulerByUser($sendNotifications, $frequency, $ownerId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
          Open

                      $userId = \App\User::getCurrentUserId();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          false passed to foreach instead of array
          Open

                  foreach (static::$cache as $moduleId => $users) {
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Suspicious array access to false
          Open

                      $usersKey = array_keys(static::$cache[$tabid]);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Argument 2 (key) is int but \App\Cache::staticGet() takes string defined at /code/app/Cache.php:128
          Open

                      return \App\Cache::staticGet('getWatchingModules', $userId);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                      $isExists = (new \App\Db\Query())->from('u_#__watchdog_schedule')->where(['userid' => $ownerId])->exists();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Default value for int $userId can't be false
          Open

              public static function getWatchingModules($userId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                                  $name = \App\Language::translate(\App\Fields\Owner::getGroupName($data[1]), $this->get('module'));
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  return App\Db::getInstance()
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                                  $name = \App\Fields\Owner::getUserLabel($data[1]);
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                      return $db->createCommand()->insert('u_#__watchdog_module', [
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                      $db->createCommand()->delete('u_#__watchdog_schedule', ['userid' => $ownerId])->execute();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  return (new \App\Db\Query())
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Argument 1 (roleId) is string but \App\PrivilegeUtil::getRoleName() takes int defined at /code/app/PrivilegeUtil.php:492
          Open

                                  $name = \App\Language::translate(\App\PrivilegeUtil::getRoleName($data[1]), $this->get('module'));
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  return \App\Db::getInstance()
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  $exceptions = (new App\Db\Query())
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Assigning array to property but \Vtiger_Watchdog_Model->watchingUsers is false
          Open

                      $this->watchingUsers = $users;
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
          Open

                      $ownerId = \App\User::getCurrentUserId();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                      return $db->createCommand()->insert('u_#__watchdog_record', $row)->execute();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

          Default value for int $userId can't be false
          Open

              public static function getInstanceById($record, $moduleName, $userId = false)
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

          Argument 2 (key) is int but \App\Cache::staticSave() takes string defined at /code/app/Cache.php:156
          Open

                  \App\Cache::staticSave('getWatchingModules', $userId, $modules);
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phan

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

                  return $db->createCommand()->delete('u_#__watchdog_module', ['member' => $member, 'module' => $moduleId])->execute();
          Severity: Critical
          Found in modules/Vtiger/models/Watchdog.php by phan

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

          class Vtiger_Watchdog_Model extends \App\Base

          The class Vtiger_Watchdog_Model is not named in CamelCase.
          Open

          class Vtiger_Watchdog_Model extends \App\Base
          {
              const RECORD_ACTIVE = 1;
          
              protected static $cacheFile = 'user_privileges/watchdogModule.php';
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.php by phpmd

          CamelCaseClassName

          Since: 0.2

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

          Example

          class class_name {
          }

          Source

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

                  $db = \App\Db::getInstance();
          Severity: Minor
          Found in modules/Vtiger/models/Watchdog.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 modules/Vtiger/models/Watchdog.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 modules/Vtiger/models/Watchdog.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

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

              public $noticeDefaultType = 'PLL_SYSTEM';

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

              public static function getInstance($moduleName, $userId = false)

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

                  $cacheName = $moduleName . $userId;

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

              public function isWatchingModuleConfig($member)

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

                  }

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

              protected static $cache = false;

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

               * Function to get the instance by id.

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

               */

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

              /**

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

                  }

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

               * Function verifies if module is locked.

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

              {

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

                      ->from('u_#__watchdog_module')

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

              }

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

               */

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

                  }

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

              public function isLock($moduleId = false)

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

                  return isset(static::$cache[$moduleId][$userId]) ? (bool) static::$cache[$moduleId][$userId] : false;

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

               * Function verifies if module is watching in database.

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

                  $userId = $this->get('userId');

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

                  if (\App\Cache::staticHas('isWatchingRecord', $cacheName)) {

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

               * @param int        $userId

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

                  $moduleId = false;

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

                  if (!$this->isActive()) {

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

              {

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

                  return $this->isAcive;

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

              public static function getInstanceById($record, $moduleName, $userId = false)

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

              }

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

               *

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

              {

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

              /**

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

              }

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

               *

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

                      return false;

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

                  $cacheName = $userId . '_' . $this->get('record');

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

              {

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

              {

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

                      $userId = \App\User::getCurrentUserId();

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

                  if (false === App\Config::module('ModTracker', 'WATCHDOG')) {

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

               *

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

               *

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

                  $userId = $this->get('userId');

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

                  if (empty($moduleId)) {

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

               *

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

               * @return bool

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

                  \App\Cache::staticSave('isWatchingRecord', $cacheName, $return);

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

               * Function get watching modules.

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

               * @return Vtiger_Watchdog_Model

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

                  $instance->set('record', $record);

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

               *

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

                  }

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

               * Function checks if module is watched.

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

               *

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

              /**

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

               * @param mixed $member

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

              /**

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

                  $state = (new \App\Db\Query())->select(['state'])->from('u_#__watchdog_record')->where(['userid' => $userId, 'record' => $this->get('record')])->scalar();

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

                  if (false !== $state) {

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

                  $return = (int) $return;

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

               * @param int $userId - User ID

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

                  if (empty($userId)) {

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

               */

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

                  $tabId = $this->get('moduleId');

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

              /**

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

               */

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

               * @return bool

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

                  return (new \App\Db\Query())

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

                      ->exists();

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

                      return (bool) \App\Cache::staticGet('isWatchingRecord', $cacheName);

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

                  $return = $this->isWatchingModule();

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

               * @param int        $record

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

               * @param int|string $moduleName

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

                  if (is_numeric($moduleName)) {

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

                      $moduleId = $moduleName;

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

                      $moduleName = \App\Module::getModuleName($moduleName);

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

                  if (\App\Cache::staticHas('WatchdogModel', $cacheName)) {

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

              }

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

                      ->where(['member' => $member, 'module' => $this->get('moduleId')])

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

               * Function verifies if rekord is watching.

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

               *

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

               *

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

               * @param int        $userId

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

                  $instance->set('module', $moduleName);

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

                  $instance->set('moduleId', $moduleId ?: \App\Module::getModuleId($moduleName));

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

               * @param mixed $moduleId

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

               */

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

              {

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

                      $this->set('isRecordExists', true);

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

               *

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

                  return $instance;

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

                      $instance->isActive = false;

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

               * @return bool

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

              public function isActive()

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

              }

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

              /**

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

               * @return bool

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

              }

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

               * Function to get the instance by module.

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

               * @param int|string $moduleName

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

                  $instance->set('userId', $userId);

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

                  if (false === static::$cache) {

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

              }

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

              public function isWatchingModule()

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

              {

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

               * Function verifies if module is active.

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

              public function isWatchingRecord()

          Line exceeds 120 characters; contains 162 characters
          Open

                  $state = (new \App\Db\Query())->select(['state'])->from('u_#__watchdog_record')->where(['userid' => $userId, 'record' => $this->get('record')])->scalar();

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

                  $this->set('isRecordExists', false);

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

                      $return = $state;

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

               */

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

              private $isAcive = true;

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

                      return \App\Cache::staticGet('WatchdogModel', $cacheName);

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

                      $moduleId = $this->get('moduleId');

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

                  return $return;

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

              /**

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

              public static function getWatchingModules($userId = false)

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

                  if (false === $userId) {

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

                      $userId = \App\User::getCurrentUserId();

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

              const RECORD_ACTIVE = 1;

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

              protected static $cacheFile = 'user_privileges/watchdogModule.php';

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

              protected $watchingUsers = false;

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

              /**

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

                  }

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

                  $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'Watchdog', $moduleName);

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

                      static::$cache = require static::$cacheFile;

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

               *

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

                      return false;

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

               * @return bool

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

               *

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

               *

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

                  $instance = self::getInstance($moduleName, $userId);

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

                  }

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

                  $instance = new $modelClassName();

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

                  }

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

                  \App\Cache::staticSave('WatchdogModel', $cacheName, $instance);

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

                  return $instance;

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

               */

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

              {

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

                  }

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

               * @return Vtiger_Watchdog_Model

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

                  return isset(static::$cache[$tabId][$this->get('userId')]);

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

                  }

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

               */

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

                  if (!$this->isActive()) {

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

                  }

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

               * @return array - List of modules

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

                  }

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

                  }

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

                      static::$cache = require static::$cacheFile;

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

               *

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

               * @param int   $ownerId - User ID

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

                  }

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

                  $row = ['state' => $state];

          Line exceeds 120 characters; contains 157 characters
          Open

                  return $db->createCommand()->update(('u_#__watchdog_record'), $row, ['userid' => $this->get('userId'), 'record' => $this->get('record')])->execute();

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

               * @param int    $state

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

                      ->update('u_#__watchdog_module', ['lock' => $state], ['member' => $member, 'module' => $this->get('moduleId')])

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

                      return \App\Cache::staticGet('getWatchingModules', $userId);

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

                  \App\Cache::staticSave('getWatchingModulesSchedule', $cacheName, $data);

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

                  return $data;

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

                  if (!$this->get('isRecordExists')) {

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

                  }

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

              }

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

               * @param string $member

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

               * @param string       $member

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

                      ->createCommand()

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

               * Function to set user's schedule.

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

                  if ($data) {

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

                  if ($isWatchingRecord && self::RECORD_ACTIVE === $state) {

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

                      $isExists = $this->isWatchingModule();

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

                  }

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

                      ->execute();

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

              {

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

              }

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

              public static function getWatchingModulesSchedule($ownerId = false, $isName = false)

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

                  }

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

                  if (\App\Cache::staticHas('getWatchingModulesSchedule', $cacheName)) {

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

                      ->one();

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

              }

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

              /**

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

                  $db = \App\Db::getInstance();

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

               *

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

                          'module' => $moduleId,

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

              /**

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

               * Function to change the state of the locked module.

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

               *

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

               * @return int

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

               *

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

               * @param array|string $exceptions

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

                      }

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

               * @return int|bool

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

              public function changeModuleState($state, $member = false)

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

              {

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

                  } else {

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

                  }

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

                  $db = \App\Db::getInstance();

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

                  $moduleId = $this->get('moduleId');

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

                      return $db->createCommand()->insert('u_#__watchdog_module', [

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

               */

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

               *

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

                  if (false === $ownerId) {

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

                      $ownerId = \App\User::getCurrentUserId();

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

                      if ($isName) {

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

              public function changeRecordState($state)

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

               */

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

              public static function setSchedulerByUser($sendNotifications, $frequency, $ownerId = false)

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

              {

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

                  }

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

                  }

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

               * Function get watching modules by schedule.

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

                  $data = (new \App\Db\Query())

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

                      }

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

               * Function to change the state of the observed module.

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

                  }

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

                          'member' => $member,

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

                  return App\Db::getInstance()

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

               */

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

                  if (\is_array($exceptions)) {

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

                  }

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

                  foreach (static::$cache as $moduleId => $users) {

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

                      if (isset($users[$userId])) {

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

                  }

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

                  }

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

               * @param int $state

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

              {

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

                      return true;

          Line exceeds 120 characters; contains 123 characters
          Open

                      ->update('u_#__watchdog_module', ['lock' => $state], ['member' => $member, 'module' => $this->get('moduleId')])

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

               * @param int   $ownerId

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

                  if (false === $ownerId) {

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

               */

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

                  $cacheName = $ownerId . '_' . (int) $isName;

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

                      $data['modules'] = explode(',', $data['modules']);

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

               * Function to change the state of the observed record.

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

              /**

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

               * @return int|bool

          Line exceeds 120 characters; contains 125 characters
          Open

                  return $db->createCommand()->delete('u_#__watchdog_module', ['member' => $member, 'module' => $moduleId])->execute();

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

               * @return int

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

               *

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

               * @param array $sendNotifications

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

                              $moduleId = \App\Module::getModuleName($moduleId);

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

                          }

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

                  if (empty($member)) {

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

                  if (1 === $state) {

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

                      ])->execute();

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

               *

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

               */

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

              }

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

              /**

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

               * @return array - List of modules

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

               * @param int    $state

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

                  return $db->createCommand()->delete('u_#__watchdog_module', ['member' => $member, 'module' => $moduleId])->execute();

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

                      $exceptions = implode(',', $exceptions);

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

              {

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

                          foreach ($data['modules'] as &$moduleId) {

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

                  $isWatchingRecord = $this->isWatchingRecord();

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

                      $row['record'] = $this->get('record');

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

               *

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

                      $isExists = $this->isWatchingModuleConfig($member);

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

              }

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

              {

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

                      ->update('u_#__watchdog_module', ['exceptions' => $exceptions], ['member' => $member, 'module' => $this->get('moduleId')])

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

               * @param mixed $isName

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

                      ->from('u_#__watchdog_schedule')

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

               *

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

               * @param string $member

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

                      ->createCommand()

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

                  return \App\Db::getInstance()

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

              /**

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

               * @return int

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

                  if (\App\Cache::staticHas('getWatchingModules', $userId)) {

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

                  return $modules;

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

              }

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

                  return $db->createCommand()->update(('u_#__watchdog_record'), $row, ['userid' => $this->get('userId'), 'record' => $this->get('record')])->execute();

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

                      $member = 'Users:' . $this->get('userId');

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

                  if ($isExists && 1 === $state) {

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

              /**

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

              public function exceptions($exceptions, $member)

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

               *

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

                      $ownerId = \App\User::getCurrentUserId();

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

                  if (false === static::$cache) {

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

                          $modules[] = $moduleId;

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

                      return true;

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

               * Function to change the exceptions of the module.

          Line exceeds 120 characters; contains 134 characters
          Open

                      ->update('u_#__watchdog_module', ['exceptions' => $exceptions], ['member' => $member, 'module' => $this->get('moduleId')])

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

                  $modules = [];

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

                  \App\Cache::staticSave('getWatchingModules', $userId, $modules);

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

                      return \App\Cache::staticGet('getWatchingModulesSchedule', $cacheName);

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

                      ->where(['userid' => $ownerId])

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

               *

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

               */

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

                      $row['userid'] = $this->get('userId');

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

                      return $db->createCommand()->insert('u_#__watchdog_record', $row)->execute();

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

              public function lock($state, $member)

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

               *

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

                  }

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

                      ->execute();

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

               * @param int   $frequency

          Line exceeds 120 characters; contains 168 characters
          Open

                          $db->createCommand()->update('u_#__watchdog_schedule', ['frequency' => $frequency, 'modules' => $sendNotifications], ['userid' => $ownerId])->execute();

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

                  if ($restrictUsers) {

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

               * Function get watching members.

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

                                  break;

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

              public function getWatchingExceptions($member)

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

                      ->select(['exceptions'])

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

                      $users = \App\PrivilegeUtil::getUserByMember($row['member']);

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

                      if (!empty($exceptions)) {

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

                      if (isset($members[$row['module']])) {

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

                      }

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

               *

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

               *

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

                  }

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

                      }

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

                  if ($getData) {

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

                      $members = [];

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

                          }

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

                      }

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

                          $sendNotifications = implode(',', $sendNotifications);

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

                      $isExists = (new \App\Db\Query())->from('u_#__watchdog_schedule')->where(['userid' => $ownerId])->exists();

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

              {

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

                  $query = (new App\Db\Query())

          Line exceeds 120 characters; contains 122 characters
          Open

                                  $name = \App\Language::translate(\App\Fields\Owner::getGroupName($data[1]), $this->get('module'));

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

               *

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

               */

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

              {

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

                  $dataReader = (new App\Db\Query())->from('u_#__watchdog_module')->createCommand()->query();

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

                          }

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

                      }

          Line exceeds 120 characters; contains 166 characters
          Open

                          $db->createCommand()->insert('u_#__watchdog_schedule', ['frequency' => $frequency, 'modules' => $sendNotifications, 'userid' => $ownerId])->execute();

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

                              ->createCommand()->query();

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

                                  unset($users[$row['userid']]);

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

                              default:

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

              }

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

               */

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

                          $members[$row['module']]['byUsers'] = array_merge($members[$row['module']]['byUsers'], $users);

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

                  } else {

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

              public function getWatchingUsers($restrictUsers = [])

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

                  if (!$this->watchingUsers) {

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

                              }

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

                          }

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

                      }

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

                  }

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

                      ->where(['module' => (int) $this->get('moduleId')]);

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

              public static function reloadCache()

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

                      }

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

                          while ($row = $dataReader->read()) {

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

                              if (self::RECORD_ACTIVE === (int) $row['state']) {

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

                  } else {

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

                      $users = $this->watchingUsers;

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

                          }

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

                                  break;

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

              }

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

               *

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

                      ->from('u_#__watchdog_module')

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

                              $cache[$module][$user] = $usersByType['Users'][$user];

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

                      } else {

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

                          $dataReader = (new App\Db\Query())->select(['userid', 'state'])

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

                              } else {

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

              /**

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

               */

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

              public function getWatchingMembers($getData = false)

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

              {

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

              /**

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

               * @param string $member

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

                  $members = $users = [];

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

                      $type = explode(':', $row['member']);

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

                          } elseif (isset($usersByType['Groups'][$user])) {

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

              }

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

                      if (\is_array($sendNotifications)) {

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

              /**

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

                      ->from('u_#__watchdog_module')

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

                          $data = explode(':', $row['member']);

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

                  } else {

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

                      } else {

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

                          } elseif (isset($usersByType['RoleAndSubordinates'][$user])) {

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

               *

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

                              case 'Groups':

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

                      $members = $query->column();

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

              /**

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

                  }

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

                          } elseif (isset($usersByType['Roles'][$user])) {

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

              /**

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

                  }

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

               * Function get watching users.

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

               */

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

                      foreach ($restrictUsers as $user) {

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

               * @return array - List of exceptions

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

              {

          Line exceeds 120 characters; contains 132 characters
          Open

                      $members[$row['module']][$type[0]] = array_fill_keys($users, $row['lock']) + ($members[$row['module']][$type[0]] ?? []);

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

                              $cache[$module][$user] = $usersByType['Groups'][$user];

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

                              $cache[$module][$user] = $usersByType['RoleAndSubordinates'][$user];

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

               * Function get users.

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

              }

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

               * Function get supported modules.

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

               */

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

                  $tabid = $this->get('moduleId');

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

                      $usersKey = array_keys(static::$cache[$tabid]);

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

                      if ($isExists) {

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

               * @return array - List of users

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

                      $this->watchingUsers = $users;

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

                          switch ($data[0]) {

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

                                  $name = \App\Language::translate(\App\PrivilegeUtil::getRoleName($data[1]), $this->get('module'));

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

                      ->where(['module' => \App\Module::getModuleId($this->get('module')), 'member' => $member])->scalar();

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

                      $exceptions = !empty($row['exceptions']) ? explode(',', $row['exceptions']) : [];

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

                  $cache = [];

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

                  foreach ($members as $module => $usersByType) {

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

                      }

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

              }

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

               * @param array $restrictUsers

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

                              ->where(['record' => (int) $this->get('record')])

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

                          $row['type'] = $data[0];

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

                      }

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

                  while ($row = $dataReader->read()) {

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

                      $members[$row['module']][$type[0]] = array_fill_keys($users, $row['lock']) + ($members[$row['module']][$type[0]] ?? []);

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

                      foreach ($users as $user) {

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

                          if (isset($usersByType['Users'][$user])) {

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

                  }

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

                  if (isset(static::$cache[$tabid])) {

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

              /**

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

               * @return array - List of users

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

               *

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

                  return $users;

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

               * @return array - List of modules

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

                      $db->createCommand()->delete('u_#__watchdog_schedule', ['userid' => $ownerId])->execute();

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

                              ->from('u_#__watchdog_record')

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

                  return $users;

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

                          $members[] = $row;

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

                          $members[$row['module']]['byUsers'] = $users;

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

                          $db->createCommand()->insert('u_#__watchdog_schedule', ['frequency' => $frequency, 'modules' => $sendNotifications, 'userid' => $ownerId])->execute();

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

                      $users = $this->getModuleUsers();

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

                              unset($users[$user]);

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

               *

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

                      ->select(['member', 'lock', 'exceptions'])

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

                      while ($row = $dataReader->read()) {

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

                                  $name = \App\Language::translate(\App\Fields\Owner::getGroupName($data[1]), $this->get('module'));

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

                          $row['name'] = $name;

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

                  $exceptions = (new App\Db\Query())

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

                  return explode(',', $exceptions);

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

                          $users = array_diff($users, $exceptions);

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

                  $db = \App\Db::getInstance();

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

                  if (empty($sendNotifications)) {

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

                                  $users[$row['userid']] = $row['userid'];

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

              }

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

               * @return array - List of members

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

                              case 'Users':

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

                                  $name = \App\Fields\Owner::getUserLabel($data[1]);

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

                          $row['exceptions'] = explode(',', $row['exceptions']);

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

                  return $members;

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

               * Update watchdog module permissions cache.

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

               */

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

              public static function getSupportedModules()

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

              {

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

                  $users = [];

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

              public function getModuleUsers()

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

               *

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

              {

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

                          $db->createCommand()->update('u_#__watchdog_schedule', ['frequency' => $frequency, 'modules' => $sendNotifications], ['userid' => $ownerId])->execute();

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

                      if ($this->has('record')) {

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

                          if (isset($users[$user])) {

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

               * @param bool $getData

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

                      $dataReader = $query->createCommand()->query();

          Line exceeds 120 characters; contains 122 characters
          Open

                                  $name = \App\Language::translate(\App\PrivilegeUtil::getRoleName($data[1]), $this->get('module'));

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

                                  break;

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

                  }

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

               * Function get watching exceptions.

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

                      $users = array_unique($usersByType['byUsers']);

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

                              $cache[$module][$user] = $usersByType['Roles'][$user];

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

                  App\Utils::saveToFile(static::$cacheFile, \App\Utils::varExport($cache), '', LOCK_EX, true);

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

              }

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

                  return Vtiger_Module_Model::getAll([0], ['Integration', 'Dashboard', 'ModComments', 'Notification'], true);

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

                      $users = array_combine($usersKey, $usersKey);

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

                  }

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

          class Vtiger_Watchdog_Model extends \App\Base

          There are no issues that match your filters.

          Category
          Status