XoopsModules25x/xoopspoll

View on GitHub

Showing 2,846 of 2,846 total issues

The property $post_time is not named in camelCase.
Open

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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 $id. Configured minimum length is 3.
Open

    public function get($id = null, $fields = null)

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

    public function deleteAttachment($attach_array = null)
    {
        /** @var Xoopspoll\Helper $helper */
        $helper = Xoopspoll\Helper::getInstance();

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

    public function setAttachment($name_saved = '', $name_display = '', $mimetype = '', $num_download = 0)
    {
        static $counter = 0;
        $this->attachment_array = $this->getAttachment();
        if ($name_saved) {

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

    public function checkTimelimit($action_tag = 'edit_timelimit')
    {
        require_once XOOPS_ROOT_PATH . '/modules/newbb/include/functions.config.php';
        $newbb_config = newbb_loadConfig();
        if (empty($newbb_config['edit_timelimit'])) {

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

    public function &getByLimit($topic_id, $limit, $approved = 1)
    {
        $sql    = 'SELECT p.*, t.*, tp.topic_status FROM '
                  . $this->db->prefix('bb_posts')
                  . ' p LEFT JOIN '

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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 $db. Configured minimum length is 3.
Open

    public function __construct(\XoopsDatabase $db = null)

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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

    public function incrementDownload($attach_key)
    {
        if (!$attach_key) {
            return false;
        }

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

class Post extends \XoopsObject
{
    private $post_id;
    private $topic_id;
    private $forum_id;

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 $db. Configured minimum length is 3.
Open

    public function __construct(\XoopsDatabase $db = null)

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)

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