YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/helpers/BrowsingHistory.php

Summary

Maintainability
B
6 hrs
Test Coverage
D
69%

Function getHistory has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getHistory()
    {
        $results = (new \App\Db\Query())->from('u_#__browsinghistory')
            ->where(['userid' => App\User::getCurrentUserId()])
            ->orderBy(['id' => SORT_DESC])
Severity: Minor
Found in modules/Vtiger/helpers/BrowsingHistory.php - About 2 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Method getHistory has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getHistory()
    {
        $results = (new \App\Db\Query())->from('u_#__browsinghistory')
            ->where(['userid' => App\User::getCurrentUserId()])
            ->orderBy(['id' => SORT_DESC])
Severity: Minor
Found in modules/Vtiger/helpers/BrowsingHistory.php - About 1 hr to fix

    Method saveHistory has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function saveHistory($title)
        {
            if (empty(App\User::getCurrentUserId())) {
                return false;
            }
    Severity: Minor
    Found in modules/Vtiger/helpers/BrowsingHistory.php - About 1 hr to fix

      Function saveHistory has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function saveHistory($title)
          {
              if (empty(App\User::getCurrentUserId())) {
                  return false;
              }
      Severity: Minor
      Found in modules/Vtiger/helpers/BrowsingHistory.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

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

          public static function getHistory()

      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 '21', column '19').
      Open

              $results = (new \App\Db\Query())->from('u_#__browsinghistory')

      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 '55', column '27').
      Open

                      $value['date'] = (new DateTimeField($userDate))->getDisplayTime(null, false);

      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

      Avoid using static access to class 'DateTimeField' in method 'getHistory'.
      Open

                      $value['date'] = DateTimeField::convertToUserFormat($userDate);

      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\Completions' in method 'saveHistory'.
      Open

                      $title = \App\Utils\Completions::encodeEmoji($title);

      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\TextUtils' in method 'saveHistory'.
      Open

                      $title = \App\TextUtils::textTruncate($title, 255, false);

      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\Record' in method 'saveHistory'.
      Open

                      $title .= ' | ' . \App\Utils\Completions::encodeEmoji(App\Record::getLabel($urlQuery['record']));

      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\Completions' in method 'getHistory'.
      Open

                  $value['title'] = \App\Utils\Completions::decodeEmoji($value['title']);

      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 'deleteHistory'.
      Open

                  ->delete('u_#__browsinghistory', ['userid' => App\User::getCurrentUserId()])

      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 getHistory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                  } else {
                      $value['date'] = DateTimeField::convertToUserFormat($userDate);
                  }

      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 getHistory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                  } else {
                      $value['hour'] = false;
                      if (!$older) {
                          $value['viewOlder'] = true;
                          $older = true;

      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 'saveHistory'.
      Open

              if (empty(App\User::getCurrentUserId())) {

      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 'saveHistory'.
      Open

                          'userid' => App\User::getCurrentUserId(),

      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 'getHistory'.
      Open

                  ->where(['userid' => App\User::getCurrentUserId()])

      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\Completions' in method 'saveHistory'.
      Open

                      $title .= ' | ' . \App\Utils\Completions::encodeEmoji(App\Record::getLabel($urlQuery['record']));

      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 'getHistory'.
      Open

                  ->limit(App\Config::performance('BROWSING_HISTORY_VIEW_LIMIT'))

      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\Purifier' in method 'saveHistory'.
      Open

              $parsedUrl = parse_url(\App\Purifier::decodeHtml($url), PHP_URL_QUERY);

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

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

                  ->where(['userid' => App\User::getCurrentUserId()])

      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_#__browsinghistory" 3 times.
      Open

              $results = (new \App\Db\Query())->from('u_#__browsinghistory')

      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 "title" 3 times.
      Open

                  $value['title'] = \App\Utils\Completions::decodeEmoji($value['title']);

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

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

      Noncompliant Code Example

      With the default threshold of 3:

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

      Compliant Solution

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

      Exceptions

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

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

              $results = (new \App\Db\Query())->from('u_#__browsinghistory')
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

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

                  ->delete('u_#__browsinghistory', ['userid' => App\User::getCurrentUserId()])
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

      Call to method encodeEmoji from undeclared class \App\Utils\Completions
      Open

                      $title .= ' | ' . \App\Utils\Completions::encodeEmoji(App\Record::getLabel($urlQuery['record']));
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.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/helpers/BrowsingHistory.php by phan

      Call to method encodeEmoji from undeclared class \App\Utils\Completions
      Open

                      $title = \App\Utils\Completions::encodeEmoji($title);
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

      Argument 1 (value) is string but \DateTimeField::__construct() takes \type defined at /code/include/fields/DateTimeField.php:31
      Open

                      $value['date'] = (new DateTimeField($userDate))->getDisplayTime(null, false);

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

                  \App\Db::getInstance()->createCommand()
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

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

              if (empty(App\User::getCurrentUserId())) {
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

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

                  ->where(['userid' => App\User::getCurrentUserId()])
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

      Call to method decodeEmoji from undeclared class \App\Utils\Completions
      Open

                  $value['title'] = \App\Utils\Completions::decodeEmoji($value['title']);
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

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

              \App\Db::getInstance()->createCommand()
      Severity: Critical
      Found in modules/Vtiger/helpers/BrowsingHistory.php by phan

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

      class Vtiger_BrowsingHistory_Helper

      The class Vtiger_BrowsingHistory_Helper is not named in CamelCase.
      Open

      class Vtiger_BrowsingHistory_Helper
      {
          /**
           * Get browsing history.
           *

      CamelCaseClassName

      Since: 0.2

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

      Example

      class class_name {
      }

      Source

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

          /**

      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 getHistory()

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

              $yesterday = 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

                          $yesterday = true;

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

                      $value['hour'] = true;

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

                  ->where(['userid' => App\User::getCurrentUserId()])

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

                  ->limit(App\Config::performance('BROWSING_HISTORY_VIEW_LIMIT'))

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

              $dateToday = DateTimeField::convertToUserTimeZone('today')->format('U');

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

                      $value['date'] = (new DateTimeField($userDate))->getDisplayTime(null, 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

                      ])->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

           * @return array

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

              $older = false;

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

              foreach ($results as &$value) {

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

                      }

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

                          $older = 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

              if (!empty($urlQuery['module']) && !empty($urlQuery['view']) && \in_array($urlQuery['view'], $validViews)) {

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

                      $title = \App\TextUtils::textTruncate($title, 255, false);

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

                      $value['hour'] = 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

              $validViews = ['Index', 'List', 'Detail', 'Edit', 'DashBoard', 'ListPreview', 'TreeRecords', 'Tree'];

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

              $results = (new \App\Db\Query())->from('u_#__browsinghistory')

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

                      $value['hour'] = true;

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

           * Save step in browsing history.

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

              if (empty($parsedUrl)) {

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

                  ->delete('u_#__browsinghistory', ['userid' => App\User::getCurrentUserId()])

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

                      if (!$yesterday) {

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

                      ->insert('u_#__browsinghistory', [

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

           */

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

                  $value['title'] = \App\Utils\Completions::decodeEmoji($value['title']);

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

                          $value['viewToday'] = true;

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

                          $today = 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

                  }

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

                  ->orderBy(['id' => SORT_DESC])

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

              $today = false;

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

              $dateYesterday = DateTimeField::convertToUserTimeZone('yesterday')->format('U');

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

                      if (!$today) {

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

                          $value['viewYesterday'] = 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

                          'url' => $url,

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

          /**

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

          public static function deleteHistory()

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

                  if (strtotime($userDate) >= $dateToday) {

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

                  } elseif (strtotime($userDate) >= $dateYesterday) {

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

                      if (!$older) {

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

              $url = App\RequestUtil::getBrowserInfo()->requestUri;

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

              $parsedUrl = parse_url(\App\Purifier::decodeHtml($url), PHP_URL_QUERY);

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

                      $title = \App\Utils\Completions::encodeEmoji($title);

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

              \App\Db::getInstance()->createCommand()

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

                          $value['viewOlder'] = true;

      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

                  ->execute();

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

           * @param string $title

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

              if (empty(App\User::getCurrentUserId())) {

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

                  if (mb_strlen($title) > 255) {

      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

                  if (!empty($urlQuery['record'])) {

      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

                      $title .= ' | ' . \App\Utils\Completions::encodeEmoji(App\Record::getLabel($urlQuery['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

                  $userDate = DateTimeField::convertToUserTimeZone($value['date'])->format('Y-m-d H:i:s');

      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 ($value['hour']) {

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

                      $value['date'] = DateTimeField::convertToUserFormat($userDate);

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

              return $results;

      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 saveHistory($title)

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

                  if (\is_string($title)) {

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

           * Get browsing history.

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

                  ->all();

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

              parse_str($parsedUrl, $urlQuery);

      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

              }

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

                  \App\Db::getInstance()->createCommand()

      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

                          'date' => date('Y-m-d H:i:s'),

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

                          'title' => $title,

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

           * Clear browsing history for user.

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

      class Vtiger_BrowsingHistory_Helper

      There are no issues that match your filters.

      Category
      Status