CS fixes
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Logs users into their account
|
||||
* Logs users into their account.
|
||||
*/
|
||||
class AuthController extends Controller
|
||||
{
|
||||
/**
|
||||
* Shows the login view.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function showLogin()
|
||||
@@ -16,6 +17,7 @@ class AuthController extends Controller
|
||||
|
||||
/**
|
||||
* Logs the user in.
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function postLogin()
|
||||
@@ -24,6 +26,7 @@ class AuthController extends Controller
|
||||
return Redirect::intended('dashboard');
|
||||
} else {
|
||||
Throttle::hit(Request::instance(), 10, 10);
|
||||
|
||||
return Redirect::back()
|
||||
->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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user