ampache/ampache

View on GitHub
src/Repository/Model/Personal_Video.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$gtypes'.
Open

    public static function insert(array $data, ?array $gtypes = array(), ?array $options = array()): int

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 '$options'.
Open

    public static function insert(array $data, ?array $gtypes = array(), ?array $options = array()): int

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

syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST)
Open

    public ?string $location;
Severity: Critical
Found in src/Repository/Model/Personal_Video.php by phan

The parameter $object_id is not named in camelCase.
Open

    public function __construct($object_id = 0)
    {
        if (!$object_id) {
            return;
        }

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 Personal_Video is not named in CamelCase.
Open

class Personal_Video extends Video
{
    protected const DB_TABLENAME = 'personal_video';

    public ?string $location;

CamelCaseClassName

Since: 0.2

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

Example

class class_name {
}

Source

Class name "Personal_Video" is not in camel caps format
Open

class Personal_Video extends Video

There are no issues that match your filters.

Category
Status