Avoid using static access to class 'DateTimeField' in method 'updateEvent'. Open
$start = DateTimeField::convertToDBTimeZone($start);
- Read upRead up
- Exclude checks
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()),
- Read upRead up
- Exclude checks
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());
- Read upRead up
- Exclude checks
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());
- Read upRead up
- Exclude checks
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());
- Read upRead up
- Exclude checks
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',
- Read upRead up
- Exclude checks
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()) {
- Read upRead up
- Exclude checks
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';
}
- Read upRead up
- Exclude checks
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
}
- Read upRead up
- Exclude checks
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',
- Read upRead up
- Exclude checks
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) {
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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()),
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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'] ?? [];
- Read upRead up
- Exclude checks
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) {
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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());
- Exclude checks
Call to method getGroupsList
from undeclared class \Vtiger_CalendarRightPanel_Model
Open
'filterData' => Vtiger_CalendarRightPanel_Model::getGroupsList($this->getModuleName()),
- Exclude checks
Call to undeclared method \App\Db\Query::count
Open
return $this->getQuery()->count();
- Exclude checks
Call to method getUsersList
from undeclared class \Vtiger_CalendarRightPanel_Model
Open
'filterData' => Vtiger_CalendarRightPanel_Model::getUsersList($this->getModuleName()),
- Exclude checks
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
- Exclude checks
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
- Exclude checks
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
- Exclude checks
The class Vtiger_Calendar_Model is not named in CamelCase. Open
abstract class Vtiger_Calendar_Model extends App\Base
{
/**
* @var string Module name
*/
- Read upRead up
- Exclude checks
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
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get module name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getModuleName()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string Module name
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $moduleName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!isset($this->module)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $module;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var \Vtiger_Module_Model Module model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'SIDEBARWIDGET',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'template' => 'Filters/Groups.tpl',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getPublicHolidays()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get records.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get module model.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'filterData' => Vtiger_CalendarRightPanel_Model::getUsersList($this->getModuleName()),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('time_end', $end->format('H:i:s'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'SIDEBARWIDGET',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'filterData' => Vtiger_CalendarRightPanel_Model::getGroupsList($this->getModuleName()),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->moduleName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getModule()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links = Vtiger_Link_Model::getAllByType($this->getModule()->getId(), ['SIDEBARWIDGET'], $linkParams)['SIDEBARWIDGET'] ?? [];
- Exclude checks
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.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed id or name of the module
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $handler;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return \App\Db\Query
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel = Vtiger_Record_Model::getInstanceById($recordId, $this->getModuleName());
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
$links = Vtiger_Link_Model::getAllByType($this->getModule()->getId(), ['SIDEBARWIDGET'], $linkParams)['SIDEBARWIDGET'] ?? [];
- Exclude checks
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) {
- Exclude checks
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) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'start' => $holiday['date'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$item['icon'] = 'fas fa-church';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Update event.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('date_start', $start->format('Y-m-d'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function getInstance(string $moduleName)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
abstract public function getEntity();
- Exclude checks
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
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
try {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$start = DateTimeField::convertToDBTimeZone($start);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_USERS',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$className = Vtiger_Loader::getComponentClassName('Model', 'Calendar', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$item = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$item['icon'] = 'fas fa-flag';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $moduleName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$handler = new $className();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$item['color'] = '#FFAB91';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$item['color'] = '#81D4FA';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $end End date
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request Request instance
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $success;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getEntityRecordsCount()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $result;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($success = $recordModel->isEditable()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::error($e->__toString());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links[] = Vtiger_Link_Model::getInstanceFromValues([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'display' => 'background',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $recordId Record ID
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links[] = Vtiger_Link_Model::getInstanceFromValues([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gest query.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
abstract public function getQuery();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $start Start date
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->module = Vtiger_Module_Model::getInstance($this->getModuleName());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->module;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get records count for extended calendar left column.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getQuery()->count();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $links;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$handler->moduleName = $moduleName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get public holidays for rendering them on the calendar.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('time_start', $start->format('H:i:s'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-calendar__filter--groups',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('national' === $holiday['type']) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return int|string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'title' => $holiday['name'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$end = DateTimeField::convertToDBTimeZone($end);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->set('due_date', $end->format('Y-m-d'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$success = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$success = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getSideBarLinks($linkParams)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-calendar__filter--users',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'template' => 'Filters/Users.tpl',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_GROUPS',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result[] = $item;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} catch (Exception $e) {
- Exclude checks
Class name "Vtiger_Calendar_Model" is not in camel caps format Open
abstract class Vtiger_Calendar_Model extends App\Base
- Exclude checks