summaryrefslogtreecommitdiffstats
path: root/lib/Controller/ExportController.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-01-28 22:32:49 +0100
committerGitHub <noreply@github.com>2019-01-28 22:32:49 +0100
commit9cd871983a368752d122a73da244606bdeba312f (patch)
treed1882e1e677d7cee12926e5688ccfbfd31a505f5 /lib/Controller/ExportController.php
parent31b2f194af74bdba60bdd2640e5fc47340157795 (diff)
parentbecce6b7520912257c3d72697a3aefec9923a467 (diff)
Merge pull request #382 from SMillerDev/codestyle_psr2
Define an official codestyle and adhere to it.
Diffstat (limited to 'lib/Controller/ExportController.php')
-rw-r--r--lib/Controller/ExportController.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Controller/ExportController.php b/lib/Controller/ExportController.php
index 07ce06f45..16bdfbd4e 100644
--- a/lib/Controller/ExportController.php
+++ b/lib/Controller/ExportController.php
@@ -33,7 +33,8 @@ class ExportController extends Controller
private $itemService;
private $userId;
- public function __construct($appName,
+ public function __construct(
+ $appName,
IRequest $request,
FolderService $folderService,
FeedService $feedService,
@@ -60,7 +61,7 @@ class ExportController extends Controller
$folders = $this->folderService->findAll($this->userId);
$opml = $this->opmlExporter->build($folders, $feeds)->saveXML();
$date = date('Y-m-d');
- $name = "subscriptions-".$date.".opml";
+ $name = "subscriptions-" . $date . ".opml";
$mimeType = 'text/xml';
return new TextDownloadResponse($opml, $name, $mimeType);
}
@@ -77,12 +78,12 @@ class ExportController extends Controller
// build assoc array for fast access
$feedsDict = [];
- foreach($feeds as $feed) {
+ foreach ($feeds as $feed) {
$feedsDict['feed' . $feed->getId()] = $feed;
}
$articles = [];
- foreach($items as $item) {
+ foreach ($items as $item) {
$articles[] = $item->toExport($feedsDict);
}
@@ -93,6 +94,4 @@ class ExportController extends Controller
);
return $response;
}
-
-
-} \ No newline at end of file
+}