From e51b40186fe68a672a693ec07720e076ad76c582 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Wed, 14 Jan 2015 16:08:42 +0000 Subject: [PATCH] Tidy up the DashUserController code --- src/Http/Controllers/DashUserController.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Http/Controllers/DashUserController.php b/src/Http/Controllers/DashUserController.php index 1b69209da..bf95039bd 100644 --- a/src/Http/Controllers/DashUserController.php +++ b/src/Http/Controllers/DashUserController.php @@ -52,11 +52,21 @@ class DashUserController extends Controller if (! $user->isValid()) { return Redirect::back()->withInput(Binput::except('password')) - ->with('title', sprintf("%s %s", trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure'))) + ->with('title', sprintf( + '%s %s', + trans('dashboard.notifications.whoops'), + trans('dashboard.team.edit.failure') + )) ->with('errors', $user->getErrors()); } - return Redirect::back()->with('success', sprintf("%s %s", trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success'))); + $successMsg = sprintf( + '%s %s', + trans('dashboard.notifications.awesome'), + trans('dashboard.team.edit.success') + ); + + return Redirect::back()->with('success', $successMsg); } /**