Logging user-provided values directly can put application vulnerable to multiple attack vectors. Superglobal variables contains values specified by the user, which are considered as tainted and untrusted. Therefore, it is discouraged to pass these variables directly to the logger.
use
PHP-W1039One or more variables mentioned in the closure's use
clause are unused.
It is recommended to remove them from the use
clause.
Documentation comments are helpful in understanding what that part of the code is responsible for. It is always a good idea to add documentation to your code to improve the code readability and maintainability. In addition to that, it becomes helpful when you revisit the code after a long time. Here, the class is missing the doc comment and it is recommended to add it for the reasons discussed above.
Documentation comments are helpful in understanding what that part of the code is responsible for. It is always a good idea to add documentation to your code to improve the code readability and maintainability. In addition to that, it becomes helpful when you revisit the code after a long time. Here, the function/class method is missing the doc comment and it is recommended to add it for the reasons discussed above.
The class has been incorrectly instantiated, which would cause a runtime error.
FIXME
/XXX
/TODO
encountered PHP-W1073You have marked this block as FIXME
/TODO
/XXX
. Please make sure this is addressed, or remove this comment as this could be misleading.
eval()
function found PHP-A1000eval()
function allows execution of an arbitrary PHP code. Executing code dynamically is security-sensitive and should be avoided.
The assignment is not valid and would raise an error during the runtime.
Syntax error found in this file. Please refer to the error message for more information.
implements
keyword PHP-W1008A class can only be able to implement an interface using implements
keyword.
Trying to use implements
keyword to reference anything other than an interface, can result in fatal error.
As per PSR-1, class constants must be declared in all upper cases with underscore separators only.
It is recommended to follow PSR standards while developing PHP applications so the code is consistent and can be easily maintained.
This issue is raised when increment/decrement operators are used on any other type of variable than numbers or strings.
throw
expression used in PHP < 8.0 PHP-W1017throw
expression is allowed only in PHP >= 8.0.
Trying to use it in earlier PHP versions will give you an error.
This issue is raised when the number of parameters passed to sprintf
/ sscanf
/ fscanf
doesn't match the number of placeholders.
It is recommended to make sure the number of placeholders and parameters are the same.
The constructor signature contains one or more unused parameters. Since these are nowhere used in the class, it can be safely removed.
isset
PHP-W1040isset
is either used with an undefined variable or a variable that is known to be defined and non-null.
A function has been called, but not defined. This will result in a run time fatal error.
The Exception class you are trying to use seems to be invalid. This will result in a run time fatal error.
The method you are trying to call is not defined, which can result in a fatal error.
Invalid call to a static method. This would lead to a run time error.