YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/views/Inventory.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Method showTaxes has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function showTaxes(App\Request $request)
    {
        $moduleName = $request->getModule();
        $record = $request->getInteger('record');
        $recordModule = $request->getByType('recordModule', 'Alnum');
Severity: Minor
Found in modules/Vtiger/views/Inventory.php - About 1 hr to fix

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

        public function showDiscounts(App\Request $request)
        {
            $moduleName = $request->getModule();
            $discountType = $request->getInteger('discountType');
            $currency = $request->getInteger('currency');
    Severity: Minor
    Found in modules/Vtiger/views/Inventory.php - About 1 hr to fix

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

                  throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      MissingImport

      Since: 2.7.0

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

      Example

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

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

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

                  throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      MissingImport

      Since: 2.7.0

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

      Example

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

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

      Avoid using static access to class 'Vtiger_Inventory_Model' in method 'showTaxes'.
      Open

              $viewer->assign('GLOBAL_TAXES', Vtiger_Inventory_Model::getGlobalTaxes());
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class '\App\Privilege' in method 'showTaxes'.
      Open

              if (!\App\Privilege::isPermitted($moduleName, 'EditView')) {
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

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

              if ($recordModule && ($recordModuleModel = \Vtiger_Module_Model::getInstance($recordModule))) {
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class '\App\Privilege' in method 'showDiscounts'.
      Open

              if (!\App\Privilege::isPermitted($moduleName, 'EditView')) {
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class 'Vtiger_Inventory_Model' in method 'showDiscounts'.
      Open

              $inventoryModel = Vtiger_Inventory_Model::getInstance($moduleName);
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

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

              } else {
                  $discountAggregation = $config['aggregation'];
              }
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      ElseExpression

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class '\App\Fields\Currency' in method 'showDiscounts'.
      Open

      }
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class '\App\Fields\Currency' in method 'showDiscounts'.
      Open

      }
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class 'Vtiger_Inventory_Model' in method 'showTaxes'.
      Open

              $inventoryModel = Vtiger_Inventory_Model::getInstance($moduleName);
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid assigning values to variables in if clauses and the like (line '73', column '25').
      Open

          public function showTaxes(App\Request $request)
          {
              $moduleName = $request->getModule();
              $record = $request->getInteger('record');
              $recordModule = $request->getByType('recordModule', 'Alnum');
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      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\Currency' in method 'showTaxes'.
      Open

      }
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Define a constant instead of duplicating this literal "relatedRecord" 4 times.
      Open

              $relatedRecord = $request->isEmpty('relatedRecord', true) ? false : $request->getInteger('relatedRecord');
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by sonar-php

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

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

      Noncompliant Code Example

      With the default threshold of 3:

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

      Compliant Solution

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

      Exceptions

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

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

                  $discountAggregation = $config['aggregation'];
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by sonar-php

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

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

      Noncompliant Code Example

      With the default threshold of 3:

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

      Compliant Solution

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

      Exceptions

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

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

              $viewer->assign('CURRENCY_SYMBOL', $currency ? \App\Fields\Currency::getById($currency)['currency_symbol'] : \App\Fields\Currency::getDefault()['currency_symbol']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by sonar-php

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

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

      Noncompliant Code Example

      With the default threshold of 3:

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

      Compliant Solution

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

      Exceptions

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

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('TOTAL_PRICE', $totalPrice);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('CONFIG', $config);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('DISCOUNT_TYPE', $discountType);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('TAX_FIELD', $taxField);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULE', $moduleName);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('GLOBAL_TAXES', Vtiger_Inventory_Model::getGlobalTaxes());
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('GLOBAL_DISCOUNTS', $inventoryModel->getGlobalDiscounts());
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('RECORD', $record);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('GROUP_TAXS', $accountTaxes['taxes']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('CURRENCY_SYMBOL', $currency ? \App\Fields\Currency::getById($currency)['currency_symbol'] : \App\Fields\Currency::getDefault()['currency_symbol']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULE', $moduleName);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('AGGREGATION_TYPE', $config['aggregation']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('ACCOUNT_NAME', $groupDiscount['name']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('TAX_TYPE', $taxType);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('CURRENCY_SYMBOL', \App\Fields\Currency::getById($currency)['currency_symbol']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('CONFIG', $config);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('RECORD_MODULE', $recordModule);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('ACCOUNT_NAME', $accountTaxes['name']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('AGGREGATION_INPUT_TYPE', 0 == $discountAggregation ? 'radio' : 'checkbox');
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('GROUP_DISCOUNT', $groupDiscount['discount']);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('AGGREGATION_INPUT_TYPE', 0 == $config['aggregation'] ? 'radio' : 'checkbox');
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('TOTAL_PRICE', $totalPrice);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('AGGREGATION_TYPE', $discountAggregation);
      Severity: Critical
      Found in modules/Vtiger/views/Inventory.php by phan

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

      class Vtiger_Inventory_View extends Vtiger_IndexAjax_View

      The class Vtiger_Inventory_View is not named in CamelCase.
      Open

      class Vtiger_Inventory_View extends Vtiger_IndexAjax_View
      {
          public function __construct()
          {
              parent::__construct();
      Severity: Minor
      Found in modules/Vtiger/views/Inventory.php by phpmd

      CamelCaseClassName

      Since: 0.2

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

      Example

      class class_name {
      }

      Source

      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

                  throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);

      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

              if (!\App\Privilege::isPermitted($moduleName, 'EditView')) {

      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->exposeMethod('showTaxes');

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

                  $discountAggregation = $config['aggregation'];

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

              $discountType = $request->getInteger('discountType');

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

              $currency = $request->getInteger('currency');

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

              if ($request->has('discountAggregation')) {

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

              $config = $inventoryModel->getDiscountsConfig();

      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

              $this->exposeMethod('showDiscounts');

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

          {

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

              $moduleName = $request->getModule();

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

              $relatedRecord = $request->isEmpty('relatedRecord', true) ? false : $request->getInteger('relatedRecord');

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

              $totalPrice = $request->getByType('totalPrice', 'Double');

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

              $viewer->assign('ACCOUNT_NAME', $groupDiscount['name']);

      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

              $accountTaxes = $inventoryModel->getAccountTax($relatedRecord);

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

              $viewer->assign('TOTAL_PRICE', $totalPrice);

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

              $viewer->assign('AGGREGATION_INPUT_TYPE', 0 == $config['aggregation'] ? 'radio' : 'checkbox');

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

              $viewer->assign('CONFIG', $config);

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

              $groupDiscount = $inventoryModel->getAccountDiscount($relatedRecord);

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

              $viewer->assign('MODULE', $moduleName);

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

           * Function to show taxes.

      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

              $relatedRecord = $request->isEmpty('relatedRecord', true) ? false : $request->getInteger('relatedRecord');

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

              $viewer->assign('GLOBAL_DISCOUNTS', $inventoryModel->getGlobalDiscounts());

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

              $viewer->assign('CURRENCY_SYMBOL', $currency ? \App\Fields\Currency::getById($currency)['currency_symbol'] : \App\Fields\Currency::getDefault()['currency_symbol']);

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

          public function showTaxes(App\Request $request)

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

              $taxField = '';

      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

              $inventoryModel = Vtiger_Inventory_Model::getInstance($moduleName);

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

              $viewer->assign('MODULE', $moduleName);

      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

          public function showDiscounts(App\Request $request)

      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->assign('GLOBAL_TAXES', Vtiger_Inventory_Model::getGlobalTaxes());

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

              $viewer->assign('TAX_TYPE', $taxType);

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

          }

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

              $inventoryModel = Vtiger_Inventory_Model::getInstance($moduleName);

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

                  $discountAggregation = $request->getInteger('discountAggregation');

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

          }

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

                  throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);

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

              }

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

              $record = $request->getInteger('record');

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

              $viewer->assign('RECORD', $record);

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

              $viewer->assign('GROUP_TAXS', $accountTaxes['taxes']);

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

              $viewer->assign('AGGREGATION_INPUT_TYPE', 0 == $discountAggregation ? 'radio' : 'checkbox');

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

              $viewer->assign('GROUP_DISCOUNT', $groupDiscount['discount']);

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

              $viewer->assign('AGGREGATION_TYPE', $config['aggregation']);

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

              $viewer->assign('DISCOUNT_TYPE', $discountType);

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

          /**

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

           *

      Line exceeds 120 characters; contains 172 characters
      Open

              $viewer->assign('CURRENCY_SYMBOL', $currency ? \App\Fields\Currency::getById($currency)['currency_symbol'] : \App\Fields\Currency::getDefault()['currency_symbol']);

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

              if (!\App\Privilege::isPermitted($moduleName, 'EditView')) {

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

              $viewer->assign('CURRENCY_SYMBOL', \App\Fields\Currency::getById($currency)['currency_symbol']);

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

              $viewer->assign('ACCOUNT_NAME', $accountTaxes['name']);

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

              $viewer->view('InventoryDiscounts.tpl', $moduleName);

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

              $config = $inventoryModel->getTaxesConfig();

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

              $viewer->assign('TAX_FIELD', $taxField);

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

              $viewer->view('InventoryTaxes.tpl', $moduleName);

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

              $viewer->assign('TOTAL_PRICE', $totalPrice);

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

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

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

              $currency = $request->getInteger('currency');

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

              $viewer->assign('AGGREGATION_TYPE', $discountAggregation);

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

              $taxType = $request->getInteger('taxType');

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

              $totalPrice = $request->getByType('totalPrice', 'Double');

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

              if ($recordModule && ($recordModuleModel = \Vtiger_Module_Model::getInstance($recordModule))) {

      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('CONFIG', $config);

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

              $moduleName = $request->getModule();

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

                  $taxField = ($field = current($recordModuleModel->getFieldsByUiType(303))) ? $field->getName() : '';

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

              $viewer->assign('RECORD_MODULE', $recordModule);

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

      class Vtiger_Inventory_View extends Vtiger_IndexAjax_View

      There are no issues that match your filters.

      Category
      Status