YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/dashboards/ProductsSoldToRenew.php

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

Method process has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function process(App\Request $request, $widget = null)
    {
        $currentUser = Users_Record_Model::getCurrentUserModel();
        $viewer = $this->getViewer($request);
        $moduleName = $request->getModule();
Severity: Minor
Found in modules/Vtiger/dashboards/ProductsSoldToRenew.php - About 1 hr to fix

    Function getHeaders has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getHeaders()
        {
            $this->initListViewController();
            if (empty($this->listviewHeaders)) {
                $headerFieldModels = [];
    Severity: Minor
    Found in modules/Vtiger/dashboards/ProductsSoldToRenew.php - About 35 mins 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

    Missing class import via use statement (line '103', column '32').
    Open

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

    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\Json' in method 'getUrl'.
    Open

            return $this->getTargetModuleModel()->getListViewUrl() . '&viewname=All&search_params=' . urlencode(App\Json::encode([$this->getConditions()]));

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

            } else {
                $viewer->view('dashboards/ProductsSoldToRenew.tpl', $moduleName);
            }

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Vtiger_Widget_Model' in method 'process'.
    Open

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());

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

            } else {
                $widgetId = $request->getInteger('widgetid');
            }

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

            $currentUser = Users_Record_Model::getCurrentUserModel();

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

                $this->targetModuleModel = Vtiger_Module_Model::getInstance($this->getTargetModule());

    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 "sortorder" 6 times.
    Open

                'sortorder' => $request->getForSql('sortorder'),

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

                'orderby' => $request->getForSql('orderby'),

    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('WIDGET', $widget);

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->data
    Open

            return $this->data[$key];

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
    Open

            if (empty($this->listviewHeaders)) {

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
    Open

                $query = $this->queryGenerator->createQuery();

    Call to method getInstanceWithWidgetId from undeclared class \Vtiger_Widget_Model
    Open

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
    Open

                $this->queryGenerator->setFields($this->getTargetFields());

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('OWNER', $currentUser->getId());

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->data (Did you mean $data)
    Open

            return $this->data = $data;

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
    Open

                    $this->listviewRecords[$row['id']] = $this->getTargetModuleModel()->getRecordFromArray($row);

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
    Open

                foreach ($this->queryGenerator->getListViewFields() as $fieldName => &$fieldsModel) {

    Call to undeclared method \Vtiger_Viewer::assign
    Open

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

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->targetModuleModel
    Open

            if (empty($this->targetModuleModel)) {

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
    Open

            if (empty($this->queryGenerator)) {

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('BASE_MODULE', $this->getTargetModule());

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
    Open

                $this->queryGenerator->setOrder($this->getFromData('orderby'), $this->getFromData('sortorder'));

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->targetModuleModel
    Open

                $this->targetModuleModel = Vtiger_Module_Model::getInstance($this->getTargetModule());

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
    Open

            if (empty($this->listviewRecords)) {

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->widgetModel
    Open

                $limit = $this->widgetModel->get('limit');

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
    Open

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

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
    Open

                $this->listviewRecords = [];

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('CURRENTUSER', $currentUser);

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->widgetModel (Did you mean $widgetModel)
    Open

            $this->widgetModel = $widgetModel;

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
    Open

            return $this->listviewHeaders;

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
    Open

            return $this->listviewRecords;

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->widgetModel
    Open

            if ($this->widgetModel->get('limit')) {

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

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

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
    Open

                $this->listviewHeaders = $this->listviewRecords = null;

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('DATA', $data);

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->targetModuleModel
    Open

            return $this->targetModuleModel;

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
    Open

                $this->listviewHeaders = $this->listviewRecords = null;

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('WIDGET_MODEL', $this);

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
    Open

                $this->listviewHeaders = $headerFieldModels;

    Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
    Open

                    $this->queryGenerator->addCondition($condition[0], $condition[2], $condition[1]);

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

    class Vtiger_ProductsSoldToRenew_Dashboard extends Vtiger_IndexAjax_View

    The class Vtiger_ProductsSoldToRenew_Dashboard is not named in CamelCase.
    Open

    class Vtiger_ProductsSoldToRenew_Dashboard extends Vtiger_IndexAjax_View
    {
        public function process(App\Request $request, $widget = null)
        {
            $currentUser = Users_Record_Model::getCurrentUserModel();

    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

            $currentUser = Users_Record_Model::getCurrentUserModel();

    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

            $viewer->assign('WIDGET_MODEL', $this);

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

            $viewer->assign('BASE_MODULE', $this->getTargetModule());

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

            $viewer->assign('DATA', $data);

    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

                $this->targetModuleModel = Vtiger_Module_Model::getInstance($this->getTargetModule());

    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

                $query = $this->queryGenerator->createQuery();

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

        {

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

                $this->listviewRecords = [];

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

            return \count($this->getHeaders());

    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

                    $this->listviewRecords[$row['id']] = $this->getTargetModuleModel()->getRecordFromArray($row);

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

                'orderby' => $request->getForSql('orderby'),

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

                $viewer->view('dashboards/ProductsSoldToRenew.tpl', $moduleName);

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

            return $this->targetModuleModel;

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

            $this->initListViewController();

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

                    $this->queryGenerator->addCondition($condition[0], $condition[2], $condition[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

         * Conditions.

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

        public function getConditions(): 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

            $this->setData([

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

                'sortorder' => $request->getForSql('sortorder'),

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

            if (empty($data['orderby'])) {

    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 ['id', 'assetname', 'parent_id', 'dateinservice'];

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

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

            return $this->listviewRecords;

    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->widgetModel = $widgetModel;

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

                foreach ($this->queryGenerator->getListViewFields() as $fieldName => &$fieldsModel) {

    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

        public function process(App\Request $request, $widget = null)

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

                $widgetId = $request->getInteger('widgetid');

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

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());

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

            return $this->data = $data;

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

        {

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

        protected function initListViewController()

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

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

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

            $this->initListViewController();

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

                $this->queryGenerator->setOrder($this->getFromData('orderby'), $this->getFromData('sortorder'));

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

            $viewer->assign('CURRENTUSER', $currentUser);

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

                $data['orderby'] = 'dateinservice';

    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($this->targetModuleModel)) {

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

            return 'Assets';

    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

            return [['assetstatus', 'e', 'PLL_ACCEPTED'], ['assets_renew', 'e', 'PLL_WAITING_FOR_RENEWAL']];

    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

        public function getFromData($key)

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

        }

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

            if ($this->widgetModel->get('limit')) {

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

                $this->listviewHeaders = $this->listviewRecords = null;

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

                $headerFieldModels = [];

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

                    if (\in_array($fieldName, $this->getRestrictFields())) {

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

        {

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

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

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

            $this->setWidgetModel($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

            } else {

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

        public function setData($data)

    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 $this->data[$key];

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

            $limit = 10;

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

        public function getTargetModule()

    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

            if (empty($this->listviewHeaders)) {

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

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

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

                $dataReader->close();

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

        public function getFieldNameToSecondButton()

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

            // Initialize Widget to the right-state of information

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

            $data['orderby'] = $this->getFromData('orderby');

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

                $data['sortorder'] = 'asc';

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

        {

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

                $limit = $this->widgetModel->get('limit');

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

        }

    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

            }

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

         * Gets record list.

    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

            } else {

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

            $viewer->assign('WIDGET', $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

        public function getTargetFields()

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

                $this->queryGenerator->setFields($this->getTargetFields());

    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

        public function getUrl(): string

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

        public function setWidgetModel($widgetModel)

    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

        }

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

            $data = $request->getAll();

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

            if ($widget && !$request->has('widgetid')) {

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

                $viewer->view('dashboards/ProductsSoldToRenewContents.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

            }

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

        }

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

                    $headerFieldModels[$fieldName] = $fieldsModel;

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

            return $this->listviewHeaders;

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

         *

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

                $widgetId = $widget->get('id');

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

            $viewer->assign('OWNER', $currentUser->getId());

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

        public function getRecordLimit()

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

        public function getHeaders()

    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->listviewHeaders = $headerFieldModels;

    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 $this->getTargetModuleModel()->getListViewUrl() . '&viewname=All&search_params=' . urlencode(App\Json::encode([$this->getConditions()]));

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

        public function getTargetModuleModel()

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

            if (empty($this->listviewRecords)) {

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

                foreach ($this->getConditions() as $condition) {

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

                $query->limit($this->getRecordLimit());

    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

            $data['sortorder'] = $this->getFromData('sortorder');

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

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

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

            return $limit;

    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($this->queryGenerator)) {

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

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

        public function getRecords(): array

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

            return 'assets_renew';

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

         * Gets url.

    Line exceeds 120 characters; contains 152 characters
    Open

            return $this->getTargetModuleModel()->getListViewUrl() . '&viewname=All&search_params=' . urlencode(App\Json::encode([$this->getConditions()]));

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

        }

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

         * @throws \App\Exceptions\AppException

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

         * @return string

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

         *

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

         *

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

        {

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

    class Vtiger_ProductsSoldToRenew_Dashboard extends Vtiger_IndexAjax_View

    There are no issues that match your filters.

    Category
    Status