lib/Ajde/Log/Writer/Db.php
Method _
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$message,
$channel = Ajde_Log::CHANNEL_INFO,
$level = Ajde_Log::LEVEL_INFORMATIONAL,
$description = '',
$code = '',
Missing class import via use statement (line '18', column '20'). Open
Open
$log = new LogModel();
- 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 using short method names like Ajde_Log_Writer_Db::_(). The configured minimum method name length is 3. Open
Open
public static function _(
$message,
$channel = Ajde_Log::CHANNEL_INFO,
$level = Ajde_Log::LEVEL_INFORMATIONAL,
$description = '',
- Read upRead up
- Exclude checks
ShortMethodName
Since: 0.2
Detects when very short method names are used.
Example
class ShortMethod {
public function a( $index ) { // Violation
}
}
Source https://phpmd.org/rules/naming.html#shortmethodname
The class Ajde_Log_Writer_Db is not named in CamelCase. Open
Open
class Ajde_Log_Writer_Db extends Ajde_Log_Writer_Abstract
{
public static function _(
$message,
$channel = Ajde_Log::CHANNEL_INFO,
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The method _ is not named in camelCase. Open
Open
public static function _(
$message,
$channel = Ajde_Log::CHANNEL_INFO,
$level = Ajde_Log::LEVEL_INFORMATIONAL,
$description = '',
- 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() {
}
}