Avoid too many return
statements within this method. Open
return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));
Function getReferenceModule
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getReferenceModule($record): ?Vtiger_Module_Model
{
if (!empty($record)) {
$referenceModuleList = $this->getReferenceModules();
$referenceEntityType = vtlib\Functions::getCRMRecordMetadata($record)['setype'] ?? '';
- 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 validate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function validate($value, string $columnName, bool $isUserFormat, $originalValue = null)
{
if ((empty($value) && $this->isMandatory()) || ($value && !is_numeric($value))) {
throw new \App\Exceptions\Security("ERR_ILLEGAL_FIELD_VALUE||$columnName||$value", 406);
}
- 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
Reduce the number of returns of this function 5, down to the maximum allowed 3. Open
public function getDisplayValue($value, array $rowData = [], bool $rawText = false)
- Read upRead up
- Exclude checks
Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.
Noncompliant Code Example
With the default threshold of 3:
function myFunction(){ // Noncompliant as there are 4 return statements if (condition1) { return true; } else { if (condition2) { return false; } else { return true; } } return false; }
Missing class import via use statement (line '114', column '14'). Open
throw new \App\Exceptions\Security("ERR_ILLEGAL_FIELD_VALUE||$columnName||$value", 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
The method getDisplayValue has a boolean flag argument $rawText, which is a certain sign of a Single Responsibility Principle violation. Open
public function getDisplayValue($value, array $rowData = [], bool $rawText = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '118', column '14'). Open
throw new \App\Exceptions\Security("ERR_VALUE_IS_TOO_LONG||$columnName||$value", 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
Avoid using static access to class '\App\Language' in method 'getDisplayValue'. Open
return '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';
- 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 'getReferenceModule'. Open
}
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid assigning values to variables in if clauses and the like (line '54', column '8'). Open
public function getEditValue($value)
{
if (empty($value)) {
return '';
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class '\App\Record' in method 'getEditValue'. Open
return \App\Record::getLabel($value);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Fields\Owner' in method 'getDisplayValue'. Open
return \App\Fields\Owner::getLabel($value);
- 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 'getDisplayValue'. Open
return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));
- 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 'getReferenceModule'. Open
return Vtiger_Module_Model::getInstance('Users');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Purifier' in method 'getDisplayValue'. Open
return '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';
- 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 'getReferenceModule'. Open
return Vtiger_Module_Model::getInstance($referenceEntityType);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Fields\Owner' in method 'getEditValue'. Open
return \App\Fields\Owner::getLabel($value);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Record' in method 'getDisplayValue'. Open
return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid assigning values to variables in if clauses and the like (line '35', column '9'). Open
public function getDisplayValue($value, array $rowData = [], bool $rawText = false)
{
if (empty($value)) {
return '';
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class '\App\Record' in method 'getDisplayValue'. Open
return \App\Record::getLabel($value, $rawText);
- 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 "Users" 4 times. Open
if ('Users' === $referenceModuleName || 'Groups' === $referenceModuleName) {
- 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 "mandatory" 3 times. Open
protected $params = ['modules', 'mandatory'];
- 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 method getLabel
from undeclared class \App\Fields\Owner
Open
return \App\Fields\Owner::getLabel($value);
- Exclude checks
Argument 2 (moduleName)
is false
but \App\Record::getHtmlLink()
takes null|string
defined at /code/app/Record.php:394
Open
return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));
- Exclude checks
Call to method getLabel
from undeclared class \App\Fields\Owner
Open
return \App\Fields\Owner::getLabel($value);
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Vtiger_Reference_InventoryField extends Vtiger_Basic_InventoryField
- Exclude checks
The class Vtiger_Reference_InventoryField is not named in CamelCase. Open
class Vtiger_Reference_InventoryField extends Vtiger_Basic_InventoryField
{
protected $type = 'Reference';
protected $defaultLabel = 'LBL_REFERENCE';
protected $columnName = 'ref';
- 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
protected $columnName = 'ref';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $purifyType = \App\Purifier::INTEGER;
- 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
protected $defaultLabel = 'LBL_REFERENCE';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!($referenceModule = $this->getReferenceModule($value))) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$referenceModuleName = $referenceModule->getName();
- 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 getDisplayValue($value, array $rowData = [], bool $rawText = 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
$referenceModuleList = $this->getReferenceModules();
- 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 ('Users' === $referenceModuleName || 'Groups' === $referenceModuleName) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($rawText) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($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
if (($referenceModule = $this->getReferenceModule($value)) && ('Users' === $referenceModule->getName() || 'Groups' === $referenceModule->getName())) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function isMandatory()
- 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 isset($config['mandatory']) ? 'false' !== $config['mandatory'] : true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$referenceEntityType = vtlib\Functions::getCRMRecordMetadata($record)['setype'] ?? '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return Vtiger_Module_Model::getInstance('Users');
- 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
*/
- 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
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $maximumLength = '-2147483648,2147483647';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \App\Record::getLabel($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
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($record)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Line exceeds 120 characters; contains 158 characters Open
if (($referenceModule = $this->getReferenceModule($value)) && ('Users' === $referenceModule->getName() || 'Groups' === $referenceModule->getName())) {
- 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 null;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $params = ['modules', 'mandatory'];
- 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
}
- 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 'inventoryTypes/Reference.tpl';
- 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 \App\Fields\Owner::getLabel($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
* @param mixed $record
- 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
protected $type = 'Reference';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getEditValue($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
}
- 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 '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
return '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getReferenceModule($record): ?Vtiger_Module_Model
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \App\Fields\Owner::getLabel($value);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($referenceModuleList) && \in_array('Users', $referenceModuleList)) {
- 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
$config = $this->getParamsConfig();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return Vtiger_Module_Model|null
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return Vtiger_Module_Model::getInstance($referenceEntityType);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getEditTemplateName()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get the Display Value, for the current field type with given DB Insert Value.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($referenceModuleList) && \in_array($referenceEntityType, $referenceModuleList)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getReferenceModules()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $dbType = 'int';
- 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
if (empty($value)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \App\Record::getLabel($value, $rawText);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get reference modules.
- 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
$values = $this->getParamsConfig()['modules'] ?? [];
- 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
throw new \App\Exceptions\Security("ERR_ILLEGAL_FIELD_VALUE||$columnName||$value", 406);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Getting value to display.
- 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 getDBValue($value, ?string $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
if (!empty($value) && ($rangeValues[1] < $value || $rangeValues[0] > $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
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\Security("ERR_VALUE_IS_TOO_LONG||$columnName||$value", 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
['id' => 'true', 'name' => 'LBL_YES'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\is_string($values)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$values = explode(' |##| ', $values);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return (int) $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
public function validate($value, string $columnName, bool $isUserFormat, $originalValue = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ((empty($value) && $this->isMandatory()) || ($value && !is_numeric($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
return [
- 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
$rangeValues = explode(',', $this->maximumLength);
- 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
return $values;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function mandatoryValues()
- 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
['id' => 'false', 'name' => 'LBL_NO'],
- Exclude checks
Class name "Vtiger_Reference_InventoryField" is not in camel caps format Open
class Vtiger_Reference_InventoryField extends Vtiger_Basic_InventoryField
- Exclude checks