YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/Webservice.php

Summary

Maintainability
A
0 mins
Test Coverage
F
50%

Avoid using static access to class '\App\Log' in method 'initialize'.
Open

            \App\Log::trace('Initializing webservices support ...DONE', __METHOD__);
Severity: Minor
Found in vtlib/Vtiger/Webservice.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

Call to method trace from undeclared class \App\Log
Open

            \App\Log::trace('Initializing webservices support ...DONE', __METHOD__);
Severity: Critical
Found in vtlib/Vtiger/Webservice.php by phan

Call to undeclared function \vtws_addDefaultModuleTypeEntity()
Open

            vtws_addDefaultModuleTypeEntity($moduleInstance->name);
Severity: Critical
Found in vtlib/Vtiger/Webservice.php by phan

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

     *
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

    /**
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

    {
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

     * Initialize webservice for the given module.
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

     * @param \vtlib\ModuleBasic $moduleInstance
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

     */
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

        if ($moduleInstance->isentitytype && \function_exists('vtws_addDefaultModuleTypeEntity')) {
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

            vtws_addDefaultModuleTypeEntity($moduleInstance->name);
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

            \App\Log::trace('Initializing webservices support ...DONE', __METHOD__);
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

        }
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

    }
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

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

    public static function initialize(ModuleBasic $moduleInstance)
Severity: Minor
Found in vtlib/Vtiger/Webservice.php by phpcodesniffer

There are no issues that match your filters.

Category
Status