Menu
← Back to all error identifiers
Error Identifiers: method.*
There are 43 error identifiers in the method.* group:
-
method.abstract non-ignorableNon-abstract class contains or inherits an unimplemented abstract method.
-
method.abstractPrivate non-ignorableAbstract method cannot be private because subclasses cannot override it.
-
Type-checking method call is redundant because the type is already narrowed.
-
Calling an abstract method via parent:: which has no implementation.
-
Overriding method has a narrower parameter type than the parent method.
-
Overriding method has an incompatible return type with the parent method.
-
method.deprecated phpstan-deprecation-rulesCalled method is marked as @deprecated.
-
method.deprecatedClass phpstan-deprecation-rulesCalled method belongs to a class marked as @deprecated.
-
method.deprecatedEnum phpstan-deprecation-rulesCalled method belongs to an enum marked as @deprecated.
-
method.deprecatedInterface phpstan-deprecation-rulesCalled method belongs to an interface marked as @deprecated.
-
method.deprecatedTrait phpstan-deprecation-rulesCalled method belongs to a trait marked as @deprecated.
-
method.dynamicName phpstan-strict-rulesMethod is called using a variable name instead of a static identifier.
-
Private method is marked as final, which has no effect.
-
Type-checking method call always evaluates to false.
-
Called method is marked as @internal.
-
Called method belongs to a class marked as @internal.
-
Called method belongs to an enum marked as @internal.
-
Called method belongs to an interface marked as @internal.
-
Called method belongs to a trait marked as @internal.
-
Unnecessary (void) cast on a method that does not require its result to be used.
-
Overriding method is missing the #[Override] attribute.
-
Method is called with different letter casing than its declaration.
-
method.nonAbstract non-ignorableNon-abstract method in a non-abstract class has no body.
-
Method is called on a non-object type.
-
method.nonStatic non-ignorableNon-static method overrides a static method from a parent class.
-
Called method does not exist on the object type.
-
Method has the #[Override] attribute but does not override any parent method.
-
method.parentMethodFinal non-ignorableOverriding a method that is declared as final in the parent class.
-
Overriding a method that is marked as @final in PHPDoc.
-
Calling a private method from outside its declaring class.
-
Calling a protected method from outside the class hierarchy.
-
method.resultDiscarded non-ignorableReturn value of a #[NoDiscard] method is not used.
-
Call to a pure method on a separate line has no effect.
-
Method template type shadows a class-level template type with the same name.
-
method.static non-ignorableStatic method overrides a non-static method from a parent class.
-
Non-static method is called statically using the :: operator.
-
Template type declared on a method is not used in any of its parameters.
-
Return type is not covariant with the tentative return type of the parent method.
-
Return type of a method call contains a generic type that cannot be resolved.
-
Private method is declared but never called.
-
Variance annotation on a method-level template type is not allowed.
-
method.visibility non-ignorableOverriding method has more restrictive visibility than the parent method.
-
Return value of a void method is being used.