Showing 4 of 4 total issues
Missing class import via use statement (line '91', 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
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('LXC')])) {
$serviceInfo = $event->getSubject();
$settings = get_module_settings(self::$module);
- 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();
}
}
Source
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('LXC')])) {
$serviceInfo = $event->getSubject();
$settings = get_module_settings(self::$module);
- 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();
}
}
Source
The method GetList is not named in camelCase. Open
Open
public static function GetList($name = '')
{
$exp = explode("\n", shell_exec('lxc list '.$name));
$res = [];
foreach ($exp as $k => $v) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}