I get this error -
@var \Drupal\User\Entity\User|null $user
(local variable) EntityInterface|null $user
Argument '1' passed to userID() is expected to be of type Drupal\User\Entity\User, Drupal\Core\Entity\EntityInterface|null givenPHP(PHP0406)
$user = User::load(\Drupal::currentUser()->id());
$user_id = Functions::userID($user);
Why doesn't it know $user is an instance of the class User?