[#50] inject resource event parameters into event

- Wrote two helper methods:
  - prepareEventParams(), which merges default resource event parameters
    with those from the resource method, using an ArrayObject.
  - prepareEvent(), which creates an Event instance with the event
    parameters, event name, and target. That instance is used to trigger
    an event.
- All tests now pass.
[#50] CS fixes

- per php-cs-fixer