@@ 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 |
@@ 92-103 (lines=12) @@ | ||
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 | return new AnonymusUserVO(); |
|
99 | } |
|
100 | } else { |
|
101 | return new AnonymusUserVO(); |
|
102 | } |
|
103 | } |
|
104 | } |
|
105 |