Passed
Push — master ( 89797d...489f27 )
by Luiz Kim
19:06 queued 17:03
created
src/Controller/CreateUserAction.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      *
27 27
      * @var Request
28 28
      */
29
-    private $request  = null;
29
+    private $request = null;
30 30
 
31 31
     /**
32 32
      * Security
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,9 @@
 block discarded – undo
119 119
                 'id' => $user->getId()
120 120
             ];
121 121
         } catch (\Exception $e) {
122
-            if ($this->manager->getConnection()->isTransactionActive())
123
-                $this->manager->getConnection()->rollBack();
122
+            if ($this->manager->getConnection()->isTransactionActive()) {
123
+                            $this->manager->getConnection()->rollBack();
124
+            }
124 125
 
125 126
             throw new \InvalidArgumentException($e->getMessage());
126 127
         }
Please login to merge, or discard this patch.
src/Controller/DeleteUserAction.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @var Request
28 28
      */
29
-    private $request  = null;
29
+    private $request = null;
30 30
 
31 31
     /**
32 32
      * Security
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
                 throw new \InvalidArgumentException('Document id is not defined');
97 97
             }
98 98
 
99
-            $users   = $this->manager->getRepository(User::class)->findBy(['people' => $person]);
99
+            $users = $this->manager->getRepository(User::class)->findBy(['people' => $person]);
100 100
             if (count($users) == 1) {
101 101
                 throw new \InvalidArgumentException('Deve existir pelo menos um usuário');
102 102
             }
103 103
 
104
-            $user    = $this->manager->getRepository(User::class)->findOneBy(['id' => $payload['id'], 'people' => $person]);
104
+            $user = $this->manager->getRepository(User::class)->findOneBy(['id' => $payload['id'], 'people' => $person]);
105 105
             if (!$user instanceof User) {
106 106
                 throw new \InvalidArgumentException('Person user was not found');
107 107
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,8 +113,9 @@
 block discarded – undo
113 113
 
114 114
             return true;
115 115
         } catch (\Exception $e) {
116
-            if ($this->manager->getConnection()->isTransactionActive())
117
-                $this->manager->getConnection()->rollBack();
116
+            if ($this->manager->getConnection()->isTransactionActive()) {
117
+                            $this->manager->getConnection()->rollBack();
118
+            }
118 119
 
119 120
             throw new \InvalidArgumentException($e->getMessage());
120 121
         }
Please login to merge, or discard this patch.
src/Repository/ClientRepository.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -112,31 +112,31 @@  discard block
 block discarded – undo
112 112
 
113 113
             case 'active':
114 114
 
115
-                $queryBuilder->innerJoin(SalesOrder::class,     'O'  , 'WITH', 'O.client = myclients.id');
116
-                $queryBuilder->innerJoin(People::class,         'C'  , 'WITH', 'C.id = O.provider');
115
+                $queryBuilder->innerJoin(SalesOrder::class, 'O', 'WITH', 'O.client = myclients.id');
116
+                $queryBuilder->innerJoin(People::class, 'C', 'WITH', 'C.id = O.provider');
117 117
                 $queryBuilder->innerJoin(PeopleSalesman::class, 'kkk', 'WITH', 'kkk.company = C.id');
118
-                $queryBuilder->innerJoin(People::class,         'S'  , 'WITH', 'S.id = kkk.salesman');
119
-                $queryBuilder->innerJoin(PeopleClient::class,   'PC' , 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
118
+                $queryBuilder->innerJoin(People::class, 'S', 'WITH', 'S.id = kkk.salesman');
119
+                $queryBuilder->innerJoin(PeopleClient::class, 'PC', 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
120 120
                 $queryBuilder->andWhere('O.provider = :provider');
121 121
                 $queryBuilder->andWhere('S.id IN (:my_companies)');
122 122
                 $queryBuilder->andWhere('O.status NOT IN (:statuses)');
123 123
                 $queryBuilder->andWhere('O.orderDate BETWEEN :from_date AND :to_date');
124
-                $queryBuilder->setParameter('provider'    , $provider);
125
-                $queryBuilder->setParameter('statuses'    , $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open','canceled']]));
126
-                $queryBuilder->setParameter('from_date'   , $fromDate);
127
-                $queryBuilder->setParameter('to_date'     , $toDate);
124
+                $queryBuilder->setParameter('provider', $provider);
125
+                $queryBuilder->setParameter('statuses', $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open', 'canceled']]));
126
+                $queryBuilder->setParameter('from_date', $fromDate);
127
+                $queryBuilder->setParameter('to_date', $toDate);
128 128
                 $queryBuilder->setParameter('my_companies', $this->getMyCompanies($salesman));
129 129
 
130 130
             break;
131 131
 
132 132
             case 'inactive':
133 133
 
134
-                $queryBuilder->innerJoin(SalesOrder::class,     'O'  , 'WITH', 'O.client = myclients.id');
135
-                $queryBuilder->innerJoin(People::class,         'C'  , 'WITH', 'C.id = O.provider');
134
+                $queryBuilder->innerJoin(SalesOrder::class, 'O', 'WITH', 'O.client = myclients.id');
135
+                $queryBuilder->innerJoin(People::class, 'C', 'WITH', 'C.id = O.provider');
136 136
                 $queryBuilder->innerJoin(PeopleSalesman::class, 'kkk', 'WITH', 'kkk.company = C.id');
137
-                $queryBuilder->innerJoin(People::class,         'S'  , 'WITH', 'S.id = kkk.salesman');
138
-                $queryBuilder->innerJoin(PeopleClient::class,   'PC' , 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
139
-                $queryBuilder->leftJoin (SalesOrder::class,     'jj' , 'WITH', 'jj.client = myclients.id
137
+                $queryBuilder->innerJoin(People::class, 'S', 'WITH', 'S.id = kkk.salesman');
138
+                $queryBuilder->innerJoin(PeopleClient::class, 'PC', 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
139
+                $queryBuilder->leftJoin(SalesOrder::class, 'jj', 'WITH', 'jj.client = myclients.id
140 140
                                                                              AND   (jj.status NOT IN (:statuses) OR jj.id IS NULL)
141 141
                                                                              AND   ((jj.orderDate  BETWEEN  :from_date AND :to_date) OR jj.id IS NULL)
142 142
                                                                              AND   (jj.provider = :provider  OR jj.id IS NULL)');
@@ -147,23 +147,23 @@  discard block
 block discarded – undo
147 147
                 $queryBuilder->groupBy('myclients.id');
148 148
                 $queryBuilder->having('COUNT(jj.id) > :count');
149 149
                 $queryBuilder->andHaving('COUNT(O.id) = :count');
150
-                $queryBuilder->setParameter('provider' , $provider);
151
-                $queryBuilder->setParameter('statuses' , $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open','canceled']]));
150
+                $queryBuilder->setParameter('provider', $provider);
151
+                $queryBuilder->setParameter('statuses', $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open', 'canceled']]));
152 152
                 $queryBuilder->setParameter('from_date', $fromDate);
153
-                $queryBuilder->setParameter('to_date'  , $toDate);
154
-                $queryBuilder->setParameter('count'    , 0);
153
+                $queryBuilder->setParameter('to_date', $toDate);
154
+                $queryBuilder->setParameter('count', 0);
155 155
                 $queryBuilder->setParameter('my_companies', $this->getMyCompanies($salesman));
156 156
 
157 157
             break;
158 158
 
159 159
             case 'prospect':
160 160
 
161
-                $queryBuilder->innerJoin(SalesOrder::class,     'O' , 'WITH', 'O.client = myclients.id');
162
-                $queryBuilder->innerJoin(People::class,         'C' , 'WITH', 'C.id = O.provider');
161
+                $queryBuilder->innerJoin(SalesOrder::class, 'O', 'WITH', 'O.client = myclients.id');
162
+                $queryBuilder->innerJoin(People::class, 'C', 'WITH', 'C.id = O.provider');
163 163
                 $queryBuilder->innerJoin(PeopleSalesman::class, 'PS', 'WITH', 'PS.company = C.id');
164
-                $queryBuilder->innerJoin(People::class,         'S' , 'WITH', 'S.id = PS.salesman');
165
-                $queryBuilder->innerJoin(PeopleClient::class,   'PC', 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
166
-                $queryBuilder->leftJoin (SalesOrder::class,     'jj' , 'WITH', 'jj.client = myclients.id
164
+                $queryBuilder->innerJoin(People::class, 'S', 'WITH', 'S.id = PS.salesman');
165
+                $queryBuilder->innerJoin(PeopleClient::class, 'PC', 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
166
+                $queryBuilder->leftJoin(SalesOrder::class, 'jj', 'WITH', 'jj.client = myclients.id
167 167
                                                                              AND   (jj.status NOT IN (:statuses) OR jj.id IS NULL)                                                                             
168 168
                                                                              AND   (jj.provider = :provider  OR jj.id IS NULL)');
169 169
                 $queryBuilder->andWhere('O.provider = :provider');
@@ -173,19 +173,19 @@  discard block
 block discarded – undo
173 173
                 $queryBuilder->having('COUNT(jj.id) = :count');
174 174
 
175 175
                 $queryBuilder->setParameter('provider', $provider);
176
-                $queryBuilder->setParameter('statuses', $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open','canceled']]));
177
-                $queryBuilder->setParameter('count'   , 0);
176
+                $queryBuilder->setParameter('statuses', $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open', 'canceled']]));
177
+                $queryBuilder->setParameter('count', 0);
178 178
                 $queryBuilder->setParameter('my_companies', $this->getMyCompanies($salesman));
179 179
 
180 180
             break;
181 181
 
182 182
             case 'new':
183 183
 
184
-                $queryBuilder->innerJoin(SalesOrder::class,     'O'  , 'WITH', 'O.client = myclients.id');
185
-                $queryBuilder->innerJoin(People::class,         'C'  , 'WITH', 'C.id = O.provider');
184
+                $queryBuilder->innerJoin(SalesOrder::class, 'O', 'WITH', 'O.client = myclients.id');
185
+                $queryBuilder->innerJoin(People::class, 'C', 'WITH', 'C.id = O.provider');
186 186
                 $queryBuilder->innerJoin(PeopleSalesman::class, 'kkk', 'WITH', 'kkk.company = C.id');
187
-                $queryBuilder->innerJoin(People::class,         'S'  , 'WITH', 'S.id = kkk.salesman');
188
-                $queryBuilder->innerJoin(PeopleClient::class,   'PC' , 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
187
+                $queryBuilder->innerJoin(People::class, 'S', 'WITH', 'S.id = kkk.salesman');
188
+                $queryBuilder->innerJoin(PeopleClient::class, 'PC', 'WITH', 'PC.client = myclients.id AND PC.company_id = S.id');
189 189
 
190 190
                 $queryBuilder->andWhere('O.provider = :provider');
191 191
                 $queryBuilder->andWhere('S.id IN (:my_companies)');
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
                 $queryBuilder->andWhere('O.orderDate    BETWEEN :from_date AND :to_date');
194 194
                 $queryBuilder->andWhere('myclients.registerDate BETWEEN :from_date AND :to_date');
195 195
 
196
-                $queryBuilder->setParameter('provider'    , $provider);
197
-                $queryBuilder->setParameter('statuses'    , $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open','canceled']]));
198
-                $queryBuilder->setParameter('from_date'   , $fromDate);
199
-                $queryBuilder->setParameter('to_date'     , $toDate);
196
+                $queryBuilder->setParameter('provider', $provider);
197
+                $queryBuilder->setParameter('statuses', $this->getEntityManager()->getRepository(Status::class)->findBy(['realStatus' => ['open', 'canceled']]));
198
+                $queryBuilder->setParameter('from_date', $fromDate);
199
+                $queryBuilder->setParameter('to_date', $toDate);
200 200
                 $queryBuilder->setParameter('my_companies', $this->getMyCompanies($salesman));
201 201
 
202 202
             break;
Please login to merge, or discard this patch.
src/Service/PeopleRoleService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
    *
31 31
    * @var PeopleService
32 32
    */
