[Standards] Updated Codebase to reflect new coding standards. See CONTRIBUTING.md for standards.

This commit is contained in:
Thomas Coleman
2014-11-27 16:05:00 +00:00
parent f662352f66
commit 107a4c2a6e
30 changed files with 646 additions and 606 deletions
+25 -23
View File
@@ -1,27 +1,29 @@
<?php
class RSSController extends Controller {
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'),
]);
namespace CachetHQ\Cachet\Controllers;
Incident::get()->map(function($incident) use ($feed) {
$feed->item([
'title' => $incident->name,
'message' => $incident->message,
'component' => $incident->parent->name,
'status' => $incident->humanStatus,
'created_at' => $incident->created_at,
'updated_at' => $incident->updated_at
]);
});
class RSSController extends Controller {
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'),
]);
return Response::make($feed, 200, [
'Content-Type' => 'text/xml'
]);
}
}
Incident::get()->map(function($incident) use ($feed) {
$feed->item([
'title' => $incident->name,
'message' => $incident->message,
'component' => $incident->parent->name,
'status' => $incident->humanStatus,
'created_at' => $incident->created_at,
'updated_at' => $incident->updated_at
]);
});
return Response::make($feed, 200, [
'Content-Type' => 'text/xml'
]);
}
}