YetiForceCompany/YetiForceCRM

View on GitHub
modules/Assets/Assets.php

Summary

Maintainability
A
0 mins
Test Coverage
F
18%

The class Assets has 18 fields. Consider redesigning Assets to keep the number of fields under 15.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

Avoid using static access to class 'vtlib\Module' in method 'moduleHandler'.
Open

            $assetInstance = vtlib\Module::getInstance('Assets');
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

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\Module' in method 'moduleHandler'.
Open

            $productInstance = vtlib\Module::getInstance('Products');
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

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\Access' in method 'moduleHandler'.
Open

            vtlib\Access::setDefaultSharing($AssetsModule);
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

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\Module' in method 'moduleHandler'.
Open

            $accountInstance = vtlib\Module::getInstance('Accounts');
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

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\Module' in method 'moduleHandler'.
Open

            $AssetsModule = vtlib\Module::getInstance('Assets');
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

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 "assetname" 5 times.
Open

        'Asset Name' => 'assetname',
Severity: Critical
Found in modules/Assets/Assets.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_assetscf" 3 times.
Open

    public $customFieldTable = ['vtiger_assetscf', 'assetsid'];
Severity: Critical
Found in modules/Assets/Assets.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 "Assets" 3 times.
Open

            $AssetsModule = vtlib\Module::getInstance('Assets');
Severity: Critical
Found in modules/Assets/Assets.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 "account" 4 times.
Open

        'Customer Name' => 'account',
Severity: Critical
Found in modules/Assets/Assets.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_assets" 3 times.
Open

    public $table_name = 'vtiger_assets';
Severity: Critical
Found in modules/Assets/Assets.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 "product" 4 times.
Open

        'Product Name' => 'product',
Severity: Critical
Found in modules/Assets/Assets.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 "assetsid" 4 times.
Open

    public $table_index = 'assetsid';
Severity: Critical
Found in modules/Assets/Assets.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.

Call to undeclared method \App\Db::createCommand
Open

            \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['customized' => 0], ['name' => $moduleName])->execute();
Severity: Critical
Found in modules/Assets/Assets.php by phan

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class Assets extends CRMEntity
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

The property $search_fields_name is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $default_order_by is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $table_name is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $tab_name_index is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $special_functions is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $list_fields_name is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $column_fields is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $tab_name is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $mandatory_fields is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $def_basicsearch_col is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $default_sort_order is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $table_index is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $search_fields is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $popup_fields is not named in camelCase.
Open

class Assets extends CRMEntity
{
    public $table_name = 'vtiger_assets';
    public $table_index = 'assetsid';
    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

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

    /**
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'vtiger_assetscf' => 'assetsid', ];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            // Mark the module as Standard module
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            $productInstance->setRelatedlist($assetInstance, $assetLabel, ['ADD'], 'getDependentsList');
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $table_name = 'vtiger_assets';
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $default_sort_order = 'ASC';
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            //Showing Assets module in the related modules in the More Information Tab
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    protected $lockFields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     * Mandatory for Saving, Include tables related to this module.
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $search_fields_name = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $def_basicsearch_col = 'assetname';
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        if ('module.postinstall' === $eventType) {
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    /** Indicator if this is a custom module or standard module */
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Asset No' => 'asset_no',
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $table_index = 'assetsid';
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     */
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $column_fields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'vtiger_assets' => 'assetsid',
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    // For Popup listview and UI type support
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $default_order_by = '';
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     * Mandatory for Saving, Include tablename and tablekey columnname here.
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Customer Name' => ['account' => 'account'],
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $popup_fields = ['assetname', 'account', 'product'];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            $accountInstance->setRelatedlist($assetInstance, $assetLabel, ['ADD'], 'getDependentsList');
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'vtiger_crmentity' => 'crmid',
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Asset Name' => 'assetname',
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    // Used when enabling/disabling the mandatory fields for the module.
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $mandatory_fields = ['assetname', 'product', 'assigned_user_id'];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            //adds sharing accsess
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            $AssetsModule = vtlib\Module::getInstance('Assets');
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $IsCustomModule = true;
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $tab_name = ['vtiger_crmentity', 'vtiger_assets', 'vtiger_assetscf'];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Customer Name' => 'account',
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Asset Name' => ['assets' => 'assetname'],
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $relationFields = [];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    {
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     * Mandatory table for supporting custom fields.
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     */
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $tab_name_index = [
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        // Format: Field Label => fieldname
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Product Name' => 'product',
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        // tablename should not have prefix 'vtiger_'
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Product Name' => ['products' => 'product'],
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    /** {@inheritdoc} */
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['customized' => 0], ['name' => $moduleName])->execute();
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

Line exceeds 120 characters; contains 131 characters
Open

            \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['customized' => 0], ['name' => $moduleName])->execute();
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     */
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $list_fields_name = [
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        'Asset No' => ['assets' => 'asset_no'],
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    ];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     * @var string[] List of fields in the RelationListView
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    // For Alphabetical search
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    // Refers to vtiger_field.fieldname values.
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            $productInstance = vtlib\Module::getInstance('Products');
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $customFieldTable = ['vtiger_assetscf', 'assetsid'];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    // For Popup window record selection
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public function moduleHandler($moduleName, $eventType)
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            $assetInstance = vtlib\Module::getInstance('Assets');
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    ];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        // Format: Field Label => Array(tablename, columnname)
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $search_fields = [
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    /**
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    public $special_functions = ['set_import_assigned_user'];
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    /**
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    // Callback function list during Importing
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            vtlib\Access::setDefaultSharing($AssetsModule);
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    /**
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

     */
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            $assetLabel = 'Assets';
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

            $accountInstance = vtlib\Module::getInstance('Accounts');
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

        }
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

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

    }
Severity: Minor
Found in modules/Assets/Assets.php by phpcodesniffer

The variable $AssetsModule is not named in camelCase.
Open

    public function moduleHandler($moduleName, $eventType)
    {
        if ('module.postinstall' === $eventType) {
            // Mark the module as Standard module
            \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['customized' => 0], ['name' => $moduleName])->execute();
Severity: Minor
Found in modules/Assets/Assets.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 $AssetsModule is not named in camelCase.
Open

    public function moduleHandler($moduleName, $eventType)
    {
        if ('module.postinstall' === $eventType) {
            // Mark the module as Standard module
            \App\Db::getInstance()->createCommand()->update('vtiger_tab', ['customized' => 0], ['name' => $moduleName])->execute();
Severity: Minor
Found in modules/Assets/Assets.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

There are no issues that match your filters.

Category
Status