YetiForceCompany/YetiForceCRM

View on GitHub
modules/Reservations/models/Calendar.php

Summary

Maintainability
F
6 days
Test Coverage
F
0%

Method getQuery has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getQuery()
    {
        $queryGenerator = new App\QueryGenerator($this->getModuleName());
        if ($this->has('customFilter')) {
            $queryGenerator->initForCustomViewById($this->get('customFilter'));
Severity: Major
Found in modules/Reservations/models/Calendar.php - About 2 hrs to fix

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

        public function getQuery()
        {
            $queryGenerator = new App\QueryGenerator($this->getModuleName());
            if ($this->has('customFilter')) {
                $queryGenerator->initForCustomViewById($this->get('customFilter'));
    Severity: Minor
    Found in modules/Reservations/models/Calendar.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 getEntity has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getEntity()
        {
            $dataReader = $this->getQuery()->createCommand()->query();
            $result = [];
            $moduleModel = Vtiger_Module_Model::getInstance($this->getModuleName());
    Severity: Minor
    Found in modules/Reservations/models/Calendar.php - About 1 hr to fix

      The method getQuery() has an NPath complexity of 960. The configured NPath complexity threshold is 200.
      Open

          public function getQuery()
          {
              $queryGenerator = new App\QueryGenerator($this->getModuleName());
              if ($this->has('customFilter')) {
                  $queryGenerator->initForCustomViewById($this->get('customFilter'));

      NPathComplexity

      Since: 0.1

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

      Example

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

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

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

          public function getQuery()
          {
              $queryGenerator = new App\QueryGenerator($this->getModuleName());
              if ($this->has('customFilter')) {
                  $queryGenerator->initForCustomViewById($this->get('customFilter'));

      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 19 to the 15 allowed.
      Open

          public function getQuery()

      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 '39', column '25').
      Open

              $queryGenerator = new App\QueryGenerator($this->getModuleName());

      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 '63', column '17').
      Open

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbStartDateTime],

      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 '126', column '28').
      Open

                  $dateTimeInstance = new DateTimeField($record['due_date'] . ' ' . $record['time_end']);

      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 '58', column '17').
      Open

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbStartDateTime],

      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 '59', column '17').
      Open

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbEndDateTime],

      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 '122', column '28').
      Open

                  $dateTimeInstance = new DateTimeField($record['date_start'] . ' ' . $record['time_start']);

      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 '64', column '17').
      Open

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbEndDateTime],

      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 '90', column '22').
      Open

                      $subQuery = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => $selectedIds]);

      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 '154', column '26').
      Open

                  $calendarTypes = (new App\Db\Query())->select(['tree', 'label'])->from('vtiger_trees_templates_data')

      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 assigning values to variables in if clauses and the like (line '44', column '7').
      Open

          public function getQuery()
          {
              $queryGenerator = new App\QueryGenerator($this->getModuleName());
              if ($this->has('customFilter')) {
                  $queryGenerator->initForCustomViewById($this->get('customFilter'));

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

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

      Avoid using static access to class '\App\Purifier' in method 'getEntity'.
      Open

                  $item['title'] = \App\Purifier::encodeHtml($record['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 'Vtiger_Module_Model' in method 'getEntity'.
      Open

              $moduleModel = Vtiger_Module_Model::getInstance($this->getModuleName());

      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 'DateTimeField' in method 'getQuery'.
      Open

                  $dbEndDateObject = DateTimeField::convertToDBTimeZone($this->get('end'));

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

                      $filterClassName = Vtiger_Loader::getComponentClassName('CalendarFilter', $filter['name'], $this->getModuleName());

      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_CalendarRightPanel_Model' in method 'getSideBarLinks'.
      Open

                  'filterData' => Vtiger_CalendarRightPanel_Model::getCalendarTypes($this->getModuleName()),

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

                  } else {
                      $item['url'] = $moduleModel->getDetailViewUrl($record['id']);
                  }

      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 'Vtiger_Link_Model' in method 'getSideBarLinks'.
      Open

              $link = Vtiger_Link_Model::getInstanceFromValues([
                  'linktype' => 'SIDEBARWIDGET',
                  'linklabel' => 'LBL_TYPE',
                  'linkdata' => ['cache' => 'calendar-types', 'name' => 'types'],
                  'template' => 'Filters/ActivityTypes.tpl',

      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 'DateTimeField' in method 'getQuery'.
      Open

                  $dbStartDateOject = DateTimeField::convertToDBTimeZone($this->get('start'));

      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 assigning values to variables in if clauses and the like (line '79', column '48').
      Open

          public function getQuery()
          {
              $queryGenerator = new App\QueryGenerator($this->getModuleName());
              if ($this->has('customFilter')) {
                  $queryGenerator->initForCustomViewById($this->get('customFilter'));

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

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

      Avoid using static access to class '\App\Fields\Picklist' in method 'getEntity'.
      Open

              $colors = \App\Fields\Picklist::getColors('reservations_status', 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

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

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

      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 "Y-m-d" 4 times.
      Open

                  $dbStartDate = $dbStartDateOject->format('Y-m-d');

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

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

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

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

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

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

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

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

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

              if ($this->get('start') && $this->get('end')) {

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

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

      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.

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

                  $dateTimeInstance = new DateTimeField($record['date_start'] . ' ' . $record['time_start']);

      Call to method __construct from undeclared class \yii\db\Expression
      Open

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbStartDateTime],
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method getCalendarTypes from undeclared class \Vtiger_CalendarRightPanel_Model
      Open

                  'filterData' => Vtiger_CalendarRightPanel_Model::getCalendarTypes($this->getModuleName()),
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method setFields from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
      Open

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method __construct from undeclared class \yii\db\Expression
      Open

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbEndDateTime],
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

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

                      $subQuery = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => $selectedIds]);
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method __construct from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
      Open

              $queryGenerator = new App\QueryGenerator($this->getModuleName());
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method createQuery from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
      Open

              $query = $queryGenerator->createQuery();
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method addNativeCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
      Open

                  $queryGenerator->addNativeCondition([
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method read from undeclared class \yii\db\DataReader
      Open

              while ($record = $dataReader->read()) {
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method initForCustomViewById from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
      Open

                  $queryGenerator->initForCustomViewById($this->get('customFilter'));
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method addCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
      Open

                  $queryGenerator->addCondition('type', implode('##', $types), 'e');
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

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

                  $dateTimeInstance = new DateTimeField($record['due_date'] . ' ' . $record['time_end']);

      Call to method close from undeclared class \yii\db\DataReader
      Open

              $dataReader->close();
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method __construct from undeclared class \yii\db\Expression
      Open

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbStartDateTime],
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Call to method __construct from undeclared class \yii\db\Expression
      Open

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbEndDateTime],
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

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

                  $calendarTypes = (new App\Db\Query())->select(['tree', 'label'])->from('vtiger_trees_templates_data')
      Severity: Critical
      Found in modules/Reservations/models/Calendar.php by phan

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          public function getQuery()
          {
              $queryGenerator = new App\QueryGenerator($this->getModuleName());
              if ($this->has('customFilter')) {
                  $queryGenerator->initForCustomViewById($this->get('customFilter'));
      Severity: Major
      Found in modules/Reservations/models/Calendar.php and 1 other location - About 3 days to fix
      modules/OSSTimeControl/models/Calendar.php on lines 38..104

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 731.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              while ($record = $dataReader->read()) {
                  $item = [];
                  $item['id'] = $record['id'];
                  $item['title'] = \App\Purifier::encodeHtml($record['title']);
      
      
      Severity: Major
      Found in modules/Reservations/models/Calendar.php and 1 other location - About 1 day to fix
      modules/OSSTimeControl/models/Calendar.php on lines 118..140

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 367.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          public function getSideBarLinks($linkParams)
          {
              $links = parent::getSideBarLinks($linkParams);
              $link = Vtiger_Link_Model::getInstanceFromValues([
                  'linktype' => 'SIDEBARWIDGET',
      Severity: Minor
      Found in modules/Reservations/models/Calendar.php and 1 other location - About 55 mins to fix
      modules/OSSTimeControl/models/Calendar.php on lines 19..31

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 99.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Avoid excessively long variable names like $isSummaryViewSupported. Keep variable name length under 20.
      Open

              $isSummaryViewSupported = $moduleModel->isSummaryViewSupported();

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

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

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

      class Reservations_Calendar_Model extends Vtiger_Calendar_Model

      The class Reservations_Calendar_Model is not named in CamelCase.
      Open

      class Reservations_Calendar_Model extends Vtiger_Calendar_Model
      {
          /** {@inheritdoc} */
          public function getSideBarLinks($linkParams)
          {

      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

                  'linkdata' => ['cache' => 'calendar-types', 'name' => 'types'],

      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

                  $queryGenerator->addCondition('type', implode('##', $types), 'e');

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

                  $dbStartDateTime = $dbStartDateOject->format('Y-m-d H:i:s');

      Line exceeds 120 characters; contains 148 characters
      Open

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbStartDateTime],

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

                  'template' => 'Filters/ActivityTypes.tpl',

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

          {

      Line exceeds 120 characters; contains 147 characters
      Open

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

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

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbStartDateTime],

      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

              $queryGenerator->setFields(['id', 'date_start', 'time_start', 'time_end', 'due_date', 'title', 'assigned_user_id', 'reservations_status']);

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

          public function getSideBarLinks($linkParams)

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

              }

      Line exceeds 120 characters; contains 146 characters
      Open

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbEndDateTime],

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

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbStartDateTime],

      Line exceeds 120 characters; contains 144 characters
      Open

                          ['>=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbStartDateTime],

      Line exceeds 120 characters; contains 142 characters
      Open

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbEndDateTime],

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

                      [

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

              $links = parent::getSideBarLinks($linkParams);

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

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.date_start, ' ', vtiger_reservations.time_start)"), $dbEndDateTime],

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

              }

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

                          'and',

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

              $queryGenerator = new App\QueryGenerator($this->getModuleName());

      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->has('filters')) {

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

                      $filterInstance = new $filterClassName();

      Line exceeds 120 characters; contains 123 characters
      Open

                      if ($filterInstance->checkPermissions() && $conditions = $filterInstance->getCondition($filter['value'])) {

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

                  $query->andWhere(array_merge(['or'], $conditions));

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

              return $query;

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

           * @return string[]

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

                  'linktype' => 'SIDEBARWIDGET',

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

                  'filterData' => Vtiger_CalendarRightPanel_Model::getCalendarTypes($this->getModuleName()),

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

           * Get query.

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

                      $conditions[] = ['vtiger_crmentity.smownerid' => $selectedIds];

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

          public function getEntity()

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

              $dataReader = $this->getQuery()->createCommand()->query();

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

                      $item['className'] .= ' js-show-modal';

      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 ($types = $this->get('types')) {

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

              if ($this->get('start') && $this->get('end')) {

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

                  $selectedIds = $selectedUsers['selectedIds'];

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

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

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

           * Function to get calendar types.

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

           * @return \App\Db\Query

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

                  $dbStartDateOject = DateTimeField::convertToDBTimeZone($this->get('start'));

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

                  $dbEndDate = $dbEndDateObject->format('Y-m-d');

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

                          ['>', 'vtiger_reservations.due_date', $dbEndDate],

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

           * Function to get records.

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

           *

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

                  $dateTimeInstance = new DateTimeField($record['due_date'] . ' ' . $record['time_end']);

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

                  $item['end'] = DateTimeField::convertToUserTimeZone($record['due_date'] . ' ' . $record['time_end'])->format('Y-m-d') . ' ' . $dateTimeInstance->getFullcalenderTime();

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

                      $item['url'] = $moduleModel->getDetailViewUrl($record['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

              return $result;

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

          public function getCalendarTypes()

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

                      $conditions[] = ['vtiger_crmentity.crmid' => $subQuery];

      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->orderBy(['vtiger_reservations.date_start' => SORT_ASC, 'vtiger_reservations.time_start' => SORT_ASC]);

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

              $link = Vtiger_Link_Model::getInstanceFromValues([

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

              array_unshift($links, $link);

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

          public function getQuery()

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

              if ($this->has('customFilter')) {

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

                  $dbEndDateTime = $dbEndDateObject->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

          }

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

          /**

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

                  $dateTimeInstance = new DateTimeField($record['date_start'] . ' ' . $record['time_start']);

      Line exceeds 120 characters; contains 179 characters
      Open

                  $item['end'] = DateTimeField::convertToUserTimeZone($record['due_date'] . ' ' . $record['time_end'])->format('Y-m-d') . ' ' . $dateTimeInstance->getFullcalenderTime();

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

                      $item['url'] = 'index.php?module=' . $this->getModuleName() . '&view=Detail&record=' . $record['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

                  $calendarTypes = (new App\Db\Query())->select(['tree', 'label'])->from('vtiger_trees_templates_data')

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

                      ->createCommand()->queryAllByGroup(0);

      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

              $isSummaryViewSupported = $moduleModel->isSummaryViewSupported();

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

                  $item = [];

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

                  $item['id'] = $record['id'];

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

                      ->where(['templateid' => $moduleField->getFieldParams()])

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

          /** {@inheritdoc} */

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

          {

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

                  'linklabel' => 'LBL_TYPE',

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

              return $links;

      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

                  $queryGenerator->addNativeCondition([

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

                      [

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

                          ['<=', new \yii\db\Expression("CONCAT(vtiger_reservations.due_date, ' ', vtiger_reservations.time_end)"), $dbEndDateTime],

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

                      if ($filterInstance->checkPermissions() && $conditions = $filterInstance->getCondition($filter['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

              $colors = \App\Fields\Picklist::getColors('reservations_status', false);

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

                  $item['end_display'] = $dateTimeInstance->getDisplayDateTimeValue();

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

              }

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

              $moduleField = $this->getModule()->getFieldByName('type');

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

                      $filterClassName = Vtiger_Loader::getComponentClassName('CalendarFilter', $filter['name'], $this->getModuleName());

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

              $conditions = [];

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

                  $selectedUsers = $this->get('user');

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

                  $item['borderColor'] = $colors[$record['reservations_status']] ?? '';

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

                  if ($isSummaryViewSupported) {

      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

                  foreach ($this->get('filters') as $filter) {

      Line exceeds 120 characters; contains 131 characters
      Open

                      $filterClassName = Vtiger_Loader::getComponentClassName('CalendarFilter', $filter['name'], $this->getModuleName());

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

                  if ('all' !== $selectedIds[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

              $moduleModel = Vtiger_Module_Model::getInstance($this->getModuleName());

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

              $calendarTypes = [];

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

              if (!empty($this->get('user')) && isset($this->get('user')['selectedIds'][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

              }

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

              }

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

                  $item['title'] = \App\Purifier::encodeHtml($record['title']);

      Line exceeds 120 characters; contains 185 characters
      Open

                  $item['start'] = DateTimeField::convertToUserTimeZone($record['date_start'] . ' ' . $record['time_start'])->format('Y-m-d') . ' ' . $dateTimeInstance->getFullcalenderTime();

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

                  $item['className'] = 'js-popover-tooltip--record ownerCBg_' . $record['assigned_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

              if ($moduleField && $moduleField->isActiveField()) {

      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->andWhere($conditions);

      Line exceeds 120 characters; contains 137 characters
      Open

                      $subQuery = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => $selectedIds]);

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

              $result = [];

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

                  $result[] = $item;

      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

                  $queryGenerator->initForCustomViewById($this->get('customFilter'));

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

                  $dbStartDate = $dbStartDateOject->format('Y-m-d');

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

                  $dbEndDateObject = DateTimeField::convertToDBTimeZone($this->get('end'));

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

                      'or',

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

                          'and',

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

                          'and',

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

                          ['<', 'vtiger_reservations.date_start', $dbStartDate],

      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($selectedUsers['excludedIds']) && 'all' === $selectedIds[0]) {

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

                      $conditions[] = ['not in', 'vtiger_crmentity.smownerid', $selectedUsers['excludedIds']];

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

                  $item['start_display'] = $dateTimeInstance->getDisplayDateTimeValue();

      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->close();

      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 = $queryGenerator->createQuery();

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

                      }

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

                      $subQuery = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => $selectedIds]);

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

              if ($conditions) {

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

                  $item['start'] = DateTimeField::convertToUserTimeZone($record['date_start'] . ' ' . $record['time_start'])->format('Y-m-d') . ' ' . $dateTimeInstance->getFullcalenderTime();

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

              return $calendarTypes;

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

      class Reservations_Calendar_Model extends Vtiger_Calendar_Model

      There are no issues that match your filters.

      Category
      Status