Passed
Push — master ( 2c1550...32625a )
by Luiz Kim
23:24 queued 21:04
created
src/Service/ContractService.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@  discard block
 block discarded – undo
20 20
   public function genetateFromModel(Contract $data)
21 21
   {
22 22
     $file = $data->getContractFile();
23
-    if (!$file)
24
-      $file = new File();
23
+    if (!$file) {
24
+          $file = new File();
25
+    }
25 26
 
26 27
     $file->setFileType('text');
27 28
     $file->setExtension('html');
@@ -46,8 +47,9 @@  discard block
 block discarded – undo
46 47
   {
47 48
     $content = $contract->getContractFile()->getContent();
48 49
 
49
-    if ($contract->getContractFile()->getExtension() == 'pdf')
50
-      return $content;
50
+    if ($contract->getContractFile()->getExtension() == 'pdf') {
51
+          return $content;
52
+    }
51 53
 
52 54
     if (empty($content)) {
53 55
       throw new \Exception(
@@ -61,7 +63,8 @@  discard block
 block discarded – undo
61 63
 
62 64
   public function postPersist(Contract $contract)
63 65
   {
64
-    if ($contract->getStatus()->getRealStatus() == 'open')
65
-      return  $this->genetateFromModel($contract);
66
+    if ($contract->getStatus()->getRealStatus() == 'open') {
67
+          return  $this->genetateFromModel($contract);
68
+    }
66 69
   }
67 70
 }
Please login to merge, or discard this patch.