PHP

PHP

Made by DeepSource
Invalid class instantiation PHP-W1012
Bug risk
Critical

The class has been incorrectly instantiated, which would cause a runtime error.

Invalid assignment PHP-W1032
Bug risk
Critical

The assignment is not valid and would raise an error during the runtime.

Syntax error PHP-E1111
Bug risk
Critical

Syntax error found in this file. Please refer to the error message for more information.

Invalid use of implements keyword PHP-W1008
Bug risk
Critical

A 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.

Invalid use of increment/decrement operators PHP-E1006
Bug risk
Major

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-W1017
Bug risk
Critical

throw expression is allowed only in PHP >= 8.0. Trying to use it in earlier PHP versions will give you an error.

Call with inconsistent number of parameters PHP-W1025
Bug risk
Critical

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.

Undefined function call detected PHP-E1000
Bug risk
Critical

A function has been called, but not defined. This will result in a run time fatal error.

Exception being raised is not from a valid exception class PHP-E1001
Bug risk
Critical

The Exception class you are trying to use seems to be invalid. This will result in a run time fatal error.

Method is called but not defined PHP-E1002
Bug risk
Critical

The method you are trying to call is not defined, which can result in a fatal error.

Invalid static method call detected PHP-E1003
Bug risk
Critical

Invalid call to a static method. This would lead to a run time error.

Missing return statement in method/function PHP-E1004
Bug risk
Critical

This issue is raised if a method with a return type does not have a return statement of an appropriate type.

Invalid use of class method overriding PHP-E1005
Bug risk
Critical

The method you are trying to override cannot be overridden in the child class. This would result in a runtime error which can break the execution flow.

Class used with instanceof is not of valid type PHP-E1009
Bug risk
Major

A class that you are trying to check against using instanceof keyword is not of valid class object type. This will result in fatal runtime error.

Invalid typehint detected in arrow function PHP-T1000
Bug risk
Critical

The issue is raised when an arrow function has an invalid parameter and/or return type hint. This can result in type errors at the runtime.

Invalid return typehint for function PHP-T1002
Bug risk
Critical

The return typehint provided for the function is either invalid or not present in the current namespace.

Class property provided with an invalid type PHP-T1004
Bug risk
Minor

The class property has an invalid type specified in the Docblock comment. This would lead to emitting wrong type-hint suggestions.

Array contains duplicate keys PHP-W1000
Bug risk
Major

This array contains one or more duplicate keys, which can result in unexpected output. Only the last value associated with the duplicated key will be present in the array.

Literal array with empty item(s) PHP-W1001
Bug risk
Critical
Autofix

This array contains one or more empty items, which will result in a fatal error.