Skeleton function help

Looking at the skeleton and this is more general PHP I think. Im confused about the part after the colon. Or should I say, what does the colon after the class function do? In reading the docs I understand that the “array” would be a return type definition.

declare(strict_types=1); …makes sense

When it has “Response” or “User”, is that just using all the info from the parent to get a definition or something? Does it load data or just define what is to be expected as far as type?

protected function action(): Response

public function __invoke(Request $request, Response $response, $args): Response

public function findAll(): array;

public function findUserOfId(int $id): User;

public function findUserOfId(int $id): User;

This looks like a typical Interface

Response and User declares that the return type of the class method must be a instance of Response / User.

Does it load data or just define what is to be expected as far as type?

It’s just a pure interface. Only the interface implementation can have some “bevavior” like fetching data etc.