From d24959d6fd2f135be2675f4930704a3850765b43 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Wed, 14 Jan 2015 16:05:51 +0000 Subject: [PATCH] Reduce line lengths --- .../Controllers/DashIncidentController.php | 42 ++++++++++++++++--- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/src/Http/Controllers/DashIncidentController.php b/src/Http/Controllers/DashIncidentController.php index cd38b5a7..35a13dc8 100644 --- a/src/Http/Controllers/DashIncidentController.php +++ b/src/Http/Controllers/DashIncidentController.php @@ -49,11 +49,21 @@ class DashIncidentController extends Controller if (! $incident->isValid()) { return Redirect::back()->withInput(Binput::all()) - ->with('title', sprintf("%s %s", trans('dashboard.notifications.whoops'), trans('dashboard.incidents.add.failure'))) + ->with('title', sprintf( + "%s %s", + trans('dashboard.notifications.whoops'), + trans('dashboard.incidents.add.failure') + )) ->with('errors', $incident->getErrors()); } - return Redirect::back()->with('success', sprintf("%s %s", trans('dashboard.notifications.awesome'), trans('dashboard.incidents.add.success'))); + $successMsg = sprintf( + "%s %s", + trans('dashboard.notifications.awesome'), + trans('dashboard.incidents.add.success') + ); + + return Redirect::back()->with('success', $successMsg); } /** @@ -80,11 +90,21 @@ class DashIncidentController extends Controller if (! $template->isValid()) { return Redirect::back()->withInput(Binput::all()) - ->with('title', sprintf("%s %s", trans('dashboard.notifications.awesome'), trans('dashboard.incidents.templates.add.failure'))) + ->with('title', sprintf( + "%s %s", + trans('dashboard.notifications.awesome'), + trans('dashboard.incidents.templates.add.failure') + )) ->with('errors', $template->getErrors()); } - return Redirect::back()->with('success', sprintf("%s %s", trans('dashboard.notifications.awesome'), trans('dashboard.incidents.templates.add.success'))); + $successMsg = sprintf( + "%s %s", + trans('dashboard.notifications.awesome'), + trans('dashboard.incidents.templates.add.success') + ); + + return Redirect::back()->with('success', $successMsg); } /** @@ -130,10 +150,20 @@ class DashIncidentController extends Controller if (! $incident->isValid()) { return Redirect::back()->withInput(Binput::all()) - ->with('title', sprintf("%s %s", trans('dashboard.notifications.awesome'), trans('dashboard.incidents.templates.edit.failure'))) + ->with('title', sprintf( + "%s %s", + trans('dashboard.notifications.awesome'), + trans('dashboard.incidents.templates.edit.failure') + )) ->with('errors', $incident->getErrors()); } - return Redirect::to('dashboard/incidents')->with('success', sprintf("%s %s", trans('dashboard.notifications.awesome'), trans('dashboard.incidents.edit.success'))); + $successMsg = sprintf( + "%s %s", + trans('dashboard.notifications.awesome'), + trans('dashboard.incidents.edit.success') + ); + + return Redirect::to('dashboard/incidents')->with('success', $successMsg); } }