YetiForceCompany/YetiForceCRM

View on GitHub
include/utils/VtlibUtils.php

Summary

Maintainability
B
5 hrs
Test Coverage
A
100%

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,
Severity: Major
Found in include/utils/VtlibUtils.php - About 5 hrs to fix

    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,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpmd

    Reference to undeclared property \CRMEntity->table_name
    Open

                if (!isset($focus->$check)) {
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phan

    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);
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phan

    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] ?? [];
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phan

    Reference to undeclared property \CRMEntity->table_name
    Open

                    $focus->$check = static::__vtlibGetModulevarValue($module, $check);
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phan

    Define a constant instead of duplicating this literal "contactid" 6 times.
    Open

                    'table_index' => 'contactid',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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'];
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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'];
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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'];
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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'];
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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'];
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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',
    Severity: Critical
    Found in include/utils/VtlibUtils.php by sonar-php

    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
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param  $focus
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    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)
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Contacts' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_contactsubdetails' => ['contactsubscriptionid', 'vtiger_contactdetails', 'contactid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return array
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function __vtlibGetModulevarValue($module, $varname)
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param string $module
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    // Here base_tablename_column should establish relation with related_tablename_column
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'popup_fields' => ['accountname'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    // related_tables variable should define the association (relation) between dependent tables
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'contactid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function vtlibSetupModulevars($module, $focus)
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $checkfor = ['table_name', 'table_index', 'related_tables', 'popup_fields', 'IsCustomModule'];
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param string $module
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Accounts' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_contactdetails',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_customerdetails' => ['customerid', 'vtiger_contactdetails', 'contactid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_contactscf' => ['contactid', 'vtiger_contactdetails', 'contactid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_contactaddress' => ['contactaddressid', 'vtiger_contactdetails', 'contactid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'popup_fields' => ['productname'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'pricebookid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'vendorid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'ProjectTask' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $mod_var_mapping[$module][$varname] ?? [];
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Products' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_project',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_projectmilestone',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'projectmilestoneid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_products',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'popup_fields' => ['vendorname'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_assetscf' => ['assetsid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'projecttaskid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_leadsubdetails' => ['leadsubscriptionid', 'vtiger_leaddetails', 'leadid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'ticketid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Project' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Setup mandatory (requried) module variable values in the module class.
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_account',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'accountid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_accountscf' => ['accountid', 'vtiger_account', 'accountid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    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)
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_campaign',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Faq' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'id',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_projectmilestonecf' => ['projectmilestoneid', 'vtiger_projectmilestone', 'projectmilestoneid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_projecttask',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_servicecontractscf' => ['servicecontractsid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => ['vtiger_ticketcf' => ['ticketid']],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'ProjectMilestone' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_projecttaskcf' => ['projecttaskid', 'vtiger_projecttask', 'projecttaskid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_leadaddress' => ['leadaddressid', 'vtiger_leaddetails', 'leadid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'popup_fields' => ['ticket_title'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'productid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Services' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_servicecf' => ['serviceid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Assets' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'notesid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_pricebook',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_projectcf' => ['projectid', 'vtiger_project', 'projectid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Line exceeds 120 characters; contains 123 characters
    Open

                        'vtiger_projectmilestonecf' => ['projectmilestoneid', 'vtiger_projectmilestone', 'projectmilestoneid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_service',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'ServiceContracts' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            ];
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param array  $varname
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $mod_var_mapping = [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Line exceeds 120 characters; contains 123 characters
    Open

                    // FORMAT: related_tablename => Array ( related_tablename_column[, base_tablename, base_tablename_column] )
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_accountaddress' => ['accountaddressid', 'vtiger_account', 'accountid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_vendor',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (!isset($focus->$check)) {
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $focus->$check = static::__vtlibGetModulevarValue($module, $check);
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_account' => ['parentid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'popup_fields' => ['lastname'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Leads' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_leaddetails',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'leadid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Campaigns' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'popup_fields' => ['campaignname'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'HelpDesk' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_troubletickets',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'PriceBooks' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'assetsid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'vtiger_leadscf' => ['leadid', 'vtiger_leaddetails', 'leadid'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'serviceid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'campaignid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_notes',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'projectid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * The function gets the value of the module.
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Documents' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_servicecontracts',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_index' => 'servicecontractsid',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_assets',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach ($checkfor as $check) {
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    // FORMAT: related_tablename => Array ( related_tablename_column[, base_tablename, base_tablename_column] )
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    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)
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'popup_fields' => ['company'],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'table_name' => 'vtiger_faq',
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'Vendors' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'related_tables' => [
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ],
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpcodesniffer

    The variable $mod_var_mapping is not named in camelCase.
    Open

        public static function __vtlibGetModulevarValue($module, $varname)
        {
            $mod_var_mapping = [
                'Accounts' => [
                    'IsCustomModule' => false,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpmd

    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,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpmd

    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,
    Severity: Minor
    Found in include/utils/VtlibUtils.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status