Method process
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(App\Request $request, $widget = null)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Function getHeaders
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getHeaders()
{
$this->initListViewController();
if (empty($this->listviewHeaders)) {
$headerFieldModels = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Missing class import via use statement (line '103', column '32'). Open
$this->queryGenerator = new \App\QueryGenerator($this->getTargetModule());
- 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
Avoid using static access to class 'App\Json' in method 'getUrl'. Open
return $this->getTargetModuleModel()->getListViewUrl() . '&viewname=All&search_params=' . urlencode(App\Json::encode([$this->getConditions()]));
- 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 process uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$viewer->view('dashboards/ProductsSoldToRenew.tpl', $moduleName);
}
- 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_Widget_Model' in method 'process'. Open
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $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
The method process uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$widgetId = $request->getInteger('widgetid');
}
- 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 '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_Module_Model' in method 'getTargetModuleModel'. Open
$this->targetModuleModel = Vtiger_Module_Model::getInstance($this->getTargetModule());
- 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 "sortorder" 6 times. Open
'sortorder' => $request->getForSql('sortorder'),
- 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 "orderby" 7 times. Open
'orderby' => $request->getForSql('orderby'),
- 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.
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('WIDGET', $widget);
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->data
Open
return $this->data[$key];
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
Open
if (empty($this->listviewHeaders)) {
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
Open
$query = $this->queryGenerator->createQuery();
- Exclude checks
Call to method getInstanceWithWidgetId
from undeclared class \Vtiger_Widget_Model
Open
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
Open
$this->queryGenerator->setFields($this->getTargetFields());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('OWNER', $currentUser->getId());
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->data
(Did you mean $data) Open
return $this->data = $data;
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
Open
$this->listviewRecords[$row['id']] = $this->getTargetModuleModel()->getRecordFromArray($row);
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
Open
foreach ($this->queryGenerator->getListViewFields() as $fieldName => &$fieldsModel) {
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE_NAME', $moduleName);
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->targetModuleModel
Open
if (empty($this->targetModuleModel)) {
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
Open
if (empty($this->queryGenerator)) {
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('BASE_MODULE', $this->getTargetModule());
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
Open
$this->queryGenerator->setOrder($this->getFromData('orderby'), $this->getFromData('sortorder'));
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->targetModuleModel
Open
$this->targetModuleModel = Vtiger_Module_Model::getInstance($this->getTargetModule());
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
Open
if (empty($this->listviewRecords)) {
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->widgetModel
Open
$limit = $this->widgetModel->get('limit');
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
Open
$this->queryGenerator = new \App\QueryGenerator($this->getTargetModule());
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
Open
$this->listviewRecords = [];
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('CURRENTUSER', $currentUser);
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->widgetModel
(Did you mean $widgetModel) Open
$this->widgetModel = $widgetModel;
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
Open
return $this->listviewHeaders;
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
Open
return $this->listviewRecords;
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->widgetModel
Open
if ($this->widgetModel->get('limit')) {
- Exclude checks
Call to method __construct
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$this->queryGenerator = new \App\QueryGenerator($this->getTargetModule());
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewRecords
Open
$this->listviewHeaders = $this->listviewRecords = null;
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('DATA', $data);
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->targetModuleModel
Open
return $this->targetModuleModel;
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
Open
$this->listviewHeaders = $this->listviewRecords = null;
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('WIDGET_MODEL', $this);
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->listviewHeaders
Open
$this->listviewHeaders = $headerFieldModels;
- Exclude checks
Reference to undeclared property \Vtiger_ProductsSoldToRenew_Dashboard->queryGenerator
Open
$this->queryGenerator->addCondition($condition[0], $condition[2], $condition[1]);
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Vtiger_ProductsSoldToRenew_Dashboard extends Vtiger_IndexAjax_View
- Exclude checks
The class Vtiger_ProductsSoldToRenew_Dashboard is not named in CamelCase. Open
class Vtiger_ProductsSoldToRenew_Dashboard extends Vtiger_IndexAjax_View
{
public function process(App\Request $request, $widget = null)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
- 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
$currentUser = Users_Record_Model::getCurrentUserModel();
- 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
$moduleName = $request->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('WIDGET_MODEL', $this);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('BASE_MODULE', $this->getTargetModule());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('DATA', $data);
- 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
$this->targetModuleModel = Vtiger_Module_Model::getInstance($this->getTargetModule());
- 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 = $this->queryGenerator->createQuery();
- 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
$this->listviewRecords = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \count($this->getHeaders());
- 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
$this->listviewRecords[$row['id']] = $this->getTargetModuleModel()->getRecordFromArray($row);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'orderby' => $request->getForSql('orderby'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('dashboards/ProductsSoldToRenew.tpl', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->targetModuleModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initListViewController();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->queryGenerator->addCondition($condition[0], $condition[2], $condition[1]);
- 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
* Conditions.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getConditions(): 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
$this->setData([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sortorder' => $request->getForSql('sortorder'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($data['orderby'])) {
- 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 ['id', 'assetname', 'parent_id', 'dateinservice'];
- 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 getRestrictFields()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->listviewRecords;
- 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
$this->widgetModel = $widgetModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($this->queryGenerator->getListViewFields() as $fieldName => &$fieldsModel) {
- 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
public function process(App\Request $request, $widget = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$widgetId = $request->getInteger('widgetid');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->data = $data;
- 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
protected function initListViewController()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->queryGenerator = new \App\QueryGenerator($this->getTargetModule());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initListViewController();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->queryGenerator->setOrder($this->getFromData('orderby'), $this->getFromData('sortorder'));
- 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
$data['orderby'] = 'dateinservice';
- 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
if (empty($this->targetModuleModel)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return 'Assets';
- 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
return [['assetstatus', 'e', 'PLL_ACCEPTED'], ['assets_renew', 'e', 'PLL_WAITING_FOR_RENEWAL']];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE_NAME', $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 getFromData($key)
- 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
if ($this->widgetModel->get('limit')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->listviewHeaders = $this->listviewRecords = null;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$headerFieldModels = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\in_array($fieldName, $this->getRestrictFields())) {
- 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
while ($row = $dataReader->read()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setWidgetModel($widget);
- 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
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function setData($data)
- 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->data[$key];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$limit = 10;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getTargetModule()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($this->listviewHeaders)) {
- 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
$dataReader->close();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getFieldNameToSecondButton()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Initialize Widget to the right-state of information
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['orderby'] = $this->getFromData('orderby');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['sortorder'] = '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
$limit = $this->widgetModel->get('limit');
- 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
continue;
- 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
* Gets record list.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- 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
$viewer->assign('WIDGET', $widget);
- 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 getTargetFields()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->queryGenerator->setFields($this->getTargetFields());
- 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
public function getUrl(): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function setWidgetModel($widgetModel)
- 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
$data = $request->getAll();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($widget && !$request->has('widgetid')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('dashboards/ProductsSoldToRenewContents.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
}
- 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
$headerFieldModels[$fieldName] = $fieldsModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->listviewHeaders;
- 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
$widgetId = $widget->get('id');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('OWNER', $currentUser->getId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getRecordLimit()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getHeaders()
- 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
$this->listviewHeaders = $headerFieldModels;
- 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->getTargetModuleModel()->getListViewUrl() . '&viewname=All&search_params=' . urlencode(App\Json::encode([$this->getConditions()]));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getTargetModuleModel()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($this->listviewRecords)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($this->getConditions() as $condition) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$query->limit($this->getRecordLimit());
- 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
$data['sortorder'] = $this->getFromData('sortorder');
- 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
return $limit;
- 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
if (empty($this->queryGenerator)) {
- 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 getHeaderCount()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getRecords(): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return 'assets_renew';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets url.
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
return $this->getTargetModuleModel()->getListViewUrl() . '&viewname=All&search_params=' . urlencode(App\Json::encode([$this->getConditions()]));
- 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
* @throws \App\Exceptions\AppException
- 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
*
- 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
Class name "Vtiger_ProductsSoldToRenew_Dashboard" is not in camel caps format Open
class Vtiger_ProductsSoldToRenew_Dashboard extends Vtiger_IndexAjax_View
- Exclude checks