attogram/currency-exchange-rates

View on GitHub

Showing 13 of 13 total issues

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

            . 'API Update Frequency: ' . Config::$feeds[$feedCode]['freq'] . "\n\n"
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

            . '</pre>' . Config::$feeds[$feedCode]['about'] . "<pre>\n"
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

            . 'API Endpoint: <a href="' . Config::$feeds[$feedCode]['api'] . '">'
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

            . 'Website: <a href="'. Config::$feeds[$feedCode]['home'] . '">'
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

        $currency = Config::$feeds[$feedCode]['currency'];
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

            . Config::$feeds[$feedCode]['api'] . "</a>\n\n"
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

        $this->displayHeader('About The ' . Config::$feeds[$feedCode]['name']);
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

        print 'About The ' . Config::$feeds[$feedCode]['name'] . "\n"
Severity: Minor
Found in src/CurrencyExchangeRates.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 '$feeds' which will lead to PHP notices.
Open

            . Config::$feeds[$feedCode]['home'] . "</a>\n\n"
Severity: Minor
Found in src/CurrencyExchangeRates.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 variables with short names like $da. Configured minimum length is 3.
Open

                $da = explode('.', $date);
Severity: Minor
Found in src/Feeds/BankRussia.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 method Feed::__construct() calls the typical debug function print_r() which is mostly only used during development.
Open

            $this->verbose('<textarea rows="5" cols="100">' . print_r($this->lines, true) . '</textarea>');
Severity: Minor
Found in src/Feeds/Feed.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

Source https://phpmd.org/rules/design.html#developmentcodefragment

The method Feed::__construct() calls the typical debug function print_r() which is mostly only used during development.
Open

        $this->verbose('<textarea rows="10" cols="100">' . print_r($this->data, true) . '</textarea>');
Severity: Minor
Found in src/Feeds/Feed.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

Source https://phpmd.org/rules/design.html#developmentcodefragment

Possibly zero references to use statement for function preg_match (\preg_match)
Open

use function preg_match;
Severity: Minor
Found in src/Feeds/BankIsrael.php by phan
Severity
Category
Status
Source
Language