This method's name is shorter than the configured minimum length of 3 characters.
Even though PHP does not care about the name of your methods, it is generally a
good practice to choose method names which can be easily understood by other human
readers.
Loading history...
12
{
13
if (php_sapi_name() === 'cli-server' || php_sapi_name() === "cli") {
Avoid variables with short names like $x. Configured minimum length is 3.
Short variable names may make your code harder to understand. Variable names should
be self-descriptive. This check looks for variable names who are shorter than
a configured minimum.
An exit expression should only be used in rare cases. For example, if you
write a short command line script.
In most cases however, using an exit expression makes the code untestable
and often causes incompatibilities with other libraries. Thus, unless you are
absolutely sure it is required here, we recommend to refactor your code to
avoid its usage.
Loading history...
19
}
20
21
/**
22
* Dump and die with var_export instead of var_dump
Avoid variables with short names like $x. Configured minimum length is 3.
Short variable names may make your code harder to understand. Variable names should
be self-descriptive. This check looks for variable names who are shorter than
a configured minimum.
An exit expression should only be used in rare cases. For example, if you
write a short command line script.
In most cases however, using an exit expression makes the code untestable
and often causes incompatibilities with other libraries. Thus, unless you are
absolutely sure it is required here, we recommend to refactor your code to
avoid its usage.
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.