33
-  private $people  = null;
33
+  private $people = null;
34 34
 
35 35
   public function __construct(
36 36
     EntityManagerInterface $entityManager,
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,8 +64,9 @@  discard block
 block discarded – undo
64 64
     $mainCompany = $this->getMainCompany();
65 65
 
66 66
     $isSuper = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $people, 'employee', 1);
67
-    if ($isSuper) 
68
-      $peopleRole[] = 'super';
67
+    if ($isSuper) {
68
+          $peopleRole[] = 'super';
69
+    }
69 70
 
70 71
     $isFranchisee = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $people, 'franchisee', 1);
71 72
     if ($isFranchisee) {
@@ -74,13 +75,15 @@  discard block
 block discarded – undo
74 75
     }
75 76
 
76 77
     $isClient = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $people, 'client', 1);
77
-    if ($isClient) 
78
-      $peopleRole[] = 'client';
78
+    if ($isClient) {
79
+          $peopleRole[] = 'client';
80
+    }
79 81
     
80 82
 
81 83
     $isSalesman = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $people, 'salesman', 1);
82
-    if ($isSalesman) 
83
-      $peopleRole[] = 'salesman';
84
+    if ($isSalesman) {
85
+          $peopleRole[] = 'salesman';
86
+    }
84 87
     
