Merge pull request #2439 from CachetHQ/cleanup-event-names

Cleanup event names
This commit is contained in:
James Brooks
2017-03-18 10:09:55 +00:00
committed by GitHub
51 changed files with 235 additions and 187 deletions
@@ -11,7 +11,12 @@
namespace CachetHQ\Cachet\Bus\Commands\Component;
final class AddComponentCommand
/**
* This is the create component command class.
*
* @author James Brooks <james@alt-three.com>
*/
final class CreateComponentCommand
{
/**
* The component name.
@@ -12,11 +12,11 @@
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
/**
* This is the add component group command.
* This is the create component group command.
*
* @author James Brooks <james@alt-three.com>
*/
final class AddComponentGroupCommand
final class CreateComponentGroupCommand
{
/**
* The component group name.
@@ -12,12 +12,12 @@
namespace CachetHQ\Cachet\Bus\Commands\Incident;
/**
* This is the report incident command.
* This is the create incident command.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class ReportIncidentCommand
final class CreateIncidentCommand
{
/**
* The incident name.
@@ -115,7 +115,7 @@ final class ReportIncidentCommand
];
/**
* Create a new report incident command instance.
* Create a new create incident command instance.
*
* @param string $name
* @param int $status
@@ -19,7 +19,7 @@ use CachetHQ\Cachet\Models\User;
*
* @author James Brooks <james@alt-three.com>
*/
final class ReportIncidentUpdateCommand
final class CreateIncidentUpdateCommand
{
/**
* The incident.
@@ -11,7 +11,13 @@
namespace CachetHQ\Cachet\Bus\Commands\Metric;
final class AddMetricCommand
/**
* This is the create metric command class.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class CreateMetricCommand
{
/**
* The metric name.
@@ -13,7 +13,13 @@ namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
final class AddMetricPointCommand
/**
* This is the create metric point command class.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class CreateMetricPointCommand
{
/**
* The metric to add.
@@ -12,11 +12,11 @@
namespace CachetHQ\Cachet\Bus\Commands\User;
/**
* This is the add user command.
* This is the create user command.
*
* @author James Brooks <james@alt-three.com>
*/
final class AddUserCommand
final class CreateUserCommand
{
/**
* The user username.
@@ -16,21 +16,21 @@ use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\User;
/**
* This is the component status was updated event.
* This is the component status was changed event.
*
* @author James Brooks <james@alt-three.com>
*/
final class ComponentStatusWasUpdatedEvent implements ActionInterface, ComponentEventInterface
final class ComponentStatusWasChangedEvent implements ActionInterface, ComponentEventInterface
{
/**
* The user who updated the component.
* The user who changed the component.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component that was updated.
* The component that was changed.
*
* @var \CachetHQ\Cachet\Models\Component
*/
@@ -84,7 +84,7 @@ final class ComponentStatusWasUpdatedEvent implements ActionInterface, Component
*/
public function __toString()
{
return 'Component status was updated.';
return 'Component status was changed.';
}
/**
@@ -15,7 +15,12 @@ use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\User;
final class ComponentWasAddedEvent implements ActionInterface, ComponentEventInterface
/**
* This is the component was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ComponentWasCreatedEvent implements ActionInterface, ComponentEventInterface
{
/**
* The user who added the component.
@@ -15,7 +15,12 @@ use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\User;
final class ComponentGroupWasAddedEvent implements ActionInterface, ComponentGroupEventInterface
/**
* This is the component group was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ComponentGroupWasCreatedEvent implements ActionInterface, ComponentGroupEventInterface
{
/**
* The user who added the component group.
@@ -15,7 +15,7 @@ use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\User;
final class IncidentWasReportedEvent implements ActionInterface, IncidentEventInterface
final class IncidentWasCreatedEvent implements ActionInterface, IncidentEventInterface
{
/**
* The user who reported the event.
@@ -15,7 +15,12 @@ use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\MetricPoint;
use CachetHQ\Cachet\Models\User;
final class MetricPointWasAddedEvent implements ActionInterface, MetricEventInterface
/**
* This is the metric point was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class MetricPointWasCreatedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who added the metric point.
@@ -15,7 +15,12 @@ use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\User;
final class MetricWasAddedEvent implements ActionInterface, MetricEventInterface
/**
* This is the metric was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class MetricWasCreatedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who added the metric.
@@ -14,7 +14,12 @@ namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
final class UserWasAddedEvent implements ActionInterface, UserEventInterface
/**
* This is the user was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserWasCreatedEvent implements ActionInterface, UserEventInterface
{
/**
* The user that has been added.
@@ -42,7 +47,7 @@ final class UserWasAddedEvent implements ActionInterface, UserEventInterface
*/
public function __toString()
{
return 'User was added.';
return 'User was created.';
}
/**
+1 -1
View File
@@ -23,7 +23,7 @@ use CachetHQ\Cachet\Models\Invite;
final class UserWasInvitedEvent implements UserEventInterface
{
/**
* The invite that has been added.
* The invite that has been created.
*
* @var \CachetHQ\Cachet\Models\Invite
*/
@@ -11,12 +11,17 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
use CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand;
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\Component\CreateComponentCommand;
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasCreatedEvent;
use CachetHQ\Cachet\Models\Component;
use Illuminate\Contracts\Auth\Guard;
class AddComponentCommandHandler
/**
* This is the add component command handler class.
*
* @author James Brooks <james@alt-three.com>
*/
class CreateComponentCommandHandler
{
/**
* The authentication guard instance.
@@ -40,15 +45,15 @@ class AddComponentCommandHandler
/**
* Handle the add component command.
*
* @param \CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Component\CreateComponentCommand $command
*
* @return \CachetHQ\Cachet\Models\Component
*/
public function handle(AddComponentCommand $command)
public function handle(CreateComponentCommand $command)
{
$component = Component::create($this->filter($command));
event(new ComponentWasAddedEvent($this->auth->user(), $component));
event(new ComponentWasCreatedEvent($this->auth->user(), $component));
return $component;
}
@@ -56,11 +61,11 @@ class AddComponentCommandHandler
/**
* Filter the command data.
*
* @param \CachetHQ\Cachet\Bus\Commands\Incident\AddComponentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\CreateComponentCommand $command
*
* @return array
*/
protected function filter(AddComponentCommand $command)
protected function filter(CreateComponentCommand $command)
{
$params = [
'name' => $command->name,
@@ -12,7 +12,7 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
use CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand;
use CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasUpdatedEvent;
use CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasChangedEvent;
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent;
use CachetHQ\Cachet\Models\Component;
use Illuminate\Contracts\Auth\Guard;
@@ -50,7 +50,7 @@ class UpdateComponentCommandHandler
$component = $command->component;
$originalStatus = $component->status;
event(new ComponentStatusWasUpdatedEvent($this->auth->user(), $component, $originalStatus, $command->status, $command->silent));
event(new ComponentStatusWasChangedEvent($this->auth->user(), $component, $originalStatus, $command->status, $command->silent));
$component->update($this->filter($command));
@@ -11,12 +11,12 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand;
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\CreateComponentGroupCommand;
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasCreatedEvent;
use CachetHQ\Cachet\Models\ComponentGroup;
use Illuminate\Contracts\Auth\Guard;
class AddComponentGroupCommandHandler
class CreateComponentGroupCommandHandler
{
/**
* The authentication guard instance.
@@ -26,7 +26,7 @@ class AddComponentGroupCommandHandler
protected $auth;
/**
* Create a new add component group command handler instance.
* Create a new create component group command handler instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
*
@@ -38,13 +38,13 @@ class AddComponentGroupCommandHandler
}
/**
* Handle the add component group command.
* Handle the create component group command.
*
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\CreateComponentGroupCommand $command
*
* @return \CachetHQ\Cachet\Models\ComponentGroup
*/
public function handle(AddComponentGroupCommand $command)
public function handle(CreateComponentGroupCommand $command)
{
$group = ComponentGroup::create([
'name' => $command->name,
@@ -53,7 +53,7 @@ class AddComponentGroupCommandHandler
'visible' => $command->visible,
]);
event(new ComponentGroupWasAddedEvent($this->auth->user(), $group));
event(new ComponentGroupWasCreatedEvent($this->auth->user(), $group));
return $group;
}
@@ -12,8 +12,8 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
use CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
use CachetHQ\Cachet\Bus\Commands\Incident\CreateIncidentCommand;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasCreatedEvent;
use CachetHQ\Cachet\Bus\Exceptions\Incident\InvalidIncidentTimestampException;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\Incident;
@@ -25,11 +25,11 @@ use Twig_Environment;
use Twig_Loader_Array;
/**
* This is the report incident command handler.
* This is the create incident command handler.
*
* @author James Brooks <james@alt-three.com>
*/
class ReportIncidentCommandHandler
class CreateIncidentCommandHandler
{
/**
* The authentication guard instance.
@@ -46,7 +46,7 @@ class ReportIncidentCommandHandler
protected $dates;
/**
* Create a new report incident command handler instance.
* Create a new create incident command handler instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \CachetHQ\Cachet\Services\Dates\DateFactory $dates
@@ -60,13 +60,13 @@ class ReportIncidentCommandHandler
}
/**
* Handle the report incident command.
* Handle the create incident command.
*
* @param \CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\CreateIncidentCommand $command
*
* @return \CachetHQ\Cachet\Models\Incident
*/
public function handle(ReportIncidentCommand $command)
public function handle(CreateIncidentCommand $command)
{
$data = [
'name' => $command->name,
@@ -116,7 +116,7 @@ class ReportIncidentCommandHandler
));
}
event(new IncidentWasReportedEvent($this->auth->user(), $incident, (bool) $command->notify));
event(new IncidentWasCreatedEvent($this->auth->user(), $incident, (bool) $command->notify));
return $incident;
}
@@ -125,11 +125,11 @@ class ReportIncidentCommandHandler
* Compiles an incident template into an incident message.
*
* @param \CachetHQ\Cachet\Models\IncidentTemplate $template
* @param \CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\CreateIncidentCommand $command
*
* @return string
*/
protected function parseTemplate(IncidentTemplate $template, ReportIncidentCommand $command)
protected function parseTemplate(IncidentTemplate $template, CreateIncidentCommand $command)
{
$env = new Twig_Environment(new Twig_Loader_Array([]));
$template = $env->createTemplate($template->template);
@@ -12,7 +12,7 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\IncidentUpdate;
use CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\CreateIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Events\IncidentUpdate\IncidentUpdateWasReportedEvent;
use CachetHQ\Cachet\Models\IncidentUpdate;
use Illuminate\Contracts\Auth\Guard;
@@ -22,7 +22,7 @@ use Illuminate\Contracts\Auth\Guard;
*
* @author James Brooks <james@alt-three.com>
*/
class ReportIncidentUpdateCommandHandler
class CreateIncidentUpdateCommandHandler
{
/**
* The authentication guard instance.
@@ -46,11 +46,11 @@ class ReportIncidentUpdateCommandHandler
/**
* Handle the report incident command.
*
* @param \CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\IncidentUpdate\CreateIncidentUpdateCommand $command
*
* @return \CachetHQ\Cachet\Models\IncidentUpdate
*/
public function handle(ReportIncidentUpdateCommand $command)
public function handle(CreateIncidentUpdateCommand $command)
{
$data = [
'incident_id' => $command->incident->id,
@@ -11,12 +11,12 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasCreatedEvent;
use CachetHQ\Cachet\Models\Metric;
use Illuminate\Contracts\Auth\Guard;
class AddMetricCommandHandler
class CreateMetricCommandHandler
{
/**
* The authentication guard instance.
@@ -40,11 +40,11 @@ class AddMetricCommandHandler
/**
* Handle the add metric command.
*
* @param \CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricCommand $command
*
* @return \CachetHQ\Cachet\Models\Metric
*/
public function handle(AddMetricCommand $command)
public function handle(CreateMetricCommand $command)
{
$metric = Metric::create([
'name' => $command->name,
@@ -60,7 +60,7 @@ class AddMetricCommandHandler
'visible' => $command->visible,
]);
event(new MetricWasAddedEvent($this->auth->user(), $metric));
event(new MetricWasCreatedEvent($this->auth->user(), $metric));
return $metric;
}
@@ -11,14 +11,14 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricPointCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasCreatedEvent;
use CachetHQ\Cachet\Models\MetricPoint;
use CachetHQ\Cachet\Services\Dates\DateFactory;
use Carbon\Carbon;
use Illuminate\Contracts\Auth\Guard;
class AddMetricPointCommandHandler
class CreateMetricPointCommandHandler
{
/**
* The authentication guard instance.
@@ -51,11 +51,11 @@ class AddMetricPointCommandHandler
/**
* Handle the add metric point command.
*
* @param \CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricPointCommand $command
*
* @return \CachetHQ\Cachet\Models\MetricPoint
*/
public function handle(AddMetricPointCommand $command)
public function handle(CreateMetricPointCommand $command)
{
$metric = $command->metric;
$createdAt = $command->created_at;
@@ -65,7 +65,7 @@ class AddMetricPointCommandHandler
$point->increment('counter', 1);
event(new MetricPointWasAddedEvent($this->auth->user(), $point));
event(new MetricPointWasCreatedEvent($this->auth->user(), $point));
return $point;
}
@@ -73,11 +73,11 @@ class AddMetricPointCommandHandler
/**
* Find or create a metric point.
*
* @param \CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricPointCommand $command
*
* @return \CachetHQ\Cachet\Models\MetricPoint
*/
protected function findOrCreatePoint(AddMetricPointCommand $command)
protected function findOrCreatePoint(CreateMetricPointCommand $command)
{
$buffer = Carbon::now()->subMinutes($command->metric->threshold);
@@ -11,25 +11,25 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
use CachetHQ\Cachet\Bus\Commands\User\AddUserCommand;
use CachetHQ\Cachet\Bus\Events\User\UserWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\User\CreateUserCommand;
use CachetHQ\Cachet\Bus\Events\User\UserWasCreatedEvent;
use CachetHQ\Cachet\Models\User;
/**
* This is the add user command handler.
* This is the create user command handler.
*
* @author James Brooks <james@alt-three.com>
*/
class AddUserCommandHandler
class CreateUserCommandHandler
{
/**
* Handle the add user command.
*
* @param \CachetHQ\Cachet\Bus\Commands\User\AddUserCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\User\CreateUserCommand $command
*
* @return \CachetHQ\Cachet\Models\User
*/
public function handle(AddUserCommand $command)
public function handle(CreateUserCommand $command)
{
$user = User::create([
'username' => $command->username,
@@ -38,7 +38,7 @@ class AddUserCommandHandler
'level' => $command->level,
]);
event(new UserWasAddedEvent($user));
event(new UserWasCreatedEvent($user));
return $user;
}
@@ -12,7 +12,7 @@
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
use CachetHQ\Cachet\Bus\Commands\User\SignupUserCommand;
use CachetHQ\Cachet\Bus\Events\User\UserWasAddedEvent;
use CachetHQ\Cachet\Bus\Events\User\UserWasCreatedEvent;
use CachetHQ\Cachet\Models\User;
class SignupUserCommandHandler
@@ -33,7 +33,7 @@ class SignupUserCommandHandler
'level' => User::LEVEL_USER,
]);
event(new UserWasAddedEvent($user));
event(new UserWasCreatedEvent($user));
return $user;
}
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Bus\Handlers\Events\Component;
use CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasUpdatedEvent;
use CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasChangedEvent;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\Subscriber;
use CachetHQ\Cachet\Notifications\Component\ComponentStatusChangedNotification;
@@ -40,11 +40,11 @@ class SendComponentUpdateEmailNotificationHandler
/**
* Handle the event.
*
* @param \CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasUpdatedEvent $event
* @param \CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasChangedEvent $event
*
* @return void
*/
public function handle(ComponentStatusWasUpdatedEvent $event)
public function handle(ComponentStatusWasChangedEvent $event)
{
$component = $event->component;
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Bus\Handlers\Events\Incident;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasCreatedEvent;
use CachetHQ\Cachet\Models\Subscriber;
use CachetHQ\Cachet\Notifications\Incident\NewIncidentNotification;
@@ -39,11 +39,11 @@ class SendIncidentEmailNotificationHandler
/**
* Handle the event.
*
* @param \CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent $event
* @param \CachetHQ\Cachet\Bus\Events\Incident\IncidentWasCreatedEvent $event
*
* @return void
*/
public function handle(IncidentWasReportedEvent $event)
public function handle(IncidentWasCreatedEvent $event)
{
$incident = $event->incident;
@@ -30,7 +30,7 @@ class EventServiceProvider extends ServiceProvider
'CachetHQ\Cachet\Bus\Events\Beacon\BeaconWasSentEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasAddedEvent' => [
'CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasCreatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasRemovedEvent' => [
@@ -39,10 +39,10 @@ class EventServiceProvider extends ServiceProvider
'CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasUpdatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasUpdatedEvent' => [
'CachetHQ\Cachet\Bus\Events\Component\ComponentStatusWasChangedEvent' => [
'CachetHQ\Cachet\Bus\Handlers\Events\Component\SendComponentUpdateEmailNotificationHandler',
],
'CachetHQ\Cachet\Bus\Events\Component\ComponentWasAddedEvent' => [
'CachetHQ\Cachet\Bus\Events\Component\ComponentWasCreatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Component\ComponentWasRemovedEvent' => [
@@ -60,12 +60,12 @@ class EventServiceProvider extends ServiceProvider
'CachetHQ\Cachet\Bus\Events\IncidentUpdate\IncidentUpdateWasUpdatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasCreatedEvent' => [
'CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendIncidentEmailNotificationHandler',
],
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasRemovedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent' => [
'CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendIncidentEmailNotificationHandler',
],
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent' => [
//
],
@@ -75,7 +75,7 @@ class EventServiceProvider extends ServiceProvider
'CachetHQ\Cachet\Bus\Events\Invite\InviteWasClaimedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasAddedEvent' => [
'CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasCreatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasRemovedEvent' => [
@@ -84,7 +84,7 @@ class EventServiceProvider extends ServiceProvider
'CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasUpdatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Metric\MetricWasAddedEvent' => [
'CachetHQ\Cachet\Bus\Events\Metric\MetricWasCreatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\Metric\MetricWasRemovedEvent' => [
@@ -150,7 +150,7 @@ class EventServiceProvider extends ServiceProvider
'CachetHQ\Cachet\Bus\Events\User\UserRegeneratedApiTokenEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\User\UserWasAddedEvent' => [
'CachetHQ\Cachet\Bus\Events\User\UserWasCreatedEvent' => [
//
],
'CachetHQ\Cachet\Bus\Events\User\UserWasInvitedEvent' => [
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand;
use CachetHQ\Cachet\Bus\Commands\Component\CreateComponentCommand;
use CachetHQ\Cachet\Bus\Commands\Component\RemoveComponentCommand;
use CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand;
use CachetHQ\Cachet\Models\Component;
@@ -70,7 +70,7 @@ class ComponentController extends AbstractApiController
public function postComponents()
{
try {
$component = dispatch(new AddComponentCommand(
$component = dispatch(new CreateComponentCommand(
Binput::get('name'),
Binput::get('description'),
Binput::get('status'),
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\CreateComponentGroupCommand;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\RemoveComponentGroupCommand;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand;
use CachetHQ\Cachet\Models\ComponentGroup;
@@ -92,7 +92,7 @@ class ComponentGroupController extends AbstractApiController
public function postGroups()
{
try {
$group = dispatch(new AddComponentGroupCommand(
$group = dispatch(new CreateComponentGroupCommand(
Binput::get('name'),
Binput::get('order', 0),
Binput::get('collapsed', 0),
@@ -11,8 +11,8 @@
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Bus\Commands\Incident\CreateIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\RemoveIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand;
use CachetHQ\Cachet\Models\Incident;
use GrahamCampbell\Binput\Facades\Binput;
@@ -67,7 +67,7 @@ class IncidentController extends AbstractApiController
public function postIncidents()
{
try {
$incident = dispatch(new ReportIncidentCommand(
$incident = dispatch(new CreateIncidentCommand(
Binput::get('name'),
Binput::get('status'),
Binput::get('message', null, false, false),
@@ -11,8 +11,8 @@
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\CreateIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\RemoveIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\UpdateIncidentUpdateCommand;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\IncidentUpdate;
@@ -74,7 +74,7 @@ class IncidentUpdateController extends AbstractApiController
public function postIncidentUpdate(Incident $incident)
{
try {
$update = dispatch(new ReportIncidentUpdateCommand(
$update = dispatch(new CreateIncidentUpdateCommand(
$incident,
Binput::get('status'),
Binput::get('message'),
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand;
use CachetHQ\Cachet\Models\Metric;
@@ -76,7 +76,7 @@ class MetricController extends AbstractApiController
public function postMetrics()
{
try {
$metric = dispatch(new AddMetricCommand(
$metric = dispatch(new CreateMetricCommand(
Binput::get('name'),
Binput::get('suffix'),
Binput::get('description'),
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricPointCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricPointCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricPointCommand;
use CachetHQ\Cachet\Models\Metric;
@@ -45,7 +45,7 @@ class MetricPointController extends AbstractApiController
public function postMetricPoints(Metric $metric)
{
try {
$metricPoint = dispatch(new AddMetricPointCommand(
$metricPoint = dispatch(new CreateMetricPointCommand(
$metric,
Binput::get('value'),
Binput::get('timestamp')
@@ -12,10 +12,10 @@
namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
use AltThree\Validator\ValidationException;
use CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand;
use CachetHQ\Cachet\Bus\Commands\Component\CreateComponentCommand;
use CachetHQ\Cachet\Bus\Commands\Component\RemoveComponentCommand;
use CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\CreateComponentGroupCommand;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\RemoveComponentGroupCommand;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand;
use CachetHQ\Cachet\Models\Component;
@@ -182,7 +182,7 @@ class ComponentController extends Controller
$tags = array_pull($componentData, 'tags');
try {
$component = dispatch(new AddComponentCommand(
$component = dispatch(new CreateComponentCommand(
$componentData['name'],
$componentData['description'],
$componentData['status'],
@@ -276,7 +276,7 @@ class ComponentController extends Controller
public function postAddComponentGroup()
{
try {
$group = dispatch(new AddComponentGroupCommand(
$group = dispatch(new CreateComponentGroupCommand(
Binput::get('name'),
Binput::get('order', 0),
Binput::get('collapsed'),
@@ -12,10 +12,10 @@
namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
use AltThree\Validator\ValidationException;
use CachetHQ\Cachet\Bus\Commands\Incident\CreateIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\RemoveIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\CreateIncidentUpdateCommand;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\Incident;
@@ -108,7 +108,7 @@ class IncidentController extends Controller
public function createIncidentAction()
{
try {
$incident = dispatch(new ReportIncidentCommand(
$incident = dispatch(new CreateIncidentCommand(
Binput::get('name'),
Binput::get('status'),
Binput::get('message', null, false, false),
@@ -308,7 +308,7 @@ class IncidentController extends Controller
public function createIncidentUpdateAction(Incident $incident)
{
try {
$incident = dispatch(new ReportIncidentUpdateCommand(
$incident = dispatch(new CreateIncidentUpdateCommand(
$incident,
Binput::get('status'),
Binput::get('message'),
@@ -12,7 +12,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
use AltThree\Validator\ValidationException;
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand;
use CachetHQ\Cachet\Models\Metric;
@@ -70,7 +70,7 @@ class MetricController extends Controller
$metricData = Binput::get('metric');
try {
dispatch(new AddMetricCommand(
dispatch(new CreateMetricCommand(
$metricData['name'],
$metricData['suffix'],
$metricData['description'],
@@ -12,7 +12,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
use AltThree\Validator\ValidationException;
use CachetHQ\Cachet\Bus\Commands\User\AddUserCommand;
use CachetHQ\Cachet\Bus\Commands\User\CreateUserCommand;
use CachetHQ\Cachet\Bus\Commands\User\InviteUserCommand;
use CachetHQ\Cachet\Bus\Commands\User\RemoveUserCommand;
use CachetHQ\Cachet\Models\User;
@@ -80,7 +80,7 @@ class TeamController extends Controller
public function postAddUser()
{
try {
dispatch(new AddUserCommand(
dispatch(new CreateUserCommand(
Binput::get('username'),
Binput::get('password'),
Binput::get('email'),