Added string version of all events for action tracking

This commit is contained in:
James Brooks 2017-02-03 22:20:15 +00:00
parent fb0f2cd894
commit 9c5e9aa136
45 changed files with 450 additions and 6 deletions

View File

@ -18,5 +18,13 @@ namespace CachetHQ\Cachet\Bus\Events\Beacon;
*/
final class BeaconFailedToSendEvent implements BeaconEventInterface
{
//
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Beacon failed to send.';
}
}

View File

@ -18,5 +18,13 @@ namespace CachetHQ\Cachet\Bus\Events\Beacon;
*/
final class BeaconWasSentEvent implements BeaconEventInterface
{
//
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Beacon was sent.';
}
}

View File

@ -56,4 +56,14 @@ final class ComponentStatusWasUpdatedEvent implements ComponentEventInterface
$this->original_status = $original_status;
$this->new_status = $new_status;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component status was updated.';
}
}

View File

@ -33,4 +33,14 @@ final class ComponentWasAddedEvent implements ComponentEventInterface
{
$this->component = $component;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component was added.';
}
}

View File

@ -33,4 +33,14 @@ final class ComponentWasRemovedEvent implements ComponentEventInterface
{
$this->component = $component;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component was removed.';
}
}

View File

@ -13,6 +13,12 @@ namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Models\Component;
/**
* This is the component was updated event class.
*
* @author James Brooks <james@alt-three.com>
* @author Graham Campbell <graham@alt-three.com>
*/
final class ComponentWasUpdatedEvent implements ComponentEventInterface
{
/**
@ -33,4 +39,14 @@ final class ComponentWasUpdatedEvent implements ComponentEventInterface
{
$this->component = $component;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component was updated.';
}
}

View File

@ -33,4 +33,14 @@ final class ComponentGroupWasAddedEvent implements ComponentGroupEventInterface
{
$this->group = $group;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component Group was added.';
}
}

View File

@ -33,4 +33,14 @@ final class ComponentGroupWasRemovedEvent implements ComponentGroupEventInterfac
{
$this->group = $group;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component Group was removed.';
}
}

View File

@ -33,4 +33,14 @@ final class ComponentGroupWasUpdatedEvent implements ComponentGroupEventInterfac
{
$this->group = $group;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component Group was updated.';
}
}

View File

@ -33,4 +33,14 @@ final class IncidentWasRemovedEvent implements IncidentEventInterface
{
$this->incident = $incident;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident was removed.';
}
}

View File

@ -42,4 +42,14 @@ final class IncidentWasReportedEvent implements IncidentEventInterface
$this->incident = $incident;
$this->notify = $notify;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident was reported.';
}
}

View File

@ -33,4 +33,14 @@ final class IncidentWasUpdatedEvent implements IncidentEventInterface
{
$this->incident = $incident;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident was updated.';
}
}

View File

@ -38,4 +38,14 @@ final class IncidentUpdateWasRemovedEvent implements IncidentUpdateEventInterfac
{
$this->update = $update;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident Update was removed.';
}
}

View File

@ -38,4 +38,14 @@ final class IncidentUpdateWasReportedEvent implements IncidentUpdateEventInterfa
{
$this->update = $update;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident Update was reported.';
}
}

View File

@ -38,4 +38,14 @@ final class IncidentUpdateWasUpdatedEvent implements IncidentUpdateEventInterfac
{
$this->update = $update;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident Update was updated.';
}
}

View File

@ -31,4 +31,14 @@ final class InviteWasClaimedEvent implements InviteEventInterface
{
$this->invite = $invite;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Invite was claimed.';
}
}

View File

@ -33,4 +33,14 @@ final class MetricPointWasAddedEvent implements MetricEventInterface
{
$this->metricPoint = $metricPoint;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric Point was added.';
}
}

View File

@ -33,4 +33,14 @@ final class MetricPointWasRemovedEvent implements MetricEventInterface
{
$this->metricPoint = $metricPoint;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric Point was removed.';
}
}

View File

@ -33,4 +33,14 @@ final class MetricPointWasUpdatedEvent implements MetricEventInterface
{
$this->metricPoint = $metricPoint;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric Point was updated.';
}
}

View File

@ -33,4 +33,14 @@ final class MetricWasAddedEvent implements MetricEventInterface
{
$this->metric = $metric;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric was added.';
}
}

View File

@ -33,4 +33,14 @@ final class MetricWasRemovedEvent implements MetricEventInterface
{
$this->metric = $metric;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric was removed.';
}
}

View File

@ -33,4 +33,14 @@ final class MetricWasUpdatedEvent implements MetricEventInterface
{
$this->metric = $metric;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric was updated.';
}
}

View File

@ -38,4 +38,14 @@ final class ScheduleWasCreatedEvent implements ScheduleEventInterface
{
$this->schedule = $schedule;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Schedule was created.';
}
}

View File

@ -38,4 +38,14 @@ final class ScheduleWasRemovedEvent implements ScheduleEventInterface
{
$this->schedule = $schedule;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Schedule was removed.';
}
}

View File

@ -38,4 +38,14 @@ final class ScheduleWasUpdatedEvent implements ScheduleEventInterface
{
$this->schedule = $schedule;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Schedule was updated.';
}
}

View File

@ -33,4 +33,14 @@ final class SubscriberHasSubscribedEvent implements SubscriberEventInterface
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has subscribed.';
}
}

View File

@ -33,4 +33,14 @@ final class SubscriberHasUnsubscribedEvent implements SubscriberEventInterface
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has unsubscribed.';
}
}

View File

@ -38,4 +38,14 @@ final class SubscriberHasUpdatedSubscriptionsEvent implements SubscriberEventInt
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has updated subscription.';
}
}

View File

@ -33,4 +33,14 @@ final class SubscriberHasVerifiedEvent implements SubscriberEventInterface
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has verified.';
}
}

View File

@ -18,5 +18,13 @@ namespace CachetHQ\Cachet\Bus\Events\System;
*/
final class SystemCheckedForUpdatesEvent implements SystemEventInterface
{
//
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System checked for updated.';
}
}

