@@ -57,7 +57,7 @@ |
||
57 | 57 | { |
58 | 58 | if (self::$peopleDomain) return self::$peopleDomain; |
59 | 59 | |
60 | - $domain = $this->getMainDomain(); |
|
60 | + $domain = $this->getMainDomain(); |
|
61 | 61 | self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]); |
62 | 62 | |
63 | 63 | if (self::$peopleDomain === null) |
@@ -43,8 +43,9 @@ discard block |
||
43 | 43 | ) |
44 | 44 | )); |
45 | 45 | |
46 | - if (!$domain) |
|
47 | - throw new InvalidArgumentException('Please define header or get param "app-domain"', 301); |
|
46 | + if (!$domain) { |
|
47 | + throw new InvalidArgumentException('Please define header or get param "app-domain"', 301); |
|
48 | + } |
|
48 | 49 | return $domain; |
49 | 50 | } |
50 | 51 | |
@@ -55,15 +56,18 @@ discard block |
||
55 | 56 | |
56 | 57 | public function getPeopleDomain(): PeopleDomain |
57 | 58 | { |
58 | - if (self::$peopleDomain) return self::$peopleDomain; |
|
59 | + if (self::$peopleDomain) { |
|
60 | + return self::$peopleDomain; |
|
61 | + } |
|
59 | 62 | |
60 | 63 | $domain = $this->getMainDomain(); |
61 | 64 | self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]); |
62 | 65 | |
63 | - if (self::$peopleDomain === null) |
|
64 | - throw new \Exception( |
|
66 | + if (self::$peopleDomain === null) { |
|
67 | + throw new \Exception( |
|
65 | 68 | sprintf('Main company "%s" not found', $domain) |
66 | 69 | ); |
70 | + } |
|
67 | 71 | |
68 | 72 | return self::$peopleDomain; |
69 | 73 | } |