XoopsModules25x/tag

View on GitHub
class/LinkHandler.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$field_object'.
Open

    public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
Severity: Minor
Found in class/LinkHandler.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$table_link'.
Open

    public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
Severity: Minor
Found in class/LinkHandler.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$field_link'.
Open

    public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
Severity: Minor
Found in class/LinkHandler.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

The parameter $field_link is not named in camelCase.
Open

    public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
    {
        return parent::cleanOrphan($this->db->prefix('tag_tag'), 'tag_id');
    }
Severity: Minor
Found in class/LinkHandler.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 $table_link is not named in camelCase.
Open

    public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
    {
        return parent::cleanOrphan($this->db->prefix('tag_tag'), 'tag_id');
    }
Severity: Minor
Found in class/LinkHandler.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 property $table_stats is not named in camelCase.
Open

class LinkHandler extends \XoopsPersistableObjectHandler
{
    public $table_stats;

    /**
Severity: Minor
Found in class/LinkHandler.php by phpmd

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)
Severity: Minor
Found in class/LinkHandler.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 $field_object is not named in camelCase.
Open

    public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
    {
        return parent::cleanOrphan($this->db->prefix('tag_tag'), 'tag_id');
    }
Severity: Minor
Found in class/LinkHandler.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

There are no issues that match your filters.

Category
Status