Error Identifiers: method.*

Menu

← Back to all error identifiers

There are 43 error identifiers in the method.* group:

  • Non-abstract class contains or inherits an unimplemented abstract method.

  • Abstract 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.

  • Called method is marked as @deprecated.

  • Called method belongs to a class marked as @deprecated.

  • Called method belongs to an enum marked as @deprecated.

  • Called method belongs to an interface marked as @deprecated.

  • Called method belongs to a deprecated trait.

  • Method 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.

  • Non-abstract method in a non-abstract class has no body.

  • Method is called on a non-object type.

  • Non-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.

  • Overriding 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.

  • Return 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.

  • Static 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 an unresolvable type after template substitution.

  • Private method is declared but never called.

  • Variance annotation on a method-level template type is not allowed.

  • Overriding method has more restrictive visibility than the parent method.

  • Return value of a void method is being used.