Note that the (string) for pg_escape_string and pg_escape_literal are forced for phpstan because it thinks this might return false even thought both function only return string ever