vtlib/Vtiger/Webservice.php
Avoid using static access to class '\App\Log' in method 'initialize'. Open
Open
\App\Log::trace('Initializing webservices support ...DONE', __METHOD__);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Call to method trace
from undeclared class \App\Log
Open
Open
\App\Log::trace('Initializing webservices support ...DONE', __METHOD__);
- Exclude checks
Call to undeclared function \vtws_addDefaultModuleTypeEntity()
Open
Open
vtws_addDefaultModuleTypeEntity($moduleInstance->name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Initialize webservice for the given module.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param \vtlib\ModuleBasic $moduleInstance
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ($moduleInstance->isentitytype && \function_exists('vtws_addDefaultModuleTypeEntity')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
vtws_addDefaultModuleTypeEntity($moduleInstance->name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
\App\Log::trace('Initializing webservices support ...DONE', __METHOD__);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function initialize(ModuleBasic $moduleInstance)
- Exclude checks