Completed
Pull Request — master (#42)
by Nemanja
01:57
created
src/Admin/Controller/AuthController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     /**
99 99
      * Clears user session.
100 100
      *
101
-     * @return static
101
+     * @return \Psr\Http\Message\ResponseInterface
102 102
      */
103 103
     public function logout() : \Psr\Http\Message\ResponseInterface
104 104
     {
Please login to merge, or discard this patch.
src/Core/Middleware/Error.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
     /**
33 33
      * Invoked on middleware execution.
34 34
      *
35
-     * @param mixed $exception   exception
36 35
      * @param Request $request   request
37 36
      * @param Response $response response
38 37
      * @return HtmlResponse
Please login to merge, or discard this patch.
src/Core/Service/AdminUserService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
      * Update or Insert user.
107 107
      *
108 108
      * @param Array $data  Data from POST
109
-     * @param null $userId UUID of user if we want to edit or 0 to add new user
109
+     * @param integer $userId UUID of user if we want to edit or 0 to add new user
110 110
      * @throws \Exception
111 111
      */
112 112
     public function save($data, $userId = 0)
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,15 +114,13 @@
 block discarded – undo
114 114
         //@todo Validate data
115 115
         if($data['password'] == ''){
116 116
             unset($data['password']);
117
-        }
118
-        else{
117
+        } else{
119 118
             $data['password'] = $this->crypt->create($data['password']);
120 119
         }
121 120
 
122 121
         if($userId){
123 122
             $this->adminUsersMapper->update($data, ['admin_user_uuid' => $userId]);
124
-        }
125
-        else{
123
+        } else{
126 124
             $data['admin_user_uuid'] = Uuid::uuid1()->toString();
127 125
             $this->adminUsersMapper->insert($data);
128 126
         }
Please login to merge, or discard this patch.
src/Admin/Controller/UserController.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,8 +99,7 @@  discard block
 block discarded – undo
99 99
             $this->adminUserService->save($data, $userId);
100 100
 
101 101
             return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users'));
102
-        }
103
-        catch(\Exception $e){
102
+        } catch(\Exception $e){
104 103
             return $this->response->withStatus(302)->withHeader(
105 104
                 'Location',
106 105
                 $this->router->generateUri('admin.users.action', ['action' => 'edit', 'id' => $userId])
@@ -115,8 +114,7 @@  discard block
 block discarded – undo
115 114
             $this->adminUserService->delete($userId);
116 115
 
117 116
             return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users'));
118
-        }
119
-        catch(\Exception $e){
117
+        } catch(\Exception $e){
120 118
             return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users'));
121 119
         }
122 120
     }
Please login to merge, or discard this patch.