Passed
Push — master ( 1905c5...4fe93c )
by Nicolaas
39:02 queued 02:30
created
src/Control/HiddenDownloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@
 block discarded – undo
20 20
 
21 21
     public function download(HTTPRequest $request)
22 22
     {
23
-        if(! Permission::check('ADMIN')) {
23
+        if (!Permission::check('ADMIN')) {
24 24
             return Security::permissionFailure($this);
25 25
         }
26
-        $fileName = $this->request->param('ID').'.csv';
26
+        $fileName = $this->request->param('ID') . '.csv';
27 27
         $hiddenDownloadDir = Config::inst()->get(ArrayToCSV::class, 'hidden_download_dir') ?: '_csv_download_dir';
28 28
         $path = Controller::join_links(Director::baseFolder(), $hiddenDownloadDir, $fileName);
29 29
         return HTTPRequest::send_file(file_get_contents($path), $fileName, 'text/csv');
Please login to merge, or discard this patch.
src/Api/ArrayToCSV.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@
 block discarded – undo
242 242
         }
243 243
         if ($this->hiddenFile) {
244 244
             if ($returnLinkOnly) {
245
-                return '/downloadcsv/download/'.$this->fileName;
245
+                return '/downloadcsv/download/' . $this->fileName;
246 246
             } else {
247 247
                 return HTTPRequest::send_file(file_get_contents($path), $this->fileName, 'text/csv');
248 248
             }
Please login to merge, or discard this patch.