jidaikobo-shibata/a11yc

View on GitHub
classes/Validate/Check/CssTotal.php

Summary

Maintainability
A
1 hr
Test Coverage

Method check has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function check($url)
    {
        $error_names = array(
            'css_suspicious_paren_num',
            'css_suspicious_props',
Severity: Minor
Found in classes/Validate/Check/CssTotal.php - About 1 hr to fix

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

            if (static::$logs[$url]['css_suspicious_prop_and_vals'][self::$unspec] != -1)
    Severity: Minor
    Found in classes/Validate/Check/CssTotal.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 '::$logs' which will lead to PHP notices.
    Open

            if (static::$logs[$url][$error_name][self::$unspec] != -1)
    Severity: Minor
    Found in classes/Validate/Check/CssTotal.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