Passed
Push — master ( 9ff6b8...2a3609 )
by Luiz Kim
29:19 queued 27:01
created
src/Service/PeopleService.php 1 patch
Braces   +12 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,8 +39,9 @@  discard block
 block discarded – undo
39 39
   {
40 40
 
41 41
     $document = $this->manager->getRepository(Document::class)->findOneBy(['document' => $document_number]);
42
-    if ($document)
43
-      return $document->getPeople();
42
+    if ($document) {
43
+          return $document->getPeople();
44
+    }
44 45
 
45 46
 
46 47
     if ($name) {
@@ -72,9 +73,9 @@  discard block
 block discarded – undo
72 73
     $payload   = json_decode($request->getContent());
73 74
     if (isset($payload->link_type)) {
74 75
       $company = $this->manager->getRepository(People::class)->find(preg_replace('/\D/', '', $payload->company));
75
-      if ($company)
76
-        $this->addLink($company, $people, $payload->link_type);
77
-      else {
76
+      if ($company) {
77
+              $this->addLink($company, $people, $payload->link_type);
78
+      } else {
78 79
         $link = $this->manager->getRepository(People::class)->find(preg_replace('/\D/', '', $payload->link));
79 80
         if ($payload->link_type == 'employee' && $link) {
80 81
           $this->addLink($people, $link, $payload->link_type);
@@ -102,8 +103,9 @@  discard block
 block discarded – undo
102 103
       'link_type' => $link_type
103 104
     ]);
104 105
 
105
-    if (!$peopleLink)
106
-      $peopleLink = new PeopleLink();
106
+    if (!$peopleLink) {
107
+          $peopleLink = new PeopleLink();
108
+    }
107 109
 
108 110
     $peopleLink->setCompany($company);
109 111
     $peopleLink->setPeople($people);
@@ -158,8 +160,9 @@  discard block
 block discarded – undo
158 160
      */
159 161
     $currentUser  = $this->security->getToken()->getUser();
160 162
     $companies    = [];
161
-    if (!$currentUser)
162
-      return [];
163
+    if (!$currentUser) {
164
+          return [];
165
+    }
163 166
 
164 167
     if (!$currentUser->getPeople()->getLink()->isEmpty()) {
165 168
       foreach ($currentUser->getPeople()->getLink() as $company) {
Please login to merge, or discard this patch.