The : indicates a return typehint. The void indicated nothing. : void means that the function returns nothing.
I would suggest going trough PHP's docs, More info on this -> https://www.php.net/manual/en/functions.returning-values.php