XoopsModules25x/xfguestbook

View on GitHub

Showing 1,027 of 1,027 total issues

The parameter $user_id is not named in camelCase.
Open

function xfguestbook_search($queryarray, $andor, $limit, $offset, $user_id)
{
    global $xoopsDB;
    $sql = 'SELECT msg_id,user_id,title,post_time FROM ' . $xoopsDB->prefix('xfguestbook_msg') . ' WHERE moderate=0 ';
    if (0 != $user_id) {
Severity: Minor
Found in include/search.inc.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 class/Form/FormSelectCountry.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 $db. Configured minimum length is 3.
Open

    public function __construct(\XoopsDatabase $db = null)
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 $id. Configured minimum length is 3.
Open

    public function get($id = null, $fields = null)
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 $db. Configured minimum length is 3.
Open

        $db     = \XoopsDatabaseFactory::getDatabaseConnection();
Severity: Minor
Found in class/Helper.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 $msg_id is not named in camelCase.
Open

function approve($msg_id)
{
    global $msgHandler;

    $msg = $msgHandler->get($msg_id);
Severity: Minor
Found in index.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 $msg_id is not named in camelCase.
Open

function delete($msg_id)
{
    global $msgHandler, $xoopsModule;
    $ok = Request::getInt('ok', 0, 'POST');
    if (1 == $ok) {
Severity: Minor
Found in index.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 $id_as_key is not named in camelCase.
Open

    public function &getObjects(\CriteriaElement $criteria = null, $id_as_key = false, $as_object = true)//getObjects(\CriteriaElement $criteria = null)
    {
        $ret   = [];
        $limit = $start = 0;
        $sql   = 'SELECT * FROM ' . $this->db->prefix('xfguestbook_msg');
Severity: Minor
Found in class/MessageHandler.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 $dir_path is not named in camelCase.
Open

    public static function clear_tmp_files($dir_path, $prefix = 'tmp_')
    {
        if (!($dir = @\opendir($dir_path))) {
            return 0;
        }
Severity: Minor
Found in class/Utility.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 $as_object is not named in camelCase.
Open

    public function &getObjects(\CriteriaElement $criteria = null, $id_as_key = false, $as_object = true)//getObjects(\CriteriaElement $criteria = null)
    {
        $ret   = [];
        $limit = $start = 0;
        $sql   = 'SELECT * FROM ' . $this->db->prefix('xfguestbook_msg');
Severity: Minor
Found in class/MessageHandler.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 $user_id is not named in camelCase.
Open

    public static function get_user_data($user_id)
    {
        global $xoopsUser;
        /** @var Helper $helper */
        $helper = Helper::getInstance();
Severity: Minor
Found in class/Utility.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 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

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 64 and the first side effect is on line 30.
Open

<?php
Severity: Minor
Found in contact.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 70 and the first side effect is on line 33.
Open

<?php
Severity: Minor
Found in admin/country_manager.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 35 and the first side effect is on line 27.
Open

<?php
Severity: Minor
Found in include/onupdate.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 99 and the first side effect is on line 26.
Open

<?php
Severity: Minor
Found in admin/index.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 52 and the first side effect is on line 30.
Open

<?php
Severity: Minor
Found in admin/ip_manager.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 58 and the first side effect is on line 26.
Open

<?php
Severity: Minor
Found in testdata/index.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 41 and the first side effect is on line 32.
Open

<?php
Severity: Minor
Found in admin/config.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 24 and the first side effect is on line 21.
Open

<?php
Severity: Minor
Found in language/english/common.php by phpcodesniffer
Severity
Category
Status
Source
Language