mambax7/extgallery

View on GitHub
include/notification.inc.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$item' which will lead to PHP notices.
Open

    $item['url']  = XOOPS_URL . '/modules/extgallery/public-album.php?id=' . $photo->getVar('photo_id');
Severity: Minor
Found in include/notification.inc.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$item' which will lead to PHP notices.
Open

    $item['name'] = $photo->getVar('photo_desc');
Severity: Minor
Found in include/notification.inc.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$item' which will lead to PHP notices.
Open

    return $item;
Severity: Minor
Found in include/notification.inc.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid unused parameters such as '$category'.
Open

function extgalleryNotifyIteminfo($category, $item_id)
Severity: Minor
Found in include/notification.inc.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 $item_id is not named in camelCase.
Open

function extgalleryNotifyIteminfo($category, $item_id)
{
    /** @var Extgallery\PublicPhotoHandler $photoHandler */
    /** @var Extgallery\Photo $photo */

Severity: Minor
Found in include/notification.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

The variable $item_id is not named in camelCase.
Open

function extgalleryNotifyIteminfo($category, $item_id)
{
    /** @var Extgallery\PublicPhotoHandler $photoHandler */
    /** @var Extgallery\Photo $photo */

Severity: Minor
Found in include/notification.inc.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status