classes/Validate/Check/CssTotal.php
Method check
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function check($url)
{
$error_names = array(
'css_suspicious_paren_num',
'css_suspicious_props',
Avoid using undefined variables such as '::$logs' which will lead to PHP notices. Open
Open
if (static::$logs[$url]['css_suspicious_prop_and_vals'][self::$unspec] != -1)
- Read upRead up
- Exclude checks
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
Open
if (static::$logs[$url][$error_name][self::$unspec] != -1)
- Read upRead up
- Exclude checks
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;
}
}