@@ -88,7 +88,7 @@ |
||
| 88 | 88 | 'background' => $this->domainService->getPeopleDomain()->getTheme()->getBackground() ? [ |
| 89 | 89 | 'id' => $this->domainService->getPeopleDomain()->getTheme()->getBackground(), |
| 90 | 90 | 'domain' => $this->domainService->getMainDomain(), |
| 91 | - 'url' => '/files/' . $this->domainService->getPeopleDomain()->getTheme()->getBackground() . '/download' |
|
| 91 | + 'url' => '/files/'.$this->domainService->getPeopleDomain()->getTheme()->getBackground().'/download' |
|
| 92 | 92 | ] : null, |
| 93 | 93 | ]; |
| 94 | 94 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | if (self::$mainCompany) return self::$mainCompany; |
| 112 | 112 | |
| 113 | 113 | $peopleDomain = $this->domainService->getPeopleDomain(); |
| 114 | - self::$mainCompany = $peopleDomain->getPeople(); |
|
| 114 | + self::$mainCompany = $peopleDomain->getPeople(); |
|
| 115 | 115 | |
| 116 | 116 | return self::$mainCompany; |
| 117 | 117 | } |
@@ -35,7 +35,9 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | foreach ($getPeopleCompanies as $peopleCompany) { |
| 37 | 37 | $isFranchisee = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $peopleCompany->getCompany(), 'franchisee', 1); |
| 38 | - if ($isFranchisee) return true; |
|
| 38 | + if ($isFranchisee) { |
|
| 39 | + return true; |
|
| 40 | + } |
|
| 39 | 41 | } |
| 40 | 42 | return $isFranchisee; |
| 41 | 43 | } |
@@ -52,7 +54,9 @@ discard block |
||
| 52 | 54 | $isSalesman = false; |
| 53 | 55 | |
| 54 | 56 | $isSalesman = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $people, 'salesman', 1); |
| 55 | - if ($isSalesman) return true; |
|
| 57 | + if ($isSalesman) { |
|
| 58 | + return true; |
|
| 59 | + } |
|
| 56 | 60 | |
| 57 | 61 | $getPeopleCompanies = $this->manager->getRepository(PeopleLink::class)->findBy([ |
| 58 | 62 | 'people' => $people, |
@@ -63,7 +67,9 @@ discard block |
||
| 63 | 67 | */ |
| 64 | 68 | foreach ($getPeopleCompanies as $peopleCompany) { |
| 65 | 69 | $isSalesman = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $peopleCompany->getCompany(), 'salesman', 1); |
| 66 | - if ($isSalesman) return true; |
|
| 70 | + if ($isSalesman) { |
|
| 71 | + return true; |
|
| 72 | + } |
|
| 67 | 73 | } |
| 68 | 74 | return $isSalesman; |
| 69 | 75 | } |
@@ -76,8 +82,9 @@ discard block |
||
| 76 | 82 | $mainCompany = $this->getMainCompany(); |
| 77 | 83 | |
| 78 | 84 | $isSuper = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $people, 'employee', 1); |
| 79 | - if ($isSuper) |
|
| 80 | - $peopleRole[] = 'super'; |
|
| 85 | + if ($isSuper) { |
|
| 86 | + $peopleRole[] = 'super'; |
|
| 87 | + } |
|
| 81 | 88 | |
| 82 | 89 | |
| 83 | 90 | |
@@ -88,13 +95,15 @@ discard block |
||
| 88 | 95 | } |
| 89 | 96 | |
| 90 | 97 | $isClient = $this->manager->getRepository(People::class)->getCompanyPeopleLinks($mainCompany, $people, 'client', 1); |
| 91 | - if ($isClient) |
|
| 92 | - $peopleRole[] = 'client'; |
|
| 98 | + if ($isClient) { |
|
| 99 | + $peopleRole[] = 'client'; |
|
| 100 | + } |
|
| 93 | 101 | |
| 94 | 102 | |
| 95 | 103 | $isSalesman = $this->isSalesman($user); |
| 96 | - if ($isSalesman) |
|
| 97 | - $peopleRole[] = 'salesman'; |
|
| 104 | + if ($isSalesman) { |
|
| 105 | + $peopleRole[] = 'salesman'; |
|
| 106 | + } |
|
| 98 | 107 | |
| 99 | 108 | |
| 100 | 109 | return array_values(array_unique(empty($peopleRole) ? ['guest'] : $peopleRole)); |
@@ -108,7 +117,9 @@ discard block |
||
| 108 | 117 | public function getMainCompany(): People |
| 109 | 118 | { |
| 110 | 119 | |
| 111 | - if (self::$mainCompany) return self::$mainCompany; |
|
| 120 | + if (self::$mainCompany) { |
|
| 121 | + return self::$mainCompany; |
|
| 122 | + } |
|
| 112 | 123 | |
| 113 | 124 | $peopleDomain = $this->domainService->getPeopleDomain(); |
| 114 | 125 | self::$mainCompany = $peopleDomain->getPeople(); |