Passed
Push — master ( 35d424...d32fef )
by Luiz Kim
07:53
created
src/Controller/GetFileDataAction.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $this->manager = $entityManager;
36 36
     }
37 37
 
38
-    public function __invoke(File $data,  Request $request)
38
+    public function __invoke(File $data, Request $request)
39 39
     {
40 40
 
41 41
         try {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 
48 48
             $content  = $file->getContent();
49
-            $response = new StreamedResponse(function () use ($content) {
49
+            $response = new StreamedResponse(function() use ($content) {
50 50
                 fputs(fopen('php://output', 'wb'), $content);
51 51
             });
52 52
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,9 @@
 block discarded – undo
41 41
         try {
42 42
             $file = $data;
43 43
             //$file = $this->manager->getRepository(File::class)->findOneBy(['url' => $request->getPathInfo()]);
44
-            if (!$file)
45
-                throw new \Exception('Not found', 404);
44
+            if (!$file) {
45
+                            throw new \Exception('Not found', 404);
46
+            }
46 47
 
47 48
 
48 49
             $content  = $file->getContent();
Please login to merge, or discard this patch.