From 537017925f9d276e4ba755921c6d7db0576c4f54 Mon Sep 17 00:00:00 2001 From: Joseph Cohen Date: Wed, 17 Feb 2016 16:32:10 -0600 Subject: [PATCH] Use create instead of createNormalized on handlers --- .../Handlers/Commands/Incident/ReportIncidentCommandHandler.php | 2 +- .../Commands/Incident/ReportMaintenanceCommandHandler.php | 2 +- .../Handlers/Commands/Incident/UpdateIncidentCommandHandler.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php index 360aa287..98070fd4 100644 --- a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php @@ -69,7 +69,7 @@ class ReportIncidentCommandHandler // The incident occurred at a different time. if ($command->incident_date) { - $incidentDate = $this->dates->createNormalized('d/m/Y H:i', $command->incident_date); + $incidentDate = $this->dates->create('d/m/Y H:i', $command->incident_date); $data['created_at'] = $incidentDate; $data['updated_at'] = $incidentDate; diff --git a/app/Bus/Handlers/Commands/Incident/ReportMaintenanceCommandHandler.php b/app/Bus/Handlers/Commands/Incident/ReportMaintenanceCommandHandler.php index e7443859..4126909d 100644 --- a/app/Bus/Handlers/Commands/Incident/ReportMaintenanceCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/ReportMaintenanceCommandHandler.php @@ -46,7 +46,7 @@ class ReportMaintenanceCommandHandler */ public function handle(ReportMaintenanceCommand $command) { - $scheduledAt = $this->dates->createNormalized('d/m/Y H:i', $command->timestamp); + $scheduledAt = $this->dates->create('d/m/Y H:i', $command->timestamp); $maintenanceEvent = Incident::create([ 'name' => $command->name, diff --git a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php index 0de802f8..207ce78c 100644 --- a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php @@ -59,7 +59,7 @@ class UpdateIncidentCommandHandler // The incident occurred at a different time. if ($command->incident_date) { - $incidentDate = $this->dates->createNormalized('d/m/Y H:i', $command->incident_date); + $incidentDate = $this->dates->create('d/m/Y H:i', $command->incident_date); $incident->update([ 'created_at' => $incidentDate,