YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

Method getWidgetData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function getWidgetData(): array
    {
        $moduleName = $this->fieldModel->getModuleName();
        $fieldName = $this->fieldModel->getName();
        $columnName = $this->fieldModel->getColumnName();
Severity: Minor
Found in modules/Vtiger/dashboards/UpcomingEvents.php - About 1 hr to fix

    The class Vtiger_UpcomingEvents_Dashboard has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13.
    Open

    class Vtiger_UpcomingEvents_Dashboard extends Vtiger_IndexAjax_View
    {
        /**
         * @var bool Skip the year
         */

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

    Missing class import via use statement (line '38', column '22').
    Open

            $pagingModel = new Vtiger_Paging_Model();

    MissingImport

    Since: 2.7.0

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

    Example

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

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

    Missing class import via use statement (line '89', column '24').
    Open

                $query->orderBy(new \yii\db\Expression("EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)"));

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

            $queryGenerator = new \App\QueryGenerator($moduleName);

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

                $query->andWhere(new \yii\db\Expression("(EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)) >= ($now)"));

    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

    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/UpcomingEvents.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 'App\Fields\Date' in method 'getWidgetData'.
    Open

                    [, $m, $d] = App\Fields\Date::explode($row[$fieldName]);

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

            $this->parseDataWidget(\App\Json::decode(App\Purifier::decodeHtml($widget->get('data'))));

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

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());

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

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());

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

            } else {
                $query->orderBy([$columnName => SORT_ASC]);
            }

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

                $viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->getModuleName()));

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\Vtiger_Util_Helper' in method 'getWidgetData'.
    Open

                    $val = '<span title="' . $val . '">' . \Vtiger_Util_Helper::formatDateDiffInStrings(date('Y') . "-$m-$d") . '</span>';

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

            $this->parseDataWidget(\App\Json::decode(App\Purifier::decodeHtml($widget->get('data'))));

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

            $widget = Vtiger_Widget_Model::getInstance($linkId, $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

    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_Field_Model' in method 'parseDataWidget'.
    Open

            $fieldModel = Vtiger_Field_Model::getInstanceFromFieldId($data['date_fields']);

    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\Record' in method 'getWidgetData'.
    Open

                    'name' => App\Record::getLabel($row['id']),

    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

    Rename "$fieldModel" which has the same name as the field declared at line 25.
    Open

            $fieldModel = Vtiger_Field_Model::getInstanceFromFieldId($data['date_fields']);

    Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the variable is being used.

    Noncompliant Code Example

    class Foo {
      public $myField;
    
      public function doSomething() {
        $myField = 0;
        ...
      }
    }
    

    See

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('WIDGET', $widget);

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

                $query->orderBy(new \yii\db\Expression("EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)"));

    Call to method getInstanceWithWidgetId from undeclared class \Vtiger_Widget_Model
    Open

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());

    Call to method getInstance from undeclared class \Vtiger_Widget_Model
    Open

            $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());

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

            $queryGenerator = new \App\QueryGenerator($moduleName);

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

                $query->andWhere(new \yii\db\Expression("(EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)) >= ($now)"));

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

            $query = $queryGenerator->createQuery();

    Call to undeclared method \Vtiger_Viewer::assign
    Open

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

    Call with 1 arg(s) to \Vtiger_UpcomingEvents_Dashboard::getWidgetData() which only takes 0 arg(s) defined at /code/modules/Vtiger/dashboards/UpcomingEvents.php:77
    Open

                $viewer->assign('RECORDS', $this->getWidgetData($request));

    Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
    Open

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());

    Call to undeclared method \Vtiger_Viewer::assign
    Open

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

    Call to undeclared method \Vtiger_Viewer::assign
    Open

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

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('RECORDS', $this->getWidgetData($request));

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

            $queryGenerator->addCondition($fieldName, '', 'ny');

    Call to deprecated function \Vtiger_Field_Model::getFieldLabel() defined at /code/modules/Vtiger/models/Field.php:215
    Open

                $viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->getModuleName()));

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->getModuleName()));

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

            $queryGenerator->setFields(['id', $fieldName]);

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

    class Vtiger_UpcomingEvents_Dashboard extends Vtiger_IndexAjax_View

    The class Vtiger_UpcomingEvents_Dashboard is not named in CamelCase.
    Open

    class Vtiger_UpcomingEvents_Dashboard extends Vtiger_IndexAjax_View
    {
        /**
         * @var bool Skip the year
         */

    CamelCaseClassName

    Since: 0.2

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

    Example

    class class_name {
    }

    Source

    Avoid variables with short names like $m. Configured minimum length is 3.
    Open

                    [, $m, $d] = App\Fields\Date::explode($row[$fieldName]);

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

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

    Avoid variables with short names like $d. Configured minimum length is 3.
    Open

                    [, $m, $d] = App\Fields\Date::explode($row[$fieldName]);

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

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

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

         * @var Vtiger_Field_Model Filter field model

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

         * @var bool Skip the year

    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

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

            $fieldModel = Vtiger_Field_Model::getInstanceFromFieldId($data['date_fields']);

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

        }

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

            $queryGenerator->setFields(['id', $fieldName]);

    Line exceeds 120 characters; contains 134 characters
    Open

                    $val = '<span title="' . $val . '">' . \Vtiger_Util_Helper::formatDateDiffInStrings(date('Y') . "-$m-$d") . '</span>';

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

                    'url' => "index.php?module={$moduleName}&view=Detail&record={$row['id']}",

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

        /**

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

         * @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->orderBy([$columnName => SORT_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

        private $fieldModel;

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

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

    Line exceeds 120 characters; contains 128 characters
    Open

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());

    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

                $records[] = [

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

            }

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

                $viewer->assign('RECORDS', $this->getWidgetData($request));

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

            $this->skipYear = !empty($data['skip_year']);

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

            }

    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

                $val = $uiTypeModel->getDisplayValue($row[$fieldName], $row['id'], false, true);

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

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

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

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

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

         *

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

                $query->andWhere(new \yii\db\Expression("(EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)) >= ($now)"));

    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

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

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

                    'value' => $val,

    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

        private $skipYear;

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

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

    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->view('dashboards/UpcomingEventsContents.tpl', $moduleName);

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

                $this->fieldModel = $fieldModel;

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

         */

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

        {

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

            $queryGenerator = new \App\QueryGenerator($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

            $pagingModel = new Vtiger_Paging_Model();

    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

            }

    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 void

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

         */

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

            $query = $queryGenerator->createQuery();

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

            $moduleName = $request->getModule();

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

            }

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

            $columnName = $this->fieldModel->getColumnName();

    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

         * Widget data.

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

                    $val = '<span title="' . $val . '">' . \Vtiger_Util_Helper::formatDateDiffInStrings(date('Y') . "-$m-$d") . '</span>';

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

            return $records;

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

        /** {@inheritdoc}  */

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

            $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());

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

            if (isset($this->fieldModel)) {

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

        public function parseDataWidget(array $data): void

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

                    'id' => $row['id'],

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

                    'name' => App\Record::getLabel($row['id']),

    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

            } else {

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

            if ($fieldModel->isActiveField()) {

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

            $queryGenerator->addCondition($fieldName, '', 'ny');

    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('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->getModuleName()));

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

        /**

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

         * Parse widget data.

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

         * @param array $data

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

            if ($this->skipYear) {

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

                $query->orderBy(new \yii\db\Expression("EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)"));

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

            $records = [];

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

         *

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

        private function getWidgetData(): array

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

                $now = date('m, d');

    Line exceeds 120 characters; contains 131 characters
    Open

                $query->andWhere(new \yii\db\Expression("(EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)) >= ($now)"));

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

                    [, $m, $d] = App\Fields\Date::explode($row[$fieldName]);

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

        {

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

            $linkId = $request->getInteger('linkid');

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

            $uiTypeModel = $this->fieldModel->getUITypeModel();

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

            $this->parseDataWidget(\App\Json::decode(App\Purifier::decodeHtml($widget->get('data'))));

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

            $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());

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

            $pagingModel->set('limit', (int) $widget->get('limit'));

    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

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

    Line exceeds 120 characters; contains 139 characters
    Open

                $viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->getModuleName()));

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

            $moduleName = $this->fieldModel->getModuleName();

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

            $fieldName = $this->fieldModel->getName();

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

                if ($this->skipYear) {

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

    class Vtiger_UpcomingEvents_Dashboard extends Vtiger_IndexAjax_View

    There are no issues that match your filters.

    Category
    Status