@@ -51,8 +51,7 @@ |
||
51 | 51 | if($urlSlug2) { |
52 | 52 | $categorySlug = $urlSlug1; |
53 | 53 | $postSlug = $urlSlug2; |
54 | - } |
|
55 | - else { |
|
54 | + } else { |
|
56 | 55 | $categorySlug = null; |
57 | 56 | $postSlug = $urlSlug1; |
58 | 57 | } |
@@ -103,17 +103,14 @@ discard block |
||
103 | 103 | |
104 | 104 | if($userId) { |
105 | 105 | $this->adminUserService->updateUser($data, $userId); |
106 | - } |
|
107 | - else { |
|
106 | + } else { |
|
108 | 107 | $this->adminUserService->registerNewUser($data); |
109 | 108 | } |
110 | 109 | |
111 | 110 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
112 | - } |
|
113 | - catch(FilterException $fe) { |
|
111 | + } catch(FilterException $fe) { |
|
114 | 112 | return $this->edit($fe->getArrayMessages()); |
115 | - } |
|
116 | - catch(\Exception $e) { |
|
113 | + } catch(\Exception $e) { |
|
117 | 114 | throw $e; |
118 | 115 | } |
119 | 116 | } |
@@ -125,8 +122,7 @@ discard block |
||
125 | 122 | $this->adminUserService->delete($userId); |
126 | 123 | |
127 | 124 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
128 | - } |
|
129 | - catch(\Exception $e) { |
|
125 | + } catch(\Exception $e) { |
|
130 | 126 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
131 | 127 | } |
132 | 128 | } |