Method __vtlibGetModulevarValue
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function __vtlibGetModulevarValue($module, $varname)
{
$mod_var_mapping = [
'Accounts' => [
'IsCustomModule' => false,
The method __vtlibGetModulevarValue() has 133 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function __vtlibGetModulevarValue($module, $varname)
{
$mod_var_mapping = [
'Accounts' => [
'IsCustomModule' => false,
- Exclude checks
Reference to undeclared property \CRMEntity->table_name
Open
if (!isset($focus->$check)) {
- Exclude checks
Argument 2 (varname)
is 'IsCustomModule'|'popup_fields'|'related_tables'|'table_index'|'table_name'
but \VtlibUtils::__vtlibGetModulevarValue()
takes array
defined at /code/include/utils/VtlibUtils.php:38
Open
$focus->$check = static::__vtlibGetModulevarValue($module, $check);
- Exclude checks
When fetching an array index from a value of type array{IsCustomModule:false,table_name:'vtiger_account',table_index:'accountid',related_tables:array{vtiger_accountaddress:array{0:'accountaddressid',1:'vtiger_account',2:'accountid'},vtiger_accountscf:array{0:'accountid',1:'vtiger_account',2:'accountid'}},popup_fields:array{0:'accountname'}}|array{IsCustomModule:false,table_name:'vtiger_assets',table_index:'assetsid',related_tables:array{vtiger_assetscf:array{0:'assetsid'}}}|array{IsCustomModule:false,table_name:'vtiger_campaign',table_index:'campaignid',popup_fields:array{0:'campaignname'}}|array{IsCustomModule:false,table_name:'vtiger_contactdetails',table_index:'contactid',related_tables:array{vtiger_account:array{0:'parentid'},vtiger_contactaddress:array{0:'contactaddressid',1:'vtiger_contactdetails',2:'contactid'},vtiger_contactsubdetails:array{0:'contactsubscriptionid',1:'vtiger_contactdetails',2:'contactid'},vtiger_customerdetails:array{0:'customerid',1:'vtiger_contactdetails',2:'contactid'},vtiger_contactscf:array{0:'contactid',1:'vtiger_contactdetails',2:'contactid'}},popup_fields:array{0:'lastname'}}|array{IsCustomModule:false,table_name:'vtiger_faq',table_index:'id'}|array{IsCustomModule:false,table_name:'vtiger_leaddetails',table_index:'leadid',related_tables:array{vtiger_leadsubdetails:array{0:'leadsubscriptionid',1:'vtiger_leaddetails',2:'leadid'},vtiger_leadaddress:array{0:'leadaddressid',1:'vtiger_leaddetails',2:'leadid'},vtiger_leadscf:array{0:'leadid',1:'vtiger_leaddetails',2:'leadid'}},popup_fields:array{0:'company'}}|array{IsCustomModule:false,table_name:'vtiger_notes',table_index:'notesid'}|array{IsCustomModule:false,table_name:'vtiger_pricebook',table_index:'pricebookid'}|array{IsCustomModule:false,table_name:'vtiger_products',table_index:'productid',popup_fields:array{0:'productname'}}|array{IsCustomModule:false,table_name:'vtiger_project',table_index:'projectid',related_tables:array{vtiger_projectcf:array{0:'projectid',1:'vtiger_project',2:'projectid'}}}|array{IsCustomModule:false,table_name:'vtiger_projectmilestone',table_index:'projectmilestoneid',related_tables:array{vtiger_projectmilestonecf:array{0:'projectmilestoneid',1:'vtiger_projectmilestone',2:'projectmilestoneid'}}}|array{IsCustomModule:false,table_name:'vtiger_projecttask',table_index:'projecttaskid',related_tables:array{vtiger_projecttaskcf:array{0:'projecttaskid',1:'vtiger_projecttask',2:'projecttaskid'}}}|array{IsCustomModule:false,table_name:'vtiger_service',table_index:'serviceid',related_tables:array{vtiger_servicecf:array{0:'serviceid'}}}|array{IsCustomModule:false,table_name:'vtiger_servicecontracts',table_index:'servicecontractsid',related_tables:array{vtiger_servicecontractscf:array{0:'servicecontractsid'}}}|array{IsCustomModule:false,table_name:'vtiger_troubletickets',table_index:'ticketid',related_tables:array{vtiger_ticketcf:array{0:'ticketid'}},popup_fields:array{0:'ticket_title'}}|array{IsCustomModule:false,table_name:'vtiger_vendor',table_index:'vendorid',popup_fields:array{0:'vendorname'}},
found an array index of type array,
but expected the index to be of type string
Open
return $mod_var_mapping[$module][$varname] ?? [];
- Exclude checks
Reference to undeclared property \CRMEntity->table_name
Open
$focus->$check = static::__vtlibGetModulevarValue($module, $check);
- Exclude checks
Define a constant instead of duplicating this literal "contactid" 6 times. Open
'table_index' => 'contactid',
- 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 "projectmilestoneid" 3 times. Open
'table_index' => 'projectmilestoneid',
- 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 "related_tables" 11 times. Open
$checkfor = ['table_name', 'table_index', 'related_tables', 'popup_fields', 'IsCustomModule'];
- 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 "vtiger_leaddetails" 4 times. Open
'table_name' => 'vtiger_leaddetails',
- 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 "accountid" 4 times. Open
'table_index' => 'accountid',
- 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 "popup_fields" 8 times. Open
$checkfor = ['table_name', 'table_index', 'related_tables', 'popup_fields', 'IsCustomModule'];
- 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 "table_name" 17 times. Open
$checkfor = ['table_name', 'table_index', 'related_tables', 'popup_fields', 'IsCustomModule'];
- 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 "leadid" 5 times. Open
'table_index' => 'leadid',
- 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 "IsCustomModule" 17 times. Open
$checkfor = ['table_name', 'table_index', 'related_tables', 'popup_fields', 'IsCustomModule'];
- 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 "projectid" 3 times. Open
'table_index' => 'projectid',
- 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 "vtiger_account" 4 times. Open
'table_name' => 'vtiger_account',
- 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 "projecttaskid" 3 times. Open
'table_index' => 'projecttaskid',
- 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 "table_index" 17 times. Open
$checkfor = ['table_name', 'table_index', 'related_tables', 'popup_fields', 'IsCustomModule'];
- 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 "vtiger_contactdetails" 5 times. Open
'table_name' => 'vtiger_contactdetails',
- 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.
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class VtlibUtils
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param $focus
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// NOTE: If base_tablename and base_tablename_column are not specified, it will default to modules (table_name, related_tablename_column)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Contacts' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_contactsubdetails' => ['contactsubscriptionid', 'vtiger_contactdetails', 'contactid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function __vtlibGetModulevarValue($module, $varname)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'related_tables' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $module
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Here base_tablename_column should establish relation with related_tablename_column
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'popup_fields' => ['accountname'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => 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
// related_tables variable should define the association (relation) between dependent tables
- 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
'table_index' => 'contactid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function vtlibSetupModulevars($module, $focus)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$checkfor = ['table_name', 'table_index', 'related_tables', 'popup_fields', 'IsCustomModule'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $module
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => 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
*
- 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
'Accounts' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_contactdetails',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_customerdetails' => ['customerid', 'vtiger_contactdetails', 'contactid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_contactscf' => ['contactid', 'vtiger_contactdetails', 'contactid'],
- 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
'vtiger_contactaddress' => ['contactaddressid', 'vtiger_contactdetails', 'contactid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'popup_fields' => ['productname'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'pricebookid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'vendorid',
- 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
'ProjectTask' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $mod_var_mapping[$module][$varname] ?? [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'related_tables' => [
- 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
'Products' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_project',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_projectmilestone',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'projectmilestoneid',
- 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
'related_tables' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_products',
- 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
'popup_fields' => ['vendorname'],
- 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
'vtiger_assetscf' => ['assetsid'],
- 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
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'projecttaskid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_leadsubdetails' => ['leadsubscriptionid', 'vtiger_leaddetails', 'leadid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'ticketid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Project' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Setup mandatory (requried) module variable values in the module class.
- 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
'table_name' => 'vtiger_account',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'accountid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_accountscf' => ['accountid', 'vtiger_account', 'accountid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//REVIEW: Added these tables for displaying the data into relatedlist (based on configurable 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
'table_name' => 'vtiger_campaign',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Faq' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'id',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => 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
'vtiger_projectmilestonecf' => ['projectmilestoneid', 'vtiger_projectmilestone', 'projectmilestoneid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_projecttask',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'related_tables' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_servicecontractscf' => ['servicecontractsid'],
- 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
'related_tables' => ['vtiger_ticketcf' => ['ticketid']],
- 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
'ProjectMilestone' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_projecttaskcf' => ['projecttaskid', 'vtiger_projecttask', 'projecttaskid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_leadaddress' => ['leadaddressid', 'vtiger_leaddetails', 'leadid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'popup_fields' => ['ticket_title'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'productid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Services' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_servicecf' => ['serviceid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Assets' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'notesid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_pricebook',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_projectcf' => ['projectid', 'vtiger_project', 'projectid'],
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
'vtiger_projectmilestonecf' => ['projectmilestoneid', 'vtiger_projectmilestone', 'projectmilestoneid'],
- 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
'table_name' => 'vtiger_service',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'ServiceContracts' => [
- 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 array $varname
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mod_var_mapping = [
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
// FORMAT: related_tablename => Array ( related_tablename_column[, base_tablename, base_tablename_column] )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_accountaddress' => ['accountaddressid', 'vtiger_account', 'accountid'],
- 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
'table_name' => 'vtiger_vendor',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!isset($focus->$check)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$focus->$check = static::__vtlibGetModulevarValue($module, $check);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'related_tables' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_account' => ['parentid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'popup_fields' => ['lastname'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Leads' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_leaddetails',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'leadid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'Campaigns' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'popup_fields' => ['campaignname'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'HelpDesk' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_troubletickets',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'PriceBooks' => [
- 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
'related_tables' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'assetsid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vtiger_leadscf' => ['leadid', 'vtiger_leaddetails', 'leadid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'serviceid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'related_tables' => [
- 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
'table_index' => 'campaignid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_notes',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'projectid',
- 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
'related_tables' => [
- 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
* The function gets the value of the module.
- 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
'Documents' => [
- 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
'IsCustomModule' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_servicecontracts',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_index' => 'servicecontractsid',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_assets',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($checkfor as $check) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// FORMAT: related_tablename => Array ( related_tablename_column[, base_tablename, base_tablename_column] )
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
// NOTE: If base_tablename and base_tablename_column are not specified, it will default to modules (table_name, related_tablename_column)
- 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
'popup_fields' => ['company'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'table_name' => 'vtiger_faq',
- 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
'Vendors' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'related_tables' => [
- 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
'IsCustomModule' => false,
- Exclude checks
The variable $mod_var_mapping is not named in camelCase. Open
public static function __vtlibGetModulevarValue($module, $varname)
{
$mod_var_mapping = [
'Accounts' => [
'IsCustomModule' => false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_var_mapping is not named in camelCase. Open
public static function __vtlibGetModulevarValue($module, $varname)
{
$mod_var_mapping = [
'Accounts' => [
'IsCustomModule' => false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method __vtlibGetModulevarValue is not named in camelCase. Open
public static function __vtlibGetModulevarValue($module, $varname)
{
$mod_var_mapping = [
'Accounts' => [
'IsCustomModule' => false,
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}