Passed
Push — master ( 871595...3b7c18 )
by Luiz Kim
06:33 queued 04:22
created
src/Service/ContractService.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@  discard block
 block discarded – undo
19 19
   public function genetateFromModel(Contract $data)
20 20
   {
21 21
     $file = $data->getContractFile();
22
-    if (!$file)
23
-      $file = new File();
22
+    if (!$file) {
23
+          $file = new File();
24
+    }
24 25
 
25 26
     $file->setFileType('text');
26 27
     $file->setExtension('html');
@@ -41,8 +42,9 @@  discard block
 block discarded – undo
41 42
   {
42 43
     $content = $contract->getContractFile()->getContent();
43 44
 
44
-    if ($contract->getContractFile()->getExtension() == 'pdf')
45
-      return $content;
45
+    if ($contract->getContractFile()->getExtension() == 'pdf') {
46
+          return $content;
47
+    }
46 48
 
47 49
     if (empty($content)) {
48 50
       throw new \Exception(
@@ -56,7 +58,8 @@  discard block
 block discarded – undo
56 58
 
57 59
   public function afterPersist(Contract $contract)
58 60
   {
59
-    if ($contract->getStatus()->getRealStatus() == 'open')
60
-      return  $this->genetateFromModel($contract);
61
+    if ($contract->getStatus()->getRealStatus() == 'open') {
62
+          return  $this->genetateFromModel($contract);
63
+    }
61 64
   }
62 65
 }
Please login to merge, or discard this patch.