src/Plugin.php
Method loadProcessing
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function loadProcessing(GenericEvent $event)
{
/**
* @var \ServiceHandler $service
*/
Missing class import via use statement (line '161', column '27'). Open
Open
$smarty = new \TFSmarty();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '105', column '22'). Open
Open
(new \MyAdmin\Mail())->adminMail($subject, $email, false, 'admin/qs_reactivated.tpl');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '101', column '31'). Open
Open
$smarty = new \TFSmarty();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid unused local variables such as '$server_info'. Open
Open
$server_info = $serviceInfo['server_info'];
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$class'. Open
Open
$class = '\\MyAdmin\\Orm\\'.get_orm_class_from_table($settings['TABLE']);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The variable $server_info is not named in camelCase. Open
Open
public static function getQueue(GenericEvent $event)
{
//if (in_array($event['type'], [get_service_define('KVM_LINUX'), get_service_define('KVM_WINDOWS'), get_service_define('CLOUD_KVM_LINUX'), get_service_define('CLOUD_KVM_WINDOWS')])) {
$settings = get_module_settings(self::$module);
$serviceInfo = $event->getSubject();
- 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();
}
}