Method saveWidget
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function saveWidget(App\Request $request)
{
$params = $request->getMultiDimensionArray('params', [
'tabid' => 'Integer',
'data' => [
The method validateLimit() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. Open
private function validateLimit(array $params): bool
{
$returnVal = false;
if (isset($params['data']['type'])) {
switch ($params['data']['type']) {
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Missing class import via use statement (line '104', column '19'). Open
$response = new Vtiger_Response();
- 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 '64', column '14'). Open
throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||limit||' . $params['data']['limit'], 406);
- 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 '87', column '19'). Open
$response = new Vtiger_Response();
- 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 '73', column '19'). Open
$response = new Vtiger_Response();
- 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 'Settings_Widgets_Module_Model' in method 'removeWidget'. Open
Settings_Widgets_Module_Model::removeWidget($params['wid']);
- 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 'saveWidget'. Open
$params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);
- 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\Language' in method 'saveWidget'. Open
'message' => \App\Language::translate('Saved changes', $request->getModule(false)),
- 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 'Settings_Widgets_Module_Model' in method 'updateSequence'. Open
Settings_Widgets_Module_Model::updateSequence($params);
- 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 'Settings_Widgets_Module_Model' in method 'saveWidget'. Open
Settings_Widgets_Module_Model::saveWidget($params);
- 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 'saveWidget'. Open
$params['data']['search_params'] = \App\Json::decode($params['data']['search_params']);
- 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\Language' in method 'removeWidget'. Open
'message' => \App\Language::translate('Removed widget', $request->getModule(false)),
- 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\Language' in method 'updateSequence'. Open
'message' => \App\Language::translate('Update has been completed', $request->getModule(false)),
- 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 "Integer" 13 times. Open
'tabid' => 'Integer',
- 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 "Alnum" 4 times. Open
'type' => 'Alnum',
- 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 "limit" 3 times. Open
'limit' => 'Integer',
- 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 "params" 3 times. Open
$params = $request->getMultiDimensionArray('params', [
- 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" 4 times. Open
'orderby' => \App\Purifier::TEXT
- 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 "success" 3 times. Open
'success' => 1,
- 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 "message" 3 times. Open
'message' => \App\Language::translate('Saved changes', $request->getModule(false)),
- 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 "search_params" 4 times. Open
'search_params' => 'Text',
- 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.
Invalid offset "orderby"
of array type array{search_params:mixed}
Open
$params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);
- Exclude checks
Argument 1 (encodedValue)
is null
but \App\Json::decode()
takes string
defined at /code/app/Json.php:37
Open
$params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Settings_Widgets_SaveAjax_Action extends Settings_Vtiger_Basic_Action
- Exclude checks
The class Settings_Widgets_SaveAjax_Action is not named in CamelCase. Open
class Settings_Widgets_SaveAjax_Action extends Settings_Vtiger_Basic_Action
{
/** {@inheritdoc} */
public function __construct()
{
- 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
'wid' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'actionSelect' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'filter' => 'Text',
- 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
$response = new Vtiger_Response();
- 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
$response->setResult([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'Summary':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exposeMethod('removeWidget');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Save widget.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'relatedfields' => ['Text'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'fromRelation' => \App\Purifier::TEXT,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||limit||' . $params['data']['limit'], 406);
- 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 (isset($params['data']['type'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct()
- 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
'label' => 'Text',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'email_template' => \App\Purifier::INTEGER,
- 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
$response->emit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'message' => \App\Language::translate('Update has been completed', $request->getModule(false)),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Validate limit for widgets.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'DetailView':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params = $request->getMultiDimensionArray('params', [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'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
if (isset($params['data']['search_params'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Settings_Widgets_Module_Model::saveWidget($params);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response->setResult([
- 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 updateSequence(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'FastEdit':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'Updates':
- 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
'viewtype' => 'Alnum',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'color' => \App\Purifier::BOOL,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params = $request->getMultiDimensionArray('params', [
- 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
'success' => 1,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$returnVal = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $returnVal;
- 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
'relatedmodule' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'switchHeader' => 'Text',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function removeWidget(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'tabid' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'column' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'UpdatesList':
- 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->exposeMethod('updateSequence');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'limit' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'valueType' => 'Text',
- 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
$response = new Vtiger_Response();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'type' => 'Alnum',
- 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
$response->setResult([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response->emit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'data' => [[
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'index' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = new Vtiger_Response();
- 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
case 'PDFViewer':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$returnVal = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::__construct();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function saveWidget(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'no_result_text' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'FastEdit' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'chartType' => 'Text',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'groupField' => 'Text',
- 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
$params = $request->getMultiDimensionArray('params', [
- 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
'switchTypeInHeader' => 'Text',
- 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
case 'WYSIWYG':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- 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
* @throws \App\Exceptions\IllegalValue
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['data']['search_params'] = \App\Json::decode($params['data']['search_params']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Settings_Widgets_Module_Model::updateSequence($params);
- 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
case 'SummaryCategory':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'tabid' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
default:
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'relation_id' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'valueField' => 'Text',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$this->validateLimit($params)) {
- 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
switch ($params['data']['type']) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'action' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response->emit();
- 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
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'search_params' => 'Text',
- 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 (isset($params['data']['orderby'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'success' => 1,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Settings_Widgets_Module_Model::removeWidget($params['wid']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'success' => 1,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'message' => \App\Language::translate('Removed widget', $request->getModule(false)),
- 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
$returnVal = $params['data']['limit'] >= 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
$this->exposeMethod('saveWidget');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'checkbox' => 'Text',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'field_name' => 'Alnum',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'orderby' => \App\Purifier::TEXT
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'wid' => 'Integer',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param array $params
- 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
'customView' => ['Alnum'],
- 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
'message' => \App\Language::translate('Saved changes', $request->getModule(false)),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function validateLimit(array $params): bool
- Exclude checks
Class name "Settings_Widgets_SaveAjax_Action" is not in camel caps format Open
class Settings_Widgets_SaveAjax_Action extends Settings_Vtiger_Basic_Action
- Exclude checks