Method getFieldInstanceByName
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFieldInstanceByName($name)
{
$moduleName = $this->getName(true);
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
switch ($name) {
Function getFieldInstanceByName
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getFieldInstanceByName($name)
{
$moduleName = $this->getName(true);
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
switch ($name) {
- 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
Function getEditFields
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getEditFields($configName = null): array
{
$fields = [];
switch ($configName ?? $this->type) {
case 'Main':
- 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
Function init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function init(string $type = 'Main')
{
$this->type = $type;
foreach (array_keys($this->getEditFields()) as $fieldName) {
$source = $this->getFieldInstanceByName($fieldName)->get('source');
- 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
The method getFieldInstanceByName() has 139 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function getFieldInstanceByName($name)
{
$moduleName = $this->getName(true);
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
switch ($name) {
- Exclude checks
The method getFieldInstanceByName() has a Cyclomatic Complexity of 27. The configured cyclomatic complexity threshold is 10. Open
public function getFieldInstanceByName($name)
{
$moduleName = $this->getName(true);
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
switch ($name) {
- 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 '290', column '19'). Open
$config = new \App\ConfigFile('component', 'Branding');
- 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\YetiForce\Shop' in method 'getFieldInstanceByName'. Open
$params['isEditableReadOnly'] = !\App\YetiForce\Shop::check('YetiForceDisableBranding');
- 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\Config' in method 'init'. Open
$value = \App\Config::{$type}($component, $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 'Settings_Vtiger_Field_Model' in method 'getFieldInstanceByName'. Open
return Settings_Vtiger_Field_Model::init($moduleName, $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 '\vtlib\Functions' in method 'getFieldInstanceByName'. Open
foreach (\vtlib\Functions::getAllModules(true, false, 0) as $module) {
- 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\Config' in method 'getFieldInstanceByName'. Open
$params['maximumlength'] = (string) round(\App\Config::getMaxUploadSize(false, true), 0) ?: '';
- 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 init uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$value = \App\Config::{$type}($fieldName);
}
- 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\Config' in method 'init'. Open
$value = \App\Config::{$type}($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\Layout' in method 'getFieldInstanceByName'. Open
$params['picklistValues'] = \App\Layout::getAllLayouts();
- 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\YetiForce\Shop' in method 'getFieldInstanceByName'. Open
$params['isEditableReadOnly'] = !\App\YetiForce\Shop::check('YetiForceDisableBranding');
- 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_Vtiger_MenuItem_Model' in method 'getMenuItem'. Open
return Settings_Vtiger_MenuItem_Model::getInstance('LBL_CONFIG_EDITOR');
- 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 'getFieldInstanceByName'. Open
$params['picklistValues'][$module['name']] = \App\Language::translate($module['name'], $module['name']);
- 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 'getFieldInstanceByName'. Open
$params['picklistValues'] = ['Home' => \App\Language::translate('Home')];
- 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 'getDisplayValue'. Open
$value = $this->get($name) . ' ' . \App\Language::translate('LBL_MB', $this->getName(true));
- 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 "WholeNumberGreaterThanZero" 3 times. Open
$params['validator'] = [['name' => 'WholeNumberGreaterThanZero']];
- 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 "validator" 13 times. Open
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
- 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 "typeofdata" 7 times. Open
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
- 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 "relation" 3 times. Open
$params['source'] = 'relation';
- 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 "fieldvalue" 6 times. Open
$params['fieldvalue'] = $this->get($name);
- 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 "purifyType" 14 times. Open
$params['purifyType'] = \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 "source" 9 times. Open
$source = $this->getFieldInstanceByName($fieldName)->get('source');
- 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 "uitype" 13 times. Open
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
- 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 "upload_maxsize" 4 times. Open
'upload_maxsize' => 'LBL_MAX_UPLOAD_SIZE',
- 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 "isEditableReadOnly" 3 times. Open
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
- 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 "picklistValues" 3 times. Open
$params['picklistValues'] = ['Home' => \App\Language::translate('Home')];
- 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 "maximumlength" 11 times. Open
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
- 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 "label" 12 times. Open
$params['label'] = $this->performanceFields[$name];
- 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 '$name'. Open
public static function getInstance($name = 'Settings:Vtiger')
- 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 check
from undeclared class \App\YetiForce\Shop
Open
$params['isEditableReadOnly'] = !\App\YetiForce\Shop::check('YetiForceDisableBranding');
- Exclude checks
Return type of getMenuItem()
is undeclared type \menu
(Did you mean class \vtlib\Menu) Open
public function getMenuItem()
- Exclude checks
Returning type \Settings_Vtiger_MenuItem_Model
but getMenuItem()
is declared to return \menu
Open
return Settings_Vtiger_MenuItem_Model::getInstance('LBL_CONFIG_EDITOR');
- Exclude checks
Call to method get
from undeclared class \menu
(Did you mean class \vtlib\Menu) Open
return 'index.php?module=ConfigEditor&parent=Settings&view=Detail&block=' . $menuItem->get('blockid') . '&fieldid=' . $menuItem->get('fieldid');
- Exclude checks
Call to method get
from undeclared class \menu
(Did you mean class \vtlib\Menu) Open
return 'index.php?module=ConfigEditor&parent=Settings&view=Edit&block=' . $menuItem->get('blockid') . '&fieldid=' . $menuItem->get('fieldid');
- Exclude checks
Call to method check
from undeclared class \App\YetiForce\Shop
Open
$params['isEditableReadOnly'] = !\App\YetiForce\Shop::check('YetiForceDisableBranding');
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Settings_ConfigEditor_Module_Model extends Settings_Vtiger_Module_Model
- Exclude checks
The class Settings_ConfigEditor_Module_Model is not named in CamelCase. Open
class Settings_ConfigEditor_Module_Model extends Settings_Vtiger_Module_Model
{
/** {@inheritdoc} */
public $name = 'ConfigEditor';
/** {@inheritdoc} */
- 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
$value = \App\Config::{$type}($fieldName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields = $this->brandingFields;
- 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
'listMaxEntriesMassEdit' => 'LBL_LIST_MAX_ENTRIES_MASSEDIT',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'MAX_NUMBER_EXPORT_RECORDS' => 'LBL_MAX_NUMBER_EXPORT_RECORDS'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var array Fields for branding */
- 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 init(string $type = 'Main')
- 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
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'COMMENT_MAX_LENGTH' => 'LBL_RELATION_COMMENT_MAX_LENGTH',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->type = $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
* @param mixed|null $configName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields = [];
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'SHOW_RECORDS_COUNT' => 'LBL_RELATION_SHOW_RECORDS_COUNT',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = \App\Config::{$type}($component, $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
public $performanceFields = [
- 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
case 'Performance':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'Branding':
- 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 $name = 'ConfigEditor';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'layoutInLoginView' => 'LBL_SHOW_LAYOUT_IN_LOGIN_PAGE',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var array Fields for relation */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'urlTwitter' => 'LBL_TWITTER'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @throws \ReflectionException
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets fields for edit.
- 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
$fields = $this->listFields;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields = $this->relationFields;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'backgroundClosingModal' => 'LBL_BG_CLOSING_MODAL',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var array Fields for performance */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'separateChangeRelationButton' => 'LBL_RELATION_SEPARATE_CHANGE_RELATION_BUTTON',
- 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
$value /= 1048576;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $listFields = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'langInLoginView' => 'LBL_SHOW_LANG_IN_LOGIN_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
'urlFacebook' => 'LBL_FACEBOOK',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach (array_keys($this->getEditFields()) as $fieldName) {
- 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 getEditFields($configName = null): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'list_max_entries_per_page' => 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'SHOW_RELATED_ICON' => 'LBL_RELATION_SHOW_RELATED_ICON',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'urlLinkedIn' => 'LBL_LINKEDIN',
- 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
* Function to initiation.
- 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
$fields = $this->performanceFields;
- 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
* Function to get CompanyDetails Menu item.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'breadcrumbs' => 'LBL_SHOWING_BREADCRUMBS',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $relationFields = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
[$type, $component] = strpos($source, ':') ? explode(':', $source, 2) : [$source, ''];
- 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
'default_module' => 'LBL_DEFAULT_MODULE',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'defaultLayout' => 'LBL_DEFAULT_LAYOUT',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $brandingFields = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var string Configuration type */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('upload_maxsize' === $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
'SHOW_RELATED_MODULE_NAME' => 'LBL_RELATION_SHOW_RELATED_MODULE_NAME',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($component) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->set($fieldName, $value);
- 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
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'MINIMUM_CRON_FREQUENCY' => 'LBL_MINIMUM_CRON_FREQUENCY',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'footerName' => 'LBL_BRAND_DATA_NAME',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$source = $this->getFieldInstanceByName($fieldName)->get('source');
- 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
'listview_max_textlength' => 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'title_max_length' => 'LBL_TITLE_MAX_LENGTH',
- 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 $type;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $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
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'href_max_length' => 'LBL_HREF_MAX_LEGTH',
- 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
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
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['validator'] = [['name' => 'WholeNumberGreaterThanZero']];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['fieldvalue'] = $this->get($name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['fieldvalue'] = $this->get($name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['typeofdata'] = 'C~M';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'upload_maxsize' => 'LBL_MAX_UPLOAD_SIZE',
- 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
switch ($configName ?? $this->type) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'Main':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'Relation':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $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
$menuItem = $this->getMenuItem();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return 'index.php?module=ConfigEditor&parent=Settings&view=Edit&block=' . $menuItem->get('blockid') . '&fieldid=' . $menuItem->get('fieldid');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '40';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['picklistValues'] = ['Home' => \App\Language::translate('Home')];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 7;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'SHOW_RELATED_MODULE_NAME':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::BOOL;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '0,100';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get Edit view Url.
- 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 getDetailViewUrl()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return 'index.php?module=ConfigEditor&parent=Settings&view=Detail&block=' . $menuItem->get('blockid') . '&fieldid=' . $menuItem->get('fieldid');
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
return 'index.php?module=ConfigEditor&parent=Settings&view=Detail&block=' . $menuItem->get('blockid') . '&fieldid=' . $menuItem->get('fieldid');
- 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
$params['validator'] = [['name' => 'WholeNumberGreaterThanZero']];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::TEXT;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['picklistValues'] = \App\Layout::getAllLayouts();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::TEXT;
- 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
// Realtion
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['typeofdata'] = 'C~M';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Line exceeds 120 characters; contains 150 characters Open
return 'index.php?module=ConfigEditor&parent=Settings&view=Edit&block=' . $menuItem->get('blockid') . '&fieldid=' . $menuItem->get('fieldid');
- 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
* Function determines fields available in edition view.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $name
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = (string) round(\App\Config::getMaxUploadSize(false, true), 0) ?: '';
- 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
case 'default_module':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 16;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['picklistValues'][$module['name']] = \App\Language::translate($module['name'], $module['name']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->relationFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['tooltip'] = 'LBL_RELATION_SEPARATE_CHANGE_RELATION_BUTTON_DESC';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return Settings_Vtiger_MenuItem_Model::getInstance('LBL_CONFIG_EDITOR');
- 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 self
- 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['uitype'] = 7;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'upload_maxsize':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'langInLoginView':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'breadcrumbs':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '50';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['source'] = 'relation';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'separateChangeRelationButton':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['isEditableReadOnly'] = !\App\YetiForce\Shop::check('YetiForceDisableBranding');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return Settings_Vtiger_Field_Model::init($moduleName, $params);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $value;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return menu item Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string Url
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get the instance of Config module model.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::TEXT;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::BOOL;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 56;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->listFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 7;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getDisplayValue($name)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'upload_maxsize':
- 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['validator'] = [['name' => 'WholeNumberGreaterThanZero']];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::TEXT;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['source'] = 'relation';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::INTEGER;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '255';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return mixed
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $this->getFieldInstanceByName($name)->getDisplayValue($this->get($name));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getMenuItem()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string Url
- 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
case 'MAX_NUMBER_EXPORT_RECORDS':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '99999999';
- 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
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->listFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 56;
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
$params['picklistValues'][$module['name']] = \App\Language::translate($module['name'], $module['name']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['fieldvalue'] = $this->get($name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'title_max_length':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'MINIMUM_CRON_FREQUENCY':
- 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['purifyType'] = \App\Purifier::URL;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- 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
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
public function getEditViewUrl()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get Detail view Url.
- 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['purifyType'] = \App\Purifier::TEXT;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'defaultLayout':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 16;
- 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['label'] = $this->relationFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Branding
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'footerName':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'urlTwitter':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['fieldvalue'] = $defaullt === $this->get($name) ? '' : $this->get($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 getFieldInstanceByName($name)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
switch ($name) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['typeofdata'] = 'C~M';
- 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
case 'COMMENT_MAX_LENGTH':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'SHOW_RELATED_ICON':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 56;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['source'] = 'relation';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['fieldvalue'] = $this->get($name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 7;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['typeofdata'] = 'V~O';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::TEXT;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['source'] = 'component:Branding';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'urlLinkedIn':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$config = new \App\ConfigFile('component', 'Branding');
- 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
default:
- 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
$menuItem = $this->getMenuItem();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return \Settings_Vtiger_Field_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['source'] = 'performance';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'listMaxEntriesMassEdit':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->listFields[$name];
- 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
case 'SHOW_RECORDS_COUNT':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- 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['label'] = $this->relationFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'listview_max_textlength':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'urlFacebook':
- 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 \ReflectionException
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '5000';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['typeofdata'] = 'C~M';
- 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['purifyType'] = \App\Purifier::BOOL;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '255';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$defaullt = $config->getTemplate($name)['default'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['source'] = 'component:Branding';
- 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
* @param string $name field 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
$params['label'] = $this->performanceFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->listFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::BOOL;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::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['label'] = $this->listFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '200';
- 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
* Function to getDisplay value of every field.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
switch ($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
/**
- 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
Line exceeds 120 characters; contains 252 characters Open
$params = ['uitype' => 7, 'column' => $name, 'name' => $name, 'displaytype' => 1, 'typeofdata' => 'I~M', 'presence' => 0, 'isEditableReadOnly' => false, 'maximumlength' => '', 'validator' => [['name' => 'NumberRange100']], 'source' => 'main'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'backgroundClosingModal':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($params['validator']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach (\vtlib\Functions::getAllModules(true, false, 0) as $module) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['tooltip'] = 'LBL_RELATION_COMMENT_MAX_LENGTH_DESC';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->brandingFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->brandingFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['typeofdata'] = 'V~O';
- 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
$value = $this->get($name) . ' ' . \App\Language::translate('LBL_MB', $this->getName(true));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $name
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['source'] = 'layout';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['uitype'] = 56;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['purifyType'] = \App\Purifier::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
public static function getInstance($name = 'Settings:Vtiger')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return new self();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $this->getName(true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['label'] = $this->listFields[$name];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'layoutInLoginView':
- 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
case 'href_max_length':
- 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
$params['uitype'] = 17;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['fieldvalue'] = $this->get($name);
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'list_max_entries_per_page':
- 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
unset($params['validator']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['maximumlength'] = '255';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['isEditableReadOnly'] = !\App\YetiForce\Shop::check('YetiForceDisableBranding');
- Exclude checks
Class name "Settings_ConfigEditor_Module_Model" is not in camel caps format Open
class Settings_ConfigEditor_Module_Model extends Settings_Vtiger_Module_Model
- Exclude checks