Error Identifiers: staticMethod.*

Menu

← Back to all error identifiers

There are 25 error identifiers in the staticMethod.* group:

  • Static method type assertion is redundant because the type is already narrowed.

  • Abstract static method is called directly on an interface or abstract class.

  • Called static method is marked as deprecated.

  • Static method is called on a deprecated class.

  • Static method is called on a deprecated enum.

  • Static method is called on a deprecated interface.

  • Static method is called on a deprecated trait.

  • Static method is called using instance syntax instead of class syntax.

  • Static method is called with a variable method name.

  • Static method type check will always evaluate to false.

  • Called static method is marked as internal.

  • Static method is called on an internal class from outside its package.

  • Static method is called on an internal enum from outside its package.

  • Static method is called on an internal interface from outside its package.

  • Static method is called on an internal trait from outside its package.

  • Unnecessary (void) cast on a static method that allows discarding its result.

  • Static method is called with incorrect letter casing.

  • Static method is called on a non-object and non-class-string type.

  • Called static method does not exist on the class.

  • Private static method is called from outside its declaring class.

  • Protected static method is called from outside its class hierarchy.

  • Return value of a #[NoDiscard] static method is not used.

  • Return value of a pure static method call is not used.

  • Return type of a static method call contains an unresolvable type after template substitution.

  • Return value of a void static method is used.