YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
B
5 hrs
Test Coverage
F
0%

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

    public function process(App\Request $request)
    {
        $moduleName = $request->getModule();
        $detailModel = Vtiger_DetailView_Model::getInstance($moduleName, $request->getInteger('record'));
        $recordModel = $detailModel->getRecord();
Severity: Minor
Found in modules/Vtiger/views/QuickDetailModal.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 process has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function process(App\Request $request)
    {
        $moduleName = $request->getModule();
        $detailModel = Vtiger_DetailView_Model::getInstance($moduleName, $request->getInteger('record'));
        $recordModel = $detailModel->getRecord();
Severity: Minor
Found in modules/Vtiger/views/QuickDetailModal.php - About 1 hr to fix

    Method getModalLinks has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getModalLinks(Vtiger_Record_Model $recordModel)
        {
            $links = Vtiger_Link_Model::getAllByType($recordModel->getModule()->getId(), ['QUICK_DETAIL_MODAL_HEADER'])['QUICK_DETAIL_MODAL_HEADER'] ?? [];
            if ($recordModel->isEditable()) {
                $links[] = Vtiger_Link_Model::getInstanceFromValues([
    Severity: Minor
    Found in modules/Vtiger/views/QuickDetailModal.php - About 1 hr to fix

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

          public function process(App\Request $request)

      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 '44', column '14').
      Open

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

      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 '47', column '14').
      Open

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

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

                          $widgetRequest = new \App\Request($output, false);

      MissingImport

      Since: 2.7.0

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

      Example

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

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

      Avoid using static access to class 'App\Language' in method 'process'.
      Open

                                  $label = App\Language::translate($relatedModule, $relatedModule);

      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_DetailView_Model' in method 'process'.
      Open

              $detailModel = Vtiger_DetailView_Model::getInstance($moduleName, $request->getInteger('record'));

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class 'Vtiger_Link_Model' in method 'getModalLinks'.
      Open

                  $links[] = Vtiger_Link_Model::getInstanceFromValues([
                      'linktype' => 'DETAIL_VIEW_BASIC',
                      'linklabel' => 'LBL_QUICK_EDIT',
                      'linkdata' => [
                          'module' => $recordModel->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 '\App\Privilege' in method 'checkPermission'.
      Open

              if (!\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record'))) {

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class 'Vtiger_Link_Model' in method 'getModalLinks'.
      Open

      }

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

      Avoid using static access to class 'App\Language' in method 'process'.
      Open

                                  $label = App\Language::translate($widget['label'], $moduleName);

      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_Link_Model' in method 'getModalLinks'.
      Open

                  $links[] = Vtiger_Link_Model::getInstanceFromValues([
                      'linktype' => 'DETAIL_VIEW_BASIC',
                      'linklabel' => 'BTN_RECORD_EDIT',
                      'linkurl' => $recordModel->getEditViewUrl(),
                      'linkicon' => 'yfi yfi-full-editing-view',

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

              $handlerClass = Vtiger_Loader::getComponentClassName('View', 'Detail', $moduleName);

      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_Link_Model' in method 'getModalLinks'.
      Open

                  $links[] = Vtiger_Link_Model::getInstanceFromValues([
                      'linktype' => 'LIST_VIEW_ACTIONS_RECORD_LEFT_SIDE',
                      'linklabel' => 'LBL_SHOW_COMPLETE_DETAILS',
                      'linkurl' => $recordModel->getFullDetailViewUrl(),
                      'linkicon' => 'fas fa-th-list',

      StaticAccess

      Since: 1.4.0

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

      Example

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

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

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

                                  $relatedModule = App\Module::getModuleName($widget['data']['relatedmodule']);

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

                      'linklabel' => 'LBL_QUICK_EDIT',

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

                      'linkclass' => 'btn btn-outline-dark btn-sm js-quick-edit-modal',

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

                      'linktype' => 'DETAIL_VIEW_BASIC',

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

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

      Noncompliant Code Example

      With the default threshold of 3:

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

      Compliant Solution

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

      Exceptions

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

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

              if ($request->isEmpty('record', true)) {

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

                      'linkicon' => 'yfi yfi-quick-creation',

      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.

      Class extends undeclared class \App\Controller\Modal
      Open

      class Vtiger_QuickDetailModal_View extends \App\Controller\Modal
      Severity: Critical
      Found in modules/Vtiger/views/QuickDetailModal.php by phan

      Call to method getInstance from undeclared class \Vtiger_DetailView_Model
      Open

              $detailModel = Vtiger_DetailView_Model::getInstance($moduleName, $request->getInteger('record'));
      Severity: Critical
      Found in modules/Vtiger/views/QuickDetailModal.php by phan

      Call to undeclared method \Vtiger_QuickDetailModal_View::getViewer
      Open

              $viewer = $this->getViewer($request);
      Severity: Critical
      Found in modules/Vtiger/views/QuickDetailModal.php by phan

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

      class Vtiger_QuickDetailModal_View extends \App\Controller\Modal

      The class Vtiger_QuickDetailModal_View is not named in CamelCase.
      Open

      class Vtiger_QuickDetailModal_View extends \App\Controller\Modal
      {
          /**
           * Modal size.
           *

      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

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

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

              $viewer->view('Modals/QuickDetailModal.tpl', $moduleName);

      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 $showHeader = false;

      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

              $moduleName = $request->getModule();

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

              $detailModel->getWidgets();

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

                              if (!empty($widget['label'])) {

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

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

      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

                  foreach ($dw as $widget) {

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

              $viewer->assign('LINKS', $this->getModalLinks($recordModel));

      Line exceeds 120 characters; contains 151 characters
      Open

              $links = Vtiger_Link_Model::getAllByType($recordModel->getModule()->getId(), ['QUICK_DETAIL_MODAL_HEADER'])['QUICK_DETAIL_MODAL_HEADER'] ?? [];

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

                      'linkclass' => 'btn btn-outline-dark btn-sm js-quick-edit-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

           * Modal size.

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

           * @throws \App\Exceptions\NoPermittedToRecord

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

                          $request->set('isReadOnly', 'true');

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

          /**

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

          {

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

                          'module' => $recordModel->getModuleName(),

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

                      'linkurl' => $recordModel->getFullDetailViewUrl(),

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

                      'linkicon' => 'fas fa-th-list',

      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 $showFooter = false;

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

          {

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

                      if (!empty($widget['url'])) {

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

                          $widgetRequest->set('isReadOnly', true);

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

                              $widgets[] = ['title' => $label, 'content' => $detailView->{$method}($widgetRequest), 'widgetData' => $widget];

      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('WIDGETS', $widgets);

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

                      'linktype' => 'DETAIL_VIEW_BASIC',

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

           * Checking permissions.

      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 process(App\Request $request)

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

                      'linktype' => 'DETAIL_VIEW_BASIC',

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

              if ($recordModel->isViewable()) {

      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

           * Show modal header.

      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 ($detailModel->widgets as $dw) {

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

                              $label = '';

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

                                  $relatedModule = App\Module::getModuleName($widget['data']['relatedmodule']);

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

                          $widgets[] = [

      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

                      'linkhref' => true,

      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

          public $modalSize = 'modal-lg modalRightSiteBar';

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

           * @var bool

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

           */

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

              $detailView->record = $detailModel;

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

                          $method = $output['mode'];

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

                          $widgetRequest = new \App\Request($output, false);

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

          public function getModalLinks(Vtiger_Record_Model $recordModel)

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

                      'linkurl' => $recordModel->getEditViewUrl(),

      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

           * @param \App\Request $request

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

              $recordModel = $detailModel->getRecord();

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

              $handlerClass = Vtiger_Loader::getComponentClassName('View', 'Detail', $moduleName);

      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[] = Vtiger_Link_Model::getInstanceFromValues([

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

                      'linkicon' => 'yfi yfi-quick-creation',

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

           * Process.

      Line exceeds 120 characters; contains 135 characters
      Open

                              $widgets[] = ['title' => $label, 'content' => $detailView->{$method}($widgetRequest), 'widgetData' => $widget];

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

                      } elseif ('Summary' === $widget['type']) {

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

           * 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

              $links = Vtiger_Link_Model::getAllByType($recordModel->getModule()->getId(), ['QUICK_DETAIL_MODAL_HEADER'])['QUICK_DETAIL_MODAL_HEADER'] ?? [];

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

                  ]);

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

                      'linkhref' => true,

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

           *

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

          /**

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

              $detailModel = Vtiger_DetailView_Model::getInstance($moduleName, $request->getInteger('record'));

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

                                  $label = App\Language::translate($widget['label'], $moduleName);

      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

                      'linkicon' => 'yfi yfi-full-editing-view',

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

                  $links[] = Vtiger_Link_Model::getInstanceFromValues([

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

           * @var bool

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

           * Show modal footer.

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

           *

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

           * @param \App\Request $request

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

              if ($request->isEmpty('record', true)) {

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

              if (!\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record'))) {

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

                      'linkhint' => 'LBL_QUICK_EDIT',

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

                  $links[] = Vtiger_Link_Model::getInstanceFromValues([

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

           * @var string

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

           *

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

           *

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

          public function checkPermission(App\Request $request)

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

              $widgets = [];

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

              }

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

           * @return Vtiger_Link_Model[]

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

                      'linklabel' => 'LBL_QUICK_EDIT',

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

                      'linkdata' => [

      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

                              } elseif ('RelatedModule' === $widget['type']) {

      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 ($recordModel->isEditable()) {

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

                  ]);

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

                      'linkclass' => 'btn btn-outline-dark btn-sm',

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

                      'linkhint' => 'BTN_RECORD_EDIT',

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

                      'linklabel' => 'LBL_SHOW_COMPLETE_DETAILS',

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

                      'linkclass' => 'btn-sm btn-default',

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

              $detailView = new $handlerClass();

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

                          parse_str($widget['url'], $output);

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

                          if ($detailView->isMethodExposed($method)) {

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

                                  $label = App\Language::translate($relatedModule, $relatedModule);

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

                              'content' => $detailView->showModuleSummaryView($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

                          'record' => $recordModel->getId(),

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

                      'linklabel' => 'BTN_RECORD_EDIT',

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

          /**

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

              }

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

           * @param Vtiger_Record_Model $recordModel

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

                      'linktype' => 'LIST_VIEW_ACTIONS_RECORD_LEFT_SIDE',

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

      class Vtiger_QuickDetailModal_View extends \App\Controller\Modal

      There are no issues that match your filters.

      Category
      Status