Passed
Push — master ( 2e2fef...b633b9 )
by Luiz Kim
02:18
created
src/Service/PeopleService.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
     $payload   = json_decode($request->getContent());
34 34
     if (isset($payload->link_type)) {
35 35
       $company = $this->manager->getRepository(People::class)->find(preg_replace('/\D/', '', $payload->company));
36
-      if ($company)
37
-        $this->addLink($company, $people, $payload->link_type);
38
-      else {
36
+      if ($company) {
37
+              $this->addLink($company, $people, $payload->link_type);
38
+      } else {
39 39
         $link = $this->manager->getRepository(People::class)->find(preg_replace('/\D/', '', $payload->link));
40 40
         if ($payload->link_type == 'employee' && $link) {
41 41
           $this->addLink($people, $link, $payload->link_type);
@@ -63,8 +63,9 @@  discard block
 block discarded – undo
63 63
       'link_type' => $link_type
64 64
     ]);
65 65
 
66
-    if (!$peopleLink)
67
-      $peopleLink = new PeopleLink();
66
+    if (!$peopleLink) {
67
+          $peopleLink = new PeopleLink();
68
+    }
68 69
 
69 70
     $peopleLink->setCompany($company);
70 71
     $peopleLink->setPeople($people);
Please login to merge, or discard this patch.