Completed
Branch master (31ca21)
by Natan
04:28
created
src/SnifferReport/Service/FilesHandler.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
   /**
52 52
    * Scans folder to get all files inside.
53 53
    *
54
-   * @param $dir
54
+   * @param string $dir
55 55
    *
56 56
    * @return array
57 57
    */
Please login to merge, or discard this patch.
src/SnifferReport/Controller/MainController.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,12 +40,10 @@  discard block
 block discarded – undo
40 40
       $file_name = $file->getClientOriginalName();
41 41
       $file->move(FILES_DIRECTORY_ROOT, $file_name);
42 42
       $files = FilesHandler::handle($file_name, $file->getClientMimeType());
43
-    }
44
-    else {
43
+    } else {
45 44
       try {
46 45
         $files = GitHandler::handle($git_url);
47
-      }
48
-      catch (Exception $e) {
46
+      } catch (Exception $e) {
49 47
         throw new SnifferReportException("Error when trying to clone git repository: {$e->getMessage()}", 500);
50 48
       }
51 49
     }
@@ -72,8 +70,7 @@  discard block
 block discarded – undo
72 70
     try {
73 71
       $sniffParser = new SniffParser($app['pdo']);
74 72
       $response = $sniffParser->parseSniff($sniff_result);
75
-    }
76
-    catch (\PDOException $e) {
73
+    } catch (\PDOException $e) {
77 74
       throw new SnifferReportException("Error when trying to save sniff: {$e->getMessage()}", 500);
78 75
     }
79 76
 
Please login to merge, or discard this patch.