ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

The class protector_precommon_bwlimit_errorlog is not named in CamelCase.
Open

class protector_precommon_bwlimit_errorlog extends ProtectorFilterAbstract {

    function execute() {
        header('HTTP/1.0 503 Service unavailable');
        header('Retry-After: 600');

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The property $_done_intval is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Avoid variables with short names like $fp. Configured minimum length is 3.
Open

        $fp = @fopen($this->get_filepath4bwlimit(), 'w');

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $with_info is not named in camelCase.
Open

    function get_group1_ips($with_info = false) {
        list($group1_ips_serialized) = @file(self::get_filepath4group1ips());
        $group1_ips = empty($group1_ips_serialized) ? array() : @unserialize($group1_ips_serialized);
        if (!is_array($group1_ips)) $group1_ips = array();

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The property $_should_be_banned is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $_safe_badext is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $redirect_to_top is not named in camelCase.
Open

    function purge($redirect_to_top = false) {
        // clear all session values
        if (isset($_SESSION)) foreach ($_SESSION as $key => $val) {
            $_SESSION[$key] = '';
            if (isset($GLOBALS[$key])) $GLOBALS[$key] = '';

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $unique_check is not named in camelCase.
Open

    function output_log($type = 'UNKNOWN', $uid = 0, $unique_check = false, $level = 1) {
        if ($this->_logged) return true;

        if (!($this->_conf['log_level'] & $level)) return true;

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $jailed_time is not named in camelCase.
Open

    function register_bad_ips($jailed_time = 0, $ip = null) {
        if (empty($ip)) $ip = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);
        if (empty($ip)) return false;

        $bad_ips = $this->get_bad_ips(true);

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $dying_message is not named in camelCase.
Open

    function call_filter($type, $dying_message = '') {
        require_once __DIR__ . '/ProtectorFilter.php';
        $filter_handler = &ProtectorFilterHandler::getInstance();
        $ret = $filter_handler->execute($type);
        if ($ret == false && $dying_message) {

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The class protector_postcommon_post_deny_by_httpbl is not named in CamelCase.
Open

class protector_postcommon_post_deny_by_httpbl extends ProtectorFilterAbstract {

    function execute() {
        // http:bl servers (don't enable too many servers)
        $rbls = array (

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The class protector_postcommon_register_insert_js_check is not named in CamelCase.
Open

class protector_postcommon_register_insert_js_check extends ProtectorFilterAbstract {

    function execute() {
        ob_start(array (
            $this,

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

Avoid variables with short names like $fw. Configured minimum length is 3.
Open

            $fw = fopen($backup_htaccess, "w");

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $force_override is not named in camelCase.
Open

    function dblayertrap_init($force_override = false) {
        if (!empty($GLOBALS['xoopsOption']['nocommon']) || defined('_LEGACY_PREVENT_EXEC_COMMON_') || defined('_LEGACY_PREVENT_LOAD_CORE_')) return; // skip

        $this->_dblayertrap_doubtfuls = array();
        $this->_dblayertrap_check_recursive($_GET);

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The class protector_postcommon_post_htmlpurify4guest is not named in CamelCase.
Open

class protector_postcommon_post_htmlpurify4guest extends ProtectorFilterAbstract {
    var $purifier;
    var $method;

    function execute() {

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The parameter $db_name is not named in camelCase.
Open

function select_db($db_name, $link) {
    //if ($link instanceof PDO) {
        try {
            $link->exec("use `" . $db_name . '`;');
            return true;
Severity: Minor
Found in htdocs/install/page_dbsettings.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The class protector_precommon_badip_redirection is not named in CamelCase.
Open

class protector_precommon_badip_redirection extends ProtectorFilterAbstract {

    function execute() {
        header('Location: ' . PROTECTOR_BADIP_REDIRECTION_URI);
        exit();

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The class protector_precommon_bwlimit_message is not named in CamelCase.
Open

class protector_precommon_bwlimit_message extends ProtectorFilterAbstract {

    function execute() {
        header('HTTP/1.0 503 Service unavailable');
        header('Retry-After: 600');

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The property $_virtual_config is not named in camelCase.
Open

class SystemAutotasksHandler extends icms_ipf_Handler {

    private $_use_virtual_config = FALSE;
    private $_virtual_config = array();

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $module_obj is not named in camelCase.
Open

    function protector_message_append_oninstall(&$module_obj, &$log) {
        if (is_array(@$GLOBALS['ret'])) {
            foreach ($GLOBALS['ret'] as $message) {
                $log->add(strip_tags($message));
            }

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Severity
Category
Status
Source
Language