Incorrect method type for class method