getIP accesses the super-global variable $_SERVER. Open
public static function getIP()
{
return issetor($_SERVER['REMOTE_ADDR']);
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
getUserAgent accesses the super-global variable $_SERVER. Open
public static function getUserAgent()
{
return issetor($_SERVER['HTTP_USER_AGENT']);
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
getRequest accesses the super-global variable $_SERVER. Open
public static function getRequest()
{
return issetor($_SERVER['REQUEST_URI']);
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
getReferer accesses the super-global variable $_SERVER. Open
public static function getReferer()
{
return issetor($_SERVER['HTTP_REFERER']);
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method _
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$message,
$channel = self::CHANNEL_INFO,
$level = self::LEVEL_INFORMATIONAL,
$description = '',
$code = '',
Avoid using short method names like Ajde_Log_Writer_Abstract::_(). The configured minimum method name length is 3. Open
abstract public static function _(
$message,
$channel = self::CHANNEL_INFO,
$level = self::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_Abstract is not named in CamelCase. Open
abstract class Ajde_Log_Writer_Abstract
{
abstract public static function _(
$message,
$channel = self::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
abstract public static function _(
$message,
$channel = self::CHANNEL_INFO,
$level = self::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() {
}
}