Fixed code style to make PHPCS happy.
Added example for events.