85 88
 
86 89
     return array_values(array_unique(empty($peopleRole) ? ['guest'] : $peopleRole));
@@ -96,10 +99,11 @@  discard block
 block discarded – undo
96 99
     $domain  = $_SERVER['HTTP_HOST'];
97 100
     $company = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]);
98 101
 
99
-    if ($company === null)
100
-      throw new \Exception(
102
+    if ($company === null) {
103
+          throw new \Exception(
101 104
         sprintf('Main company "%s" not found', $domain)
102 105
       );
106
+    }
103 107
 
104 108
     return $company->getPeople();
105 109
   }
Please login to merge, or discard this patch.
src/Repository/PeopleRepository.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     }
42 42
 
43 43
 
44
-    public function getCompanyPeopleLinks(People $company,  People $people, $linkType = null, $maxResults = null)
44
+    public function getCompanyPeopleLinks(People $company, People $people, $linkType = null, $maxResults = null)
45 45
     {
46 46
         $queryBuilder = $this->getEntityManager()->createQueryBuilder();
47 47
         $queryBuilder->select('pl')
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
51 51
             ->setParameter('company', $company->getId())
52 52
             ->setParameter('people', $people->getId());
53 53
 
54
-        if ($linkType)
55
-            $queryBuilder->setParameter('linkType', $linkType)->andWhere('pl.link_type = :linkType');
54
+        if ($linkType) {
55
+                    $queryBuilder->setParameter('linkType', $linkType)->andWhere('pl.link_type = :linkType');
56
+        }
56 57
 
57 58
         if ($maxResults) {
58 59
             $queryBuilder->setMaxResults($maxResults);
Please login to merge, or discard this patch.
src/Controller/GetDefaultCompanyAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
           'logo'       => $this->company->getPeople()->getFile() ? [
70 70
             'id'     => $this->company->getPeople()->getFile()->getId(),
71 71
             'domain' => $_SERVER['HTTP_HOST'],
72
-            'url'    => '/files/download/' . $this->company->getPeople()->getFile()->getId()
72
+            'url'    => '/files/download/'.$this->company->getPeople()->getFile()->getId()
73 73
           ] : null,
74 74
         ];
75 75
       }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
       'background'  =>  $this->company->getTheme()->getBackground() ? [
108 108
         'id'     =>  $this->company->getTheme()->getBackground(),
109 109
         'domain' => $_SERVER['HTTP_HOST'],
110
-        'url'    => '/files/download/' .  $this->company->getTheme()->getBackground()
110
+        'url'    => '/files/download/'.$this->company->getTheme()->getBackground()
111 111
       ] : null,
