YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/models/Calendar.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Avoid using static access to class 'DateTimeField' in method 'updateEvent'.
Open

                $start = DateTimeField::convertToDBTimeZone($start);
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class 'Vtiger_CalendarRightPanel_Model' in method 'getSideBarLinks'.
Open

            'filterData' => Vtiger_CalendarRightPanel_Model::getUsersList($this->getModuleName()),
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class 'Vtiger_Record_Model' in method 'updateEvent'.
Open

            $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $this->getModuleName());
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\Log' in method 'updateEvent'.
Open

            \App\Log::error($e->__toString());
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

            $this->module = Vtiger_Module_Model::getInstance($this->getModuleName());
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $links[] = Vtiger_Link_Model::getInstanceFromValues([
            'linktype' => 'SIDEBARWIDGET',
            'linklabel' => 'LBL_USERS',
            'linkclass' => 'js-calendar__filter--users',
            'template' => 'Filters/Users.tpl',
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

    public function updateEvent(int $recordId, string $start, string $end, App\Request $request): bool
    {
        try {
            $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $this->getModuleName());
            if ($success = $recordModel->isEditable()) {
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

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

            } else {
                $item['color'] = '#81D4FA';
                $item['icon'] = 'fas fa-church';
            }
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

ElseExpression

Since: 1.4.0

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

Example

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

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

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

}
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $links[] = Vtiger_Link_Model::getInstanceFromValues([
            'linktype' => 'SIDEBARWIDGET',
            'linklabel' => 'LBL_GROUPS',
            'linkclass' => 'js-calendar__filter--groups',
            'template' => 'Filters/Groups.tpl',
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class 'App\Fields\Date' in method 'getPublicHolidays'.
Open

        foreach (App\Fields\Date::getHolidays(DateTimeField::convertToDBTimeZone($this->get('start'))->format('Y-m-d'), DateTimeField::convertToDBTimeZone($this->get('end'))->format('Y-m-d')) as $holiday) {
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class 'Vtiger_Loader' in method 'getInstance'.
Open

        $className = Vtiger_Loader::getComponentClassName('Model', 'Calendar', $moduleName);
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class 'Vtiger_CalendarRightPanel_Model' in method 'getSideBarLinks'.
Open

            'filterData' => Vtiger_CalendarRightPanel_Model::getGroupsList($this->getModuleName()),
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class 'DateTimeField' in method 'updateEvent'.
Open

                $end = DateTimeField::convertToDBTimeZone($end);
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $links = Vtiger_Link_Model::getAllByType($this->getModule()->getId(), ['SIDEBARWIDGET'], $linkParams)['SIDEBARWIDGET'] ?? [];
Severity: Critical
Found in modules/Vtiger/models/Calendar.php by sonar-php

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

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

Noncompliant Code Example

With the default threshold of 3:

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

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

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

Define a constant instead of duplicating this literal "Y-m-d" 4 times.
Open

        foreach (App\Fields\Date::getHolidays(DateTimeField::convertToDBTimeZone($this->get('start'))->format('Y-m-d'), DateTimeField::convertToDBTimeZone($this->get('end'))->format('Y-m-d')) as $holiday) {
Severity: Critical
Found in modules/Vtiger/models/Calendar.php by sonar-php

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

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

Noncompliant Code Example

With the default threshold of 3:

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

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

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

Avoid unused parameters such as '$request'.
Open

    public function updateEvent(int $recordId, string $start, string $end, App\Request $request): bool
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Call to method error from undeclared class \App\Log
Open

            \App\Log::error($e->__toString());
Severity: Critical
Found in modules/Vtiger/models/Calendar.php by phan

Call to method getGroupsList from undeclared class \Vtiger_CalendarRightPanel_Model
Open

            'filterData' => Vtiger_CalendarRightPanel_Model::getGroupsList($this->getModuleName()),
Severity: Critical
Found in modules/Vtiger/models/Calendar.php by phan

Call to undeclared method \App\Db\Query::count
Open

        return $this->getQuery()->count();
Severity: Critical
Found in modules/Vtiger/models/Calendar.php by phan

Call to method getUsersList from undeclared class \Vtiger_CalendarRightPanel_Model
Open

            'filterData' => Vtiger_CalendarRightPanel_Model::getUsersList($this->getModuleName()),
Severity: Critical
Found in modules/Vtiger/models/Calendar.php by phan

Doc-block of $moduleName in getInstance contains phpdoc param type mixed which is incompatible with the param type string declared in the signature
Open

     * @param mixed $moduleName
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phan

Saw possibly unextractable annotation for a fragment of comment '* @param mixed id or name of the module': after mixed, did not see an element name (will guess based on comment order)
Open

     * @param mixed id or name of the module
Severity: Info
Found in modules/Vtiger/models/Calendar.php by phan

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

abstract class Vtiger_Calendar_Model extends App\Base

The class Vtiger_Calendar_Model is not named in CamelCase.
Open

abstract class Vtiger_Calendar_Model extends App\Base
{
    /**
     * @var string Module name
     */
Severity: Minor
Found in modules/Vtiger/models/Calendar.php by phpmd

CamelCaseClassName

Since: 0.2

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

Example

class class_name {
}

Source

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

     * @return \Vtiger_Module_Model

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

    /**

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

     * Get module name.

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

    }

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

     * @var string Module name

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 $moduleName;

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

        if (!isset($this->module)) {

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

    public $module;

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

     * @var \Vtiger_Module_Model Module model

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

            'linktype' => 'SIDEBARWIDGET',

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

            'template' => 'Filters/Groups.tpl',

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

    public function getPublicHolidays()

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

     * Function to get records.

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

     * Get module model.

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

            'filterData' => Vtiger_CalendarRightPanel_Model::getUsersList($this->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

                $recordModel->set('time_end', $end->format('H:i:s'));

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 array

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

                $recordModel->save();

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

            }

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

            'linktype' => 'SIDEBARWIDGET',

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

            'filterData' => Vtiger_CalendarRightPanel_Model::getGroupsList($this->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

    /**

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

        return $this->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 getModule()

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

        $links = Vtiger_Link_Model::getAllByType($this->getModule()->getId(), ['SIDEBARWIDGET'], $linkParams)['SIDEBARWIDGET'] ?? [];

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

     * Static Function to get the instance of Vtiger Module Model for the given id or name.

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

     * @param mixed id or name of the module

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 $handler;

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 \App\Db\Query

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

     */

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

            $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $this->getModuleName());

Line exceeds 120 characters; contains 133 characters
Open

        $links = Vtiger_Link_Model::getAllByType($this->getModule()->getId(), ['SIDEBARWIDGET'], $linkParams)['SIDEBARWIDGET'] ?? [];

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

        foreach (App\Fields\Date::getHolidays(DateTimeField::convertToDBTimeZone($this->get('start'))->format('Y-m-d'), DateTimeField::convertToDBTimeZone($this->get('end'))->format('Y-m-d')) as $holiday) {

Line exceeds 120 characters; contains 206 characters
Open

        foreach (App\Fields\Date::getHolidays(DateTimeField::convertToDBTimeZone($this->get('start'))->format('Y-m-d'), DateTimeField::convertToDBTimeZone($this->get('end'))->format('Y-m-d')) as $holiday) {

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

                'start' => $holiday['date'],

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

                $item['icon'] = 'fas fa-church';

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

     */

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

     * Update event.

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

                $recordModel->set('date_start', $start->format('Y-m-d'));

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 static function getInstance(string $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

    abstract public function getEntity();

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

    public function updateEvent(int $recordId, string $start, string $end, App\Request $request): bool

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

        try {

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

                $start = DateTimeField::convertToDBTimeZone($start);

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

            'linklabel' => 'LBL_USERS',

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

        $className = Vtiger_Loader::getComponentClassName('Model', 'Calendar', $moduleName);

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

            $item = [

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

                $item['icon'] = 'fas fa-flag';

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 mixed $moduleName

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

        $handler = new $className();

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

                $item['color'] = '#FFAB91';

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

                $item['color'] = '#81D4FA';

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 string       $end      End date

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

     * @param \App\Request $request  Request instance

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

        return $success;

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

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 $result;

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

     * @return bool

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

            if ($success = $recordModel->isEditable()) {

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

            \App\Log::error($e->__toString());

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

                'display' => 'background',

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

     * @param int          $recordId Record 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

        }

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

    /**

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

     * Gest query.

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

    abstract public function getQuery();

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

     * @param string       $start    Start date

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

            $this->module = Vtiger_Module_Model::getInstance($this->getModuleName());

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

        return $this->module;

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

    }

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

     * Get records count for extended calendar left column.

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

        return $this->getQuery()->count();

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 $links;

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

        $handler->moduleName = $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

     * Get public holidays for rendering them on the calendar.

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

                $recordModel->set('time_start', $start->format('H:i:s'));

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' => 'js-calendar__filter--groups',

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

        $result = [];

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

            if ('national' === $holiday['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

     * @return int|string

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

                'title' => $holiday['name'],

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

     *

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

                $end = DateTimeField::convertToDBTimeZone($end);

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

                $recordModel->set('due_date', $end->format('Y-m-d'));

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

                $success = true;

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

            $success = false;

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

    public function getSideBarLinks($linkParams)

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

            'linkclass' => 'js-calendar__filter--users',

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

            'template' => 'Filters/Users.tpl',

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

            'linklabel' => 'LBL_GROUPS',

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

            $result[] = $item;

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

     *

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

        } catch (Exception $e) {

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

abstract class Vtiger_Calendar_Model extends App\Base

There are no issues that match your filters.

Category
Status