XoopsModules25x/xfguestbook

View on GitHub

Showing 1,027 of 1,027 total issues

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

    $i        = 0;
Severity: Minor
Found in admin/config.php by phpmd

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 $country_code is not named in camelCase.
Open

function flagDel($country_code)
{
    global $xoopsModule;
    /** @var Helper $helper */
    $helper = Helper::getInstance();
Severity: Minor
Found in admin/country_manager.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

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

    $ok = Request::getInt('ok', 0, 'POST');
Severity: Minor
Found in admin/country_manager.php by phpmd

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 $country_code is not named in camelCase.
Open

function flagUpload($country_code)
{
    global $xoopsModule, $maxsize, $maxwidth, $maxheight, $format;
    /** @var Helper $helper */
    $helper = Helper::getInstance();
Severity: Minor
Found in admin/country_manager.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 parameter $country_code is not named in camelCase.
Open

function flagForm($country_code)
{
    global $xoopsModule, $maxsize, $maxwidth, $maxheight, $format;
    /** @var Helper $helper */
    $helper = Helper::getInstance();
Severity: Minor
Found in admin/country_manager.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

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

    $ok = Request::getInt('ok', 0, 'POST');
Severity: Minor
Found in admin/country_manager.php by phpmd

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 $sql_file_path is not named in camelCase.
Open

function executeSQL($sql_file_path)
{
    global $xoopsModule;
    $error = false;
    // $reservedTables = array('avatar', 'avatar_users_link', 'block_module_link', 'xoopscomments', 'config', 'configcategory', 'configoption', 'image', 'imagebody', 'imagecategory', 'imgset', 'imgset_tplset_link', 'imgsetimg', 'groups','groups_users_link','group_permission', 'online', 'bannerclient', 'banner', 'bannerfinish', 'ranks', 'session', 'smiles', 'users', 'newblocks', 'modules', 'tplfile', 'tplset', 'tplsource', 'xoopsnotifications', 'banner', 'bannerclient', 'bannerfinish');
Severity: Minor
Found in include/cp_functions.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 parameter $country_id is not named in camelCase.
Open

function countrySave($country_id, $country_code, $country_name)
{
    global $xoopsDB;

    $myts = \MyTextSanitizer::getInstance();
Severity: Minor
Found in admin/country_manager.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 parameter $country_name is not named in camelCase.
Open

function countrySave($country_id, $country_code, $country_name)
{
    global $xoopsDB;

    $myts = \MyTextSanitizer::getInstance();
Severity: Minor
Found in admin/country_manager.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 parameter $ip_value is not named in camelCase.
Open

function badIpSave($ip_id, $ip_value)
{
    global $xoopsDB;

    $myts = \MyTextSanitizer::getInstance();
Severity: Minor
Found in admin/ip_manager.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

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

    $i        = 0;
Severity: Minor
Found in include/config.inc.php by phpmd

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 $ip_id is not named in camelCase.
Open

function badIpDel($ip_id)
{
    global $xoopsDB;
    $ip_count = (!empty($_POST['ip_id']) && is_array($_POST['ip_id'])) ? count($_POST['ip_id']) : 0;
    if ($ip_count > 0) {
Severity: Minor
Found in admin/ip_manager.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

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

            $ip[$i] = $msg->getVar('poster_ip');
Severity: Minor
Found in admin/main.php by phpmd

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 $country_code is not named in camelCase.
Open

function countrySave($country_id, $country_code, $country_name)
{
    global $xoopsDB;

    $myts = \MyTextSanitizer::getInstance();
Severity: Minor
Found in admin/country_manager.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

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

    $db = \XoopsDatabaseFactory::getDatabaseConnection();
Severity: Minor
Found in testdata/index.php by phpmd

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 $country_id is not named in camelCase.
Open

function countryDel($country_id)
{
    global $xoopsDB, $xoopsModule;
    /** @var Helper $helper */
    $helper = Helper::getInstance();
Severity: Minor
Found in admin/country_manager.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 parameter $ip_id is not named in camelCase.
Open

function badIpForm($ip_id = null)
{
    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    if ($ip_id) {
        $sform    = new \XoopsThemeForm(AM_XFGUESTBOOK_MOD_BADIP, 'op', xoops_getenv('SCRIPT_NAME'), 'post', true);
Severity: Minor
Found in admin/ip_manager.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 parameter $ip_id is not named in camelCase.
Open

function badIpSave($ip_id, $ip_value)
{
    global $xoopsDB;

    $myts = \MyTextSanitizer::getInstance();
Severity: Minor
Found in admin/ip_manager.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

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

    public $db;
Severity: Minor
Found in class/MessageHandler.php by phpmd

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

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

        $ts  = \MyTextSanitizer::getInstance();
Severity: Minor
Found in blocks/xfguestbook_new.php by phpmd

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

Severity
Category
Status
Source
Language