Use __METHOD__ in Drupal\register_hooks\RegisterHooks::register() instead of __FUNCTION__.