/**
  * Overrides the "StateMachine::leaveState" method,
  * in order to support/emit the ON_STATE_EXITED event.
  *
  * @param StatefulSubjectInterface $subject
  * @param StateInterface $current_state
  */
 protected function leaveState(StatefulSubjectInterface $subject, StateInterface $current_state)
 {
     parent::leaveState($subject, $current_state);
     $this->fireEvent(self::ON_STATE_EXITED, $subject, $current_state);
 }