method not found in class...
plz see my index.php in that when i write
var_dump($tasks[0]->foo());
it says under foo method not found in class..
and also in
function fetchAll($conn)
{
$statement = $conn->prepare('select * from todos');
$statement->execute();
return $statement->fetchAll(PDO::FETCH_CLASS, 'Task');
}
under prepare , fetchall
im new to phpstorm plz help me
Please sign in to leave a comment.



Does this code processed correctly by PHP?
yes
Hi there,
Typehint $tasks variable with PHPDoc comment.
This one should do the job -- it tells that $tasks is an array of Task instances: