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