From 42d69a95f3276a2d6089ca68f635c4e2f6aa7a23 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 21 Oct 2014 16:45:36 +0200 Subject: convert tabs indention to indention with 4 spaces because of mixing of both variants in code and better readability on github and websites because you cant set the indention width there and 8 spaces will be used for a tab --- controller/exportcontroller.php | 102 ++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 51 deletions(-) (limited to 'controller/exportcontroller.php') diff --git a/controller/exportcontroller.php b/controller/exportcontroller.php index b455f2fcc..1d0f7086c 100644 --- a/controller/exportcontroller.php +++ b/controller/exportcontroller.php @@ -26,64 +26,64 @@ use \OCA\News\Utility\OPMLExporter; class ExportController extends Controller { - private $opmlExporter; - private $folderService; - private $feedService; - private $itemService; - private $userId; + private $opmlExporter; + private $folderService; + private $feedService; + private $itemService; + private $userId; - public function __construct($appName, - IRequest $request, - FolderService $folderService, - FeedService $feedService, - ItemService $itemService, - OPMLExporter $opmlExporter, - $userId){ - parent::__construct($appName, $request); - $this->feedService = $feedService; - $this->folderService = $folderService; - $this->opmlExporter = $opmlExporter; - $this->itemService = $itemService; - $this->userId = $userId; - } + public function __construct($appName, + IRequest $request, + FolderService $folderService, + FeedService $feedService, + ItemService $itemService, + OPMLExporter $opmlExporter, + $userId){ + parent::__construct($appName, $request); + $this->feedService = $feedService; + $this->folderService = $folderService; + $this->opmlExporter = $opmlExporter; + $this->itemService = $itemService; + $this->userId = $userId; + } - /** - * @NoAdminRequired - * @NoCSRFRequired - */ - public function opml(){ - $feeds = $this->feedService->findAll($this->userId); - $folders = $this->folderService->findAll($this->userId); - $opml = $this->opmlExporter->build($folders, $feeds)->saveXML(); - return new TextDownloadResponse($opml, 'subscriptions.opml', 'text/xml'); - } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ + public function opml(){ + $feeds = $this->feedService->findAll($this->userId); + $folders = $this->folderService->findAll($this->userId); + $opml = $this->opmlExporter->build($folders, $feeds)->saveXML(); + return new TextDownloadResponse($opml, 'subscriptions.opml', 'text/xml'); + } - /** - * @NoAdminRequired - * @NoCSRFRequired - */ - public function articles(){ - $feeds = $this->feedService->findAll($this->userId); - $items = $this->itemService->getUnreadOrStarred($this->userId); + /** + * @NoAdminRequired + * @NoCSRFRequired + */ + public function articles(){ + $feeds = $this->feedService->findAll($this->userId); + $items = $this->itemService->getUnreadOrStarred($this->userId); - // build assoc array for fast access - $feedsDict = []; - foreach($feeds as $feed) { - $feedsDict['feed' . $feed->getId()] = $feed; - } + // build assoc array for fast access + $feedsDict = []; + foreach($feeds as $feed) { + $feedsDict['feed' . $feed->getId()] = $feed; + } - $articles = []; - foreach($items as $item) { - $articles[] = $item->toExport($feedsDict); - } - - $response = new JSONResponse($articles); - $response->addHeader('Content-Disposition', - 'attachment; filename="articles.json"'); - return $response; - } + $articles = []; + foreach($items as $item) { + $articles[] = $item->toExport($feedsDict); + } + + $response = new JSONResponse($articles); + $response->addHeader('Content-Disposition', + 'attachment; filename="articles.json"'); + return $response; + } } \ No newline at end of file -- cgit v1.2.3