Why is that? Is it part of the last PHP 7.4 updates?
Setting public static funcion won't cause any future problems?
Also, it is curious that the error is pointed, but the return of the function still appears below it.

Isn't it better to instatiate SiteController, then call for it?
As follows:
$siteController = new SiteController();
$app->router->get('/contact', [$siteController, 'contact']);