YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/Vtiger/views/Pagination.php

Summary

Maintainability
D
1 day
Test Coverage
F
0%

Function transferListSearchParamsToFilterCondition has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    public function transferListSearchParamsToFilterCondition($searchParams, Settings_Vtiger_Module_Model $moduleModel)
    {
        if (empty($searchParams)) {
            return [];
        }
Severity: Minor
Found in modules/Settings/Vtiger/views/Pagination.php - About 5 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 getPagination has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getPagination(App\Request $request)
    {
        $viewer = $this->getViewer($request);
        $pageNumber = $request->getInteger('page');
        $searchResult = $request->get('searchResult');
Severity: Major
Found in modules/Settings/Vtiger/views/Pagination.php - About 2 hrs to fix

    Method transferListSearchParamsToFilterCondition has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function transferListSearchParamsToFilterCondition($searchParams, Settings_Vtiger_Module_Model $moduleModel)
        {
            if (empty($searchParams)) {
                return [];
            }
    Severity: Minor
    Found in modules/Settings/Vtiger/views/Pagination.php - About 1 hr to fix

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

          public function getPagination(App\Request $request)
          {
              $viewer = $this->getViewer($request);
              $pageNumber = $request->getInteger('page');
              $searchResult = $request->get('searchResult');
      Severity: Minor
      Found in modules/Settings/Vtiger/views/Pagination.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

      The method getPagination() has an NPath complexity of 1944. The configured NPath complexity threshold is 200.
      Open

          public function getPagination(App\Request $request)
          {
              $viewer = $this->getViewer($request);
              $pageNumber = $request->getInteger('page');
              $searchResult = $request->get('searchResult');

      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 getPagination() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
      Open

          public function getPagination(App\Request $request)
          {
              $viewer = $this->getViewer($request);
              $pageNumber = $request->getInteger('page');
              $searchResult = $request->get('searchResult');

      CyclomaticComplexity

      Since: 0.1

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

      Example

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

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

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

          public function transferListSearchParamsToFilterCondition($searchParams, Settings_Vtiger_Module_Model $moduleModel)
          {
              if (empty($searchParams)) {
                  return [];
              }

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

          public function transferListSearchParamsToFilterCondition($searchParams, Settings_Vtiger_Module_Model $moduleModel)

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

              $pagingModel = new Vtiger_Paging_Model();

      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 'Settings_Vtiger_ListView_Model' in method 'getPagination'.
      Open

              $listViewModel = Settings_Vtiger_ListView_Model::getInstance($qualifiedModuleName);

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class 'Settings_TreesManager_Record_Model' in method 'transferListSearchParamsToFilterCondition'.
      Open

                          $fieldValue = Settings_TreesManager_Record_Model::getChildren($fieldValue, $fieldName, $moduleModel);

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class '\App\Fields\Time' in method 'transferListSearchParamsToFilterCondition'.
      Open

                          $fieldValue = \App\Fields\Time::sanitizeDbFormat($fieldValue);

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

                                  } else {
                                      $dateTimeCompoenents[1] = '23:59:59';
                                  }

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

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

              if (!$request->isEmpty('sourceModule')) {

      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.

      Reference to undeclared property \Settings_Vtiger_Pagination_View->listViewEntries
      Open

              if (!property_exists($this, 'listViewEntries') || empty($this->listViewEntries)) {

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);

      Reference to undeclared property \Settings_Vtiger_Pagination_View->listViewEntries
      Open

                  $this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('ALPHABET_VALUE', $searchValue);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('PAGE_NUMBER', $pageNumber);

      Reference to undeclared property \Settings_Vtiger_Pagination_View->listViewCount
      Open

                  $this->listViewCount = $listViewModel->getListViewCount();

      Argument 3 (moduleModel) is \App\Base|\Settings_Vtiger_Module_Model but \Settings_TreesManager_Record_Model::getChildren() takes \Vtiger_Module_Model defined at /code/modules/Settings/TreesManager/models/Record.php:355
      Open

                          $fieldValue = Settings_TreesManager_Record_Model::getChildren($fieldValue, $fieldName, $moduleModel);

      Reference to undeclared property \Settings_Vtiger_Pagination_View->listViewCount
      Open

              if (!property_exists($this, 'listViewCount') || empty($this->listViewCount)) {

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('PAGE_COUNT', $pageCount);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('START_PAGIN_FROM', $startPaginFrom);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('PAGING_MODEL', $pagingModel);

      Reference to undeclared property \Settings_Vtiger_Pagination_View->listViewEntries
      Open

              $noOfEntries = \count($this->listViewEntries);

      Call to undeclared method \Settings_Vtiger_Module_Model::getFieldByName
      Open

                      $field = $moduleModel->getFieldByName($fieldName);

      Reference to undeclared property \Settings_Vtiger_Pagination_View->listViewCount
      Open

              $totalCount = $this->listViewCount;

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('OPERATOR', $operator);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('LISTVIEW_COUNT', $totalCount);

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

                      if ('date_start' === $fieldName || 'due_date' === $fieldName || 'datetime' === $field->getFieldDataType()) {
                          $dateValues = explode(',', $fieldValue);
                          //Indicate whether it is fist date in the between condition
                          $isFirstDate = true;
                          foreach ($dateValues as $key => $dateValue) {
      Severity: Major
      Found in modules/Settings/Vtiger/views/Pagination.php and 1 other location - About 3 hrs to fix
      app/QueryGenerator.php on lines 1423..1441

      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 149.

      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 $transformedSearchParams. Keep variable name length under 20.
      Open

              $transformedSearchParams = $this->transferListSearchParamsToFilterCondition($searchParams, $listViewModel->getModule());

      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

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

              $advFilterConditionFormat = [];

      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 Settings_Vtiger_Pagination_View extends Settings_Vtiger_IndexAjax_View

      The class Settings_Vtiger_Pagination_View is not named in CamelCase.
      Open

      class Settings_Vtiger_Pagination_View extends Settings_Vtiger_IndexAjax_View
      {
          public function __construct()
          {
              parent::__construct();

      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

           * Function to transfer a list of searched parameters to the filter.

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

                      if ('time' === $field->getFieldDataType()) {

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

                          //Indicate whether it is fist date in the between condition

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

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

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

              $pagingModel->set('viewid', $request->getByType('viewname', 2));

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

                  $listViewModel->get('query_generator')->addNativeCondition(['vtiger_crmentity.crmid' => $searchResult]);

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

              $pageCount = $pagingModel->getPageCount();

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

              $viewer->assign('PAGE_COUNT', $pageCount);

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

           * @param Settings_Vtiger_Module_Model $moduleModel

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

                  $groupColumnsInfo = [];

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

                      $field = $moduleModel->getFieldByName($fieldName);

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

                      //Request will be having in terms of AM and PM but the database will be having in 24 hr format so converting

      Line exceeds 120 characters; contains 124 characters
      Open

                      if ('date_start' === $fieldName || 'due_date' === $fieldName || 'datetime' === $field->getFieldDataType()) {

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

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

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

              if (empty($searchParams) || !\is_array($searchParams)) {

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

              }

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

           *

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

           *

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

                  return [];

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

              }

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

                      }

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

                          $isFirstDate = true;

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

                                  if ($isFirstDate) {

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

              $this->exposeMethod('getPagination');

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

           * @param \App\Request $request

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

              $pageNumber = $request->getInteger('page');

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

                  $listViewModel->set('sourceModule', $sourceModule);

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

              $pagingModel = new Vtiger_Paging_Model();

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

              $operator = $request->getByType('operator', 1);

      Line exceeds 120 characters; contains 128 characters
      Open

              $transformedSearchParams = $this->transferListSearchParamsToFilterCondition($searchParams, $listViewModel->getModule());

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

              $listViewModel->set('search_params', $transformedSearchParams);

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

                  $this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);

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

                              $dateValue = implode(' ', $dateTimeCompoenents);

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

                              $isFirstDate = false;

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

              if (!$request->isEmpty('sourceModule')) {

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

              }

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

                  $listViewModel->set('search_value', $searchValue);

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

                  if (empty($groupInfo)) {

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

                      if ('date_start' === $fieldName || 'due_date' === $fieldName || 'datetime' === $field->getFieldDataType()) {

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

                          foreach ($dateValues as $key => $dateValue) {

      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

              $searchValue = $request->getByType('search_value', 'Text');

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

              if (!empty($searchKey) && !empty($searchValue)) {

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

              $searchParams = $request->getArray('search_params');

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

              $pagingModel->set('totalCount', (int) $totalCount);

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

              $viewer->assign('PAGE_NUMBER', $pageNumber);

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

              echo $viewer->view('Pagination.tpl', $qualifiedModuleName, true);

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

           * @param array                        $searchParams

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

              $glueOrder = ['and', 'or'];

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

                      if ('tree' === $field->getFieldDataType() && $specialOption) {

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

                          $fieldValue = \App\Fields\Time::sanitizeDbFormat($fieldValue);

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

                              if (empty($dateTimeCompoenents[1])) {

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

              }

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

              $pagingModel->set('page', $pageNumber);

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

                  $viewer->assign('OPERATOR', $operator);

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

              }

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

                  $this->listViewCount = $listViewModel->getListViewCount();

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

              $noOfEntries = \count($this->listViewEntries);

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

              $advFilterConditionFormat = [];

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

                      continue;

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

                          $fieldValue = Settings_TreesManager_Record_Model::getChildren($fieldValue, $fieldName, $moduleModel);

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

                                      $dateTimeCompoenents[1] = '00:00:00';

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

                      $groupColumnsInfo[] = ['columnname' => $field->getCustomViewColumnName(), 'comparator' => $operator, 'value' => $fieldValue];

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

                  }

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

              $listViewModel = Settings_Vtiger_ListView_Model::getInstance($qualifiedModuleName);

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

                  $pageNumber = 1;

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

              $totalCount = $this->listViewCount;

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

              $startPaginFrom = $pagingModel->getStartPagingFrom();

      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 ($groupInfo as &$fieldSearchInfo) {

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

                                      $dateTimeCompoenents[1] = '23:59:59';

      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 (!property_exists($this, 'listViewEntries') || empty($this->listViewEntries)) {

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

              foreach ($searchParams as &$groupInfo) {

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

          {

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

              $viewer = $this->getViewer($request);

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

                  $viewer->assign('ALPHABET_VALUE', $searchValue);

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

                  $listViewModel->set('search_key', $searchKey);

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

                              $dateTimeCompoenents = explode(' ', $dateValue);

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

                              }

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

                  $advFilterConditionFormat[$glueOrder[$groupIterator]] = $groupColumnsInfo;

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

                              $dateValues[$key] = $dateValue;

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

          public function __construct()

      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

                  ++$groupIterator;

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

              $searchResult = $request->get('searchResult');

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

                  $sourceModule = $request->getByType('sourceModule', 2);

      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($searchResult) && \is_array($searchResult)) {

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

              $viewer->assign('LISTVIEW_COUNT', $totalCount);

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

              $viewer->assign('START_PAGIN_FROM', $startPaginFrom);

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

           */

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

          public function transferListSearchParamsToFilterCondition($searchParams, Settings_Vtiger_Module_Model $moduleModel)

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

              $groupIterator = 0;

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

                      [$fieldName, $operator, $fieldValue, $specialOption] = $fieldSearchInfo;

      Line exceeds 120 characters; contains 121 characters
      Open

                          $fieldValue = Settings_TreesManager_Record_Model::getChildren($fieldValue, $fieldName, $moduleModel);

      Line exceeds 120 characters; contains 124 characters
      Open

                      //Request will be having in terms of AM and PM but the database will be having in 24 hr format so converting

      Line exceeds 120 characters; contains 141 characters
      Open

                      $groupColumnsInfo[] = ['columnname' => $field->getCustomViewColumnName(), 'comparator' => $operator, 'value' => $fieldValue];

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

              return $advFilterConditionFormat;

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

          public function getPagination(App\Request $request)

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

              $viewer->assign('PAGING_MODEL', $pagingModel);

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

              if (empty($searchParams)) {

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

              parent::__construct();

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

          /**

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

           * Pagination.

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

              if (!empty($operator)) {

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

                  $listViewModel->set('operator', $operator);

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

              }

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

              }

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

              if (!property_exists($this, 'listViewCount') || empty($this->listViewCount)) {

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

              $viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);

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

          /**

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

                      }

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

                                  }

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

                          }

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

              if (empty($pageNumber)) {

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

                  $searchParams = [];

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

              $transformedSearchParams = $this->transferListSearchParamsToFilterCondition($searchParams, $listViewModel->getModule());

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

              }

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

           * @return array

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

                  }

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

                          $dateValues = explode(',', $fieldValue);

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

                          $fieldValue = implode(',', $dateValues);

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

          }

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

      class Settings_Vtiger_Pagination_View extends Settings_Vtiger_IndexAjax_View

      There are no issues that match your filters.

      Category
      Status