From 15861fbf5e647c659ef1b57796bf4c40527132c0 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 29 Dec 2014 23:07:46 +0000 Subject: [PATCH] CS fixes --- app/controllers/AuthController.php | 6 +++++- app/controllers/DashComponentController.php | 14 ++++++++++++-- app/controllers/DashIncidentController.php | 9 ++++++++- app/controllers/DashSettingsController.php | 2 ++ app/controllers/DashUserController.php | 2 ++ app/controllers/DashboardController.php | 3 +++ app/controllers/HomeController.php | 12 +++++++++++- app/controllers/RSSController.php | 19 +++++++++---------- app/controllers/SetupController.php | 7 +++++++ 9 files changed, 59 insertions(+), 15 deletions(-) diff --git a/app/controllers/AuthController.php b/app/controllers/AuthController.php index ff873a76..688b4ccb 100644 --- a/app/controllers/AuthController.php +++ b/app/controllers/AuthController.php @@ -1,12 +1,13 @@ withInput(Input::except('password')) ->with('error', 'Invalid email or password'); @@ -32,6 +35,7 @@ class AuthController extends Controller /** * Logs the user out, deleting their session etc. + * * @return \Illuminate\Http\RedirectResponse */ public function logoutAction() diff --git a/app/controllers/DashComponentController.php b/app/controllers/DashComponentController.php index 157113df..19d06e3b 100644 --- a/app/controllers/DashComponentController.php +++ b/app/controllers/DashComponentController.php @@ -4,6 +4,7 @@ class DashComponentController extends Controller { /** * Shows the components view. + * * @return \Illuminate\View\View */ public function showComponents() @@ -18,7 +19,9 @@ class DashComponentController extends Controller /** * Shows the edit component view. - * @param Component $component + * + * @param \Component $component + * * @return \Illuminate\View\View */ public function showEditComponent(Component $component) @@ -31,6 +34,9 @@ class DashComponentController extends Controller /** * Updates a component. + * + * @param \Component $component + * * @return \Illuminate\Http\RedirectResponse */ public function updateComponentAction(Component $component) @@ -43,6 +49,7 @@ class DashComponentController extends Controller /** * Shows the add component view. + * * @return \Illuminate\View\View */ public function showAddComponent() @@ -54,6 +61,7 @@ class DashComponentController extends Controller /** * Creates a new component. + * * @return \Illuminate\Http\RedirectResponse */ public function createComponentAction() @@ -66,7 +74,9 @@ class DashComponentController extends Controller /** * Deletes a given component. - * @param Component $component + * + * @param \Component $component + * * @return \Illuminate\Http\RedirectResponse */ public function deleteComponentAction(Component $component) diff --git a/app/controllers/DashIncidentController.php b/app/controllers/DashIncidentController.php index acf8008b..8ea2a7ac 100644 --- a/app/controllers/DashIncidentController.php +++ b/app/controllers/DashIncidentController.php @@ -4,6 +4,7 @@ class DashIncidentController extends Controller { /** * Shows the incidents view. + * * @return \Illuminate\View\View */ public function showIncidents() @@ -18,6 +19,7 @@ class DashIncidentController extends Controller /** * Shows the add incident view. + * * @return \Illuminate\View\View */ public function showAddIncident() @@ -29,6 +31,7 @@ class DashIncidentController extends Controller /** * Shows the add incident template view. + * * @return \Illuminate\View\View */ public function showAddIncidentTemplate() @@ -40,6 +43,7 @@ class DashIncidentController extends Controller /** * Creates a new incident template. + * * @return \Illuminate\Http\RedirectResponse */ public function createIncidentTemplateAction() @@ -52,6 +56,7 @@ class DashIncidentController extends Controller /** * Creates a new incident. + * * @return \Illuminate\Http\RedirectResponse */ public function createIncidentAction() @@ -64,7 +69,9 @@ class DashIncidentController extends Controller /** * Deletes a given incident. - * @param Incident $incident + * + * @param \Incident $incident + * * @return \Illuminate\Http\RedirectResponse */ public function deleteIncidentAction(Incident $incident) diff --git a/app/controllers/DashSettingsController.php b/app/controllers/DashSettingsController.php index 2cac37a9..c5091699 100644 --- a/app/controllers/DashSettingsController.php +++ b/app/controllers/DashSettingsController.php @@ -4,6 +4,7 @@ class DashSettingsController extends Controller { /** * Shows the settings view. + * * @return \Illuminate\View\View */ public function showSettings() @@ -15,6 +16,7 @@ class DashSettingsController extends Controller /** * Updates the statsu page settings. + * * @return \Illuminate\View\View */ public function postSettings() diff --git a/app/controllers/DashUserController.php b/app/controllers/DashUserController.php index 1b068285..4e18a0d4 100644 --- a/app/controllers/DashUserController.php +++ b/app/controllers/DashUserController.php @@ -4,6 +4,7 @@ class DashUserController extends Controller { /** * Shows the user view. + * * @return \Illuminate\View\View */ public function showUser() @@ -15,6 +16,7 @@ class DashUserController extends Controller /** * Updates the current user. + * * @return \Illuminate\View\View */ public function postUser() diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index d78e2622..ffd9b641 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -4,6 +4,7 @@ class DashboardController extends Controller { /** * Shows the dashboard view. + * * @return \Illuminate\View\View */ public function showDashboard() @@ -14,6 +15,7 @@ class DashboardController extends Controller /** * Shows the metrics view. + * * @return \Illuminate\View\View */ public function showMetrics() @@ -25,6 +27,7 @@ class DashboardController extends Controller /** * Shows the notifications view. + * * @return \Illuminate\View\View */ public function showNotifications() diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 53ad9064..65925ae5 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -3,10 +3,19 @@ class HomeController extends Controller { /** - * @var Component $component + * The component instance. + * + * @var \Component $component */ protected $component; + /** + * Create a new home controller instance. + * + * @param \Component $component + * + * @return void + */ public function __construct(Component $component) { $this->component = $component; @@ -14,6 +23,7 @@ class HomeController extends Controller /** * Returns the rendered Blade templates. + * * @return \Illuminate\View\View */ public function showIndex() diff --git a/app/controllers/RSSController.php b/app/controllers/RSSController.php index 53c4fe41..83188dc4 100644 --- a/app/controllers/RSSController.php +++ b/app/controllers/RSSController.php @@ -4,22 +4,23 @@ class RSSController extends Controller { /** * Generates an RSS feed of all incidents. + * * @return \Illuminate\Http\Response */ public function feedAction() { $feed = RSS::feed('2.0', 'UTF-8'); $feed->channel([ - 'title' => Setting::get('app_name'), - 'description' => 'Status Feed', - 'link' => Setting::get('app_domain'), + 'title' => Setting::get('app_name'), + 'description' => 'Status Feed', + 'link' => Setting::get('app_domain'), ]); Incident::get()->map(function ($incident) use ($feed) { - $componentName = null; - $component = $incident->component; - if ($component) { - $componentName = $component->name; + if ($incident->component) { + $componentName = $incident->component->name; + } else { + $componentName = null; } $feed->item([ @@ -32,8 +33,6 @@ class RSSController extends Controller ]); }); - return Response::make($feed, 200, [ - 'Content-Type' => 'text/xml' - ]); + return Response::make($feed, 200, ['Content-Type' => 'text/xml']); } } diff --git a/app/controllers/SetupController.php b/app/controllers/SetupController.php index 4d33825d..5b54f14d 100644 --- a/app/controllers/SetupController.php +++ b/app/controllers/SetupController.php @@ -2,6 +2,11 @@ class SetupController extends Controller { + /** + * Create a new setup controller instance. + * + * @return void + */ public function __construct() { $this->beforeFilter('csrf', ['only' => ['postCachet']]); @@ -9,6 +14,7 @@ class SetupController extends Controller /** * Returns the setup page. + * * @return \Illuminate\View\View */ public function getIndex() @@ -20,6 +26,7 @@ class SetupController extends Controller /** * Handles the actual app setup. + * * @return \Illuminate\Http\RedirectResponse */ public function postIndex()