Skip to content

UndefinedMethod

A method is called on a type that does not declare that method.

<?php
class User {}
$user = new User();
$user->getName(); // User has no getName method

Add the method to the class, fix the method name, or correct the type of the variable.