@@ 92-102 (lines=11) @@ | ||
89 | * @param int $userId |
|
90 | * @return AnonymusUserVO|UserVO |
|
91 | */ |
|
92 | private function loadUser(int $userId) : UserVO |
|
93 | { |
|
94 | if ($userId > 0) { |
|
95 | try { |
|
96 | return $this->loadUser->loadUserById($userId); |
|
97 | } catch (UserNotFoundException $e) { |
|
98 | } |
|
99 | } |
|
100 | ||
101 | return new AnonymusUserVO(); |
|
102 | } |
|
103 | ||
104 | /** |
|
105 | * @param Request $request |
@@ 89-100 (lines=12) @@ | ||
86 | * @param int $userId |
|
87 | * @return AnonymusUserVO|UserVO |
|
88 | */ |
|
89 | private function loadUser(int $userId) : UserVO |
|
90 | { |
|
91 | if ($userId > 0) { |
|
92 | try { |
|
93 | return $this->loadUser->loadUserById($userId); |
|
94 | } catch (UserNotFoundException $e) { |
|
95 | return new AnonymusUserVO(); |
|
96 | } |
|
97 | } else { |
|
98 | return new AnonymusUserVO(); |
|
99 | } |
|
100 | } |
|
101 | } |
|
102 |