112 112
     ];
113 113
   }
Please login to merge, or discard this patch.
src/Controller/GetMyCompaniesAction.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
   public function __construct(Security $security, EntityManagerInterface $entityManager, PeopleRoleService $roles)
28 28
   {
29 29
     $this->security = $security;
30
-    $this->em      = $entityManager;
30
+    $this->em = $entityManager;
31 31
     $this->roles = $roles;
32 32
   }
33 33
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             }
135 135
           }
136 136
 
137
-          $peopleemployee =   $this->em->getRepository(PeopleLink::class)->findOneBy(['company' => $company, 'employee' => $userPeople]);
137
+          $peopleemployee = $this->em->getRepository(PeopleLink::class)->findOneBy(['company' => $company, 'employee' => $userPeople]);
138 138
 
139 139
           $permissions[$company->getId()][] = 'salesman';
140 140
           $myCompanies[$company->getId()] = [
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $myCompanies[$key]['permission'] = array_values($permission);
163 163
       }
164 164
 
165
-      usort($myCompanies, function ($a, $b) {
165
+      usort($myCompanies, function($a, $b) {
166 166
 
167 167
         if ($a['alias'] == $b['alias']) {
168 168
           return 0;
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
         $p_m[$package_module->getId()]['module'] = $package_module->getModule()->getName();
209 209
       }
210 210
 
211
-      $packages[$people_package->getId()]['id']                   =  $people_package->getId();
212
-      $packages[$people_package->getId()]['package']['id']        =  $package->getId();
213
-      $packages[$people_package->getId()]['package']['name']      =  $package->getName();
214
-      $packages[$people_package->getId()]['package']['active']    =  $package->isActive() ? true : false;
215
-      $packages[$people_package->getId()]['package']['modules']   =  $p_m;
211
+      $packages[$people_package->getId()]['id']                   = $people_package->getId();
212
+      $packages[$people_package->getId()]['package']['id']        = $package->getId();
213
+      $packages[$people_package->getId()]['package']['name']      = $package->getName();
214
+      $packages[$people_package->getId()]['package']['active']    = $package->isActive() ? true : false;
215
+      $packages[$people_package->getId()]['package']['modules']   = $p_m;
216 216
     }
217 217
 
218 218
     return $packages;
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     /**
248 248
      * @var \ControleOnline\Entity\Document $document
249 249
      */
250
-    $documents = $documents->filter(function ($document) {
250
+    $documents = $documents->filter(function($document) {
251 251
       return $document->getDocumentType()->getDocumentType() == 'CNPJ';
252 252
     });
253 253
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
       return [
261 261
         'id'     => $company->getFile()->getId(),
262 262
         'domain' => $_SERVER['HTTP_HOST'],
263
-        'url'    => '/files/download/' . $company->getFile()->getId()
263
+        'url'    => '/files/download/'.$company->getFile()->getId()
264 264
       ];
265 265
 
266 266
     return null;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -256,12 +256,13 @@
 block discarded – undo
256 256
 
257 257
   private function getLogo(People $company): ?array
258 258
   {
259
-    if ($company->getFile() instanceof File)
260
-      return [
259
+    if ($company->getFile() instanceof File) {
260
+          return [
261 261
         'id'     => $company->getFile()->getId(),
262 262
         'domain' => $_SERVER['HTTP_HOST'],
263 263
         'url'    => '/files/download/' . $company->getFile()->getId()
264 264
       ];
265
+    }
265 266
 
266 267
     return null;
267 268
   }
Please login to merge, or discard this patch.
src/Entity/People.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -316,15 +316,15 @@  discard block
 block discarded – undo
316 316
     public function __construct()
317 317
     {
318 318
         $this->enable = 0;
319
-        $this->registerDate =            new \DateTime('now');
320
-        $this->company =            new \Doctrine\Common\Collections\ArrayCollection();
321
-        $this->config =            new \Doctrine\Common\Collections\ArrayCollection();
322
-        $this->link =            new \Doctrine\Common\Collections\ArrayCollection();
323
-        $this->user =            new \Doctrine\Common\Collections\ArrayCollection();
324
-        $this->document =            new \Doctrine\Common\Collections\ArrayCollection();
325
-        $this->address =            new \Doctrine\Common\Collections\ArrayCollection();
326
-        $this->email =            new \Doctrine\Common\Collections\ArrayCollection();
327
-        $this->phone =            new \Doctrine\Common\Collections\ArrayCollection();
319
+        $this->registerDate = new \DateTime('now');
320
+        $this->company = new \Doctrine\Common\Collections\ArrayCollection();
321
+        $this->config = new \Doctrine\Common\Collections\ArrayCollection();
322
+        $this->link = new \Doctrine\Common\Collections\ArrayCollection();
323
+        $this->user = new \Doctrine\Common\Collections\ArrayCollection();
324
+        $this->document = new \Doctrine\Common\Collections\ArrayCollection();
325
+        $this->address = new \Doctrine\Common\Collections\ArrayCollection();
326
+        $this->email = new \Doctrine\Common\Collections\ArrayCollection();
327
+        $this->phone = new \Doctrine\Common\Collections\ArrayCollection();
328 328
         $this->otherInformations = json_encode(
329 329
             new stdClass()
330 330
         );
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
     }
583 583
     public function getOneDocument(): ?Document
584 584
     {
585
-        $documents = $this->getDocument()->filter(function ($peopleDocument) {
585
+        $documents = $this->getDocument()->filter(function($peopleDocument) {
586 586
             if ($peopleDocument->getPeople()->getPeopleType() == 'F') {
587 587
                 return $peopleDocument->getDocumentType()->getDocumentType() == 'CPF';
588 588
             }
Please login to merge, or discard this patch.