librenms/librenms

View on GitHub
LibreNMS/Alert/Template.php

Summary

Maintainability
A
0 mins
Test Coverage

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

            return Blade::render($data['template']->template, $alert);
Severity: Minor
Found in LibreNMS/Alert/Template.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 '$alert' which will lead to PHP notices.
Open

            return Blade::render($this->getDefaultTemplate($data['template']->name ?? '', $e->getMessage()), $alert);
Severity: Minor
Found in LibreNMS/Alert/Template.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 '$alert' which will lead to PHP notices.
Open

            return Blade::render($data['title'], $alert);
Severity: Minor
Found in LibreNMS/Alert/Template.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 '$alert' which will lead to PHP notices.
Open

        $alert['alert'] = new AlertData($data['alert']);
Severity: Minor
Found in LibreNMS/Alert/Template.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 '$alert' which will lead to PHP notices.
Open

            return $data['title'] ?: Blade::render('Template ' . $data['name'], $alert);
Severity: Minor
Found in LibreNMS/Alert/Template.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 '$alert' which will lead to PHP notices.
Open

        $alert['alert'] = new AlertData($data['alert']);
Severity: Minor
Found in LibreNMS/Alert/Template.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

There are no issues that match your filters.

Category
Status