View File

@ -18,5 +18,13 @@ namespace CachetHQ\Cachet\Bus\Events\System;
*/
final class SystemWasInstalledEvent implements SystemEventInterface
{
//
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System was installed.';
}
}

View File

@ -18,5 +18,13 @@ namespace CachetHQ\Cachet\Bus\Events\System;
*/
final class SystemWasResetEvent implements SystemEventInterface
{
//
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System was reset.';
}
}

View File

@ -18,5 +18,13 @@ namespace CachetHQ\Cachet\Bus\Events\System;
*/
final class SystemWasUpdatedEvent implements SystemEventInterface
{
//
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System was updated.';
}
}

View File

@ -48,4 +48,14 @@ final class UserAcceptedInviteEvent implements UserEventInterface
$this->user = $user;
$this->invite = $invite;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User accepted invite.';
}
}

View File

@ -38,4 +38,14 @@ final class UserDisabledTwoAuthEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User disabled two-factor authentication.';
}
}

View File

@ -38,4 +38,14 @@ final class UserEnabledTwoAuthEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User enabled two-factor authentication.';
}
}

View File

@ -38,4 +38,14 @@ final class UserFailedTwoAuthEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User failed two-factor authentication.';
}
}

View File

@ -38,4 +38,14 @@ final class UserLoggedInEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User logged in.';
}
}

View File

@ -38,4 +38,14 @@ final class UserLoggedOutEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User logged out.';
}
}

View File

@ -38,4 +38,14 @@ final class UserPassedTwoAuthEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User passed two-factor authentication.';
}
}

View File

@ -38,4 +38,14 @@ final class UserRegeneratedApiTokenEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User regenerated api token.';
}
}

View File

@ -33,4 +33,14 @@ final class UserWasAddedEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was added.';
}
}

View File

@ -33,4 +33,14 @@ final class UserWasInvitedEvent implements UserEventInterface
{
$this->invite = $invite;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was invited.';
}
}

View File

@ -33,4 +33,14 @@ final class UserWasRemovedEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was removed.';
}
}

View File

@ -38,4 +38,14 @@ final class UserWasWelcomedEvent implements UserEventInterface
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was welcomed.';
}
}