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();
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
*/
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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)"));
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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)"));
- Read upRead up
- Exclude checks
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);
}
- 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 'App\Fields\Date' in method 'getWidgetData'. Open
[, $m, $d] = App\Fields\Date::explode($row[$fieldName]);
- 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\Purifier' in method 'process'. Open
$this->parseDataWidget(\App\Json::decode(App\Purifier::decodeHtml($widget->get('data'))));
- 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\User' in method 'process'. Open
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());
- 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_Widget_Model' in method 'process'. Open
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());
- 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
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]);
}
- 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 'App\Language' in method 'process'. Open
$viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->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_Util_Helper' in method 'getWidgetData'. Open
$val = '<span title="' . $val . '">' . \Vtiger_Util_Helper::formatDateDiffInStrings(date('Y') . "-$m-$d") . '</span>';
- 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\Json' in method 'process'. Open
$this->parseDataWidget(\App\Json::decode(App\Purifier::decodeHtml($widget->get('data'))));
- 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_Widget_Model' in method 'process'. Open
$widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
- 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 'Users_Record_Model' in method 'process'. Open
$currentUser = Users_Record_Model::getCurrentUserModel();
- 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_Field_Model' in method 'parseDataWidget'. Open
$fieldModel = Vtiger_Field_Model::getInstanceFromFieldId($data['date_fields']);
- 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\Record' in method 'getWidgetData'. Open
'name' => App\Record::getLabel($row['id']),
- 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
Rename "$fieldModel" which has the same name as the field declared at line 25. Open
$fieldModel = Vtiger_Field_Model::getInstanceFromFieldId($data['date_fields']);
- Read upRead up
- Exclude checks
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
- CERT, DCL51-J. - Do not shadow or obscure identifiers in subscopes
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('WIDGET', $widget);
- Exclude checks
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)"));
- Exclude checks
Call to method getInstanceWithWidgetId
from undeclared class \Vtiger_Widget_Model
Open
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());
- Exclude checks
Call to method getInstance
from undeclared class \Vtiger_Widget_Model
Open
$widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
- Exclude checks
Call to method __construct
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$queryGenerator = new \App\QueryGenerator($moduleName);
- Exclude checks
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)"));
- Exclude checks
Call to method createQuery
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$query = $queryGenerator->createQuery();
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('CURRENTUSER', $currentUser);
- Exclude checks
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));
- Exclude checks
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());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE_NAME', $moduleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('PAGING_MODEL', $pagingModel);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('RECORDS', $this->getWidgetData($request));
- Exclude checks
Call to method addCondition
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$queryGenerator->addCondition($fieldName, '', 'ny');
- Exclude checks
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()));
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->getModuleName()));
- Exclude checks
Call to method setFields
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$queryGenerator->setFields(['id', $fieldName]);
- Exclude checks
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
- Exclude checks
The class Vtiger_UpcomingEvents_Dashboard is not named in CamelCase. Open
class Vtiger_UpcomingEvents_Dashboard extends Vtiger_IndexAjax_View
{
/**
* @var bool Skip the year
*/
- 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
Avoid variables with short names like $m. Configured minimum length is 3. Open
[, $m, $d] = App\Fields\Date::explode($row[$fieldName]);
- Read upRead up
- Exclude checks
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]);
- Read upRead up
- Exclude checks
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
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var bool Skip the year
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function process(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('dashboards/UpcomingEvents.tpl', $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
$fieldModel = Vtiger_Field_Model::getInstanceFromFieldId($data['date_fields']);
- 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
$queryGenerator->setFields(['id', $fieldName]);
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
$val = '<span title="' . $val . '">' . \Vtiger_Util_Helper::formatDateDiffInStrings(date('Y') . "-$m-$d") . '</span>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'url' => "index.php?module={$moduleName}&view=Detail&record={$row['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
* @return array
- 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
$query->orderBy([$columnName => SORT_ASC]);
- 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
private $fieldModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($request->has('content')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$records[] = [
- 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
$viewer->assign('RECORDS', $this->getWidgetData($request));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->skipYear = !empty($data['skip_year']);
- 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
$dataReader = $query->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$val = $uiTypeModel->getDisplayValue($row[$fieldName], $row['id'], false, true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$page = $request->getInteger('page');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('PAGING_MODEL', $pagingModel);
- 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
$query->andWhere(new \yii\db\Expression("(EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)) >= ($now)"));
- 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
while ($row = $dataReader->read()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'value' => $val,
- 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
private $skipYear;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$pagingModel->set('page', $page);
- 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
$viewer->view('dashboards/UpcomingEventsContents.tpl', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->fieldModel = $fieldModel;
- 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
$queryGenerator = new \App\QueryGenerator($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
$pagingModel = new Vtiger_Paging_Model();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('CURRENTUSER', $currentUser);
- 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 void
- 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
$query = $queryGenerator->createQuery();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $request->getModule();
- 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
$columnName = $this->fieldModel->getColumnName();
- 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
* Widget data.
- Exclude checks
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>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $records;
- 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
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($request->getInteger('widgetid'), \App\User::getCurrentUserId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($this->fieldModel)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function parseDataWidget(array $data): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'id' => $row['id'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => App\Record::getLabel($row['id']),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$currentUser = Users_Record_Model::getCurrentUserModel();
- 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
if ($fieldModel->isActiveField()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->addCondition($fieldName, '', 'ny');
- 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
$viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->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
* Parse widget data.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param array $data
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($this->skipYear) {
- Exclude checks
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)"));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$records = [];
- 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
private function getWidgetData(): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$now = date('m, d');
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
$query->andWhere(new \yii\db\Expression("(EXTRACT(MONTH FROM $columnName), EXTRACT(DAY FROM $columnName)) >= ($now)"));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
[, $m, $d] = App\Fields\Date::explode($row[$fieldName]);
- 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
$linkId = $request->getInteger('linkid');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uiTypeModel = $this->fieldModel->getUITypeModel();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->parseDataWidget(\App\Json::decode(App\Purifier::decodeHtml($widget->get('data'))));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$pagingModel->set('limit', (int) $widget->get('limit'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('WIDGET', $widget);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE_NAME', $moduleName);
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
$viewer->assign('FIELD_NAME', App\Language::translate($this->fieldModel->getFieldLabel(), $this->fieldModel->getModuleName()));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $this->fieldModel->getModuleName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fieldName = $this->fieldModel->getName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($this->skipYear) {
- Exclude checks
Class name "Vtiger_UpcomingEvents_Dashboard" is not in camel caps format Open
class Vtiger_UpcomingEvents_Dashboard extends Vtiger_IndexAjax_View
- Exclude checks