Completed
Push — master ( 4f3de5...9b9e7a )
by Pavel
05:51
created
app/src/Controller/CrudController.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param Response $response
16 16
      * @param array    $args
17 17
      *
18
-     * @return mixed
18
+     * @return \Psr\Http\Message\ResponseInterface
19 19
      */
20 20
     public function actionIndex(Request $request, Response $response, $args)
21 21
     {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @param Response $response
88 88
      * @param array    $args
89 89
      *
90
-     * @return mixed
90
+     * @return \Psr\Http\Message\ResponseInterface
91 91
      * @throws JsonException
92 92
      */
93 93
     public function actionGet(Request $request, Response $response, $args)
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * @param Response $response
111 111
      * @param array    $args
112 112
      *
113
-     * @return mixed
113
+     * @return \Psr\Http\Message\ResponseInterface
114 114
      * @throws JsonException
115 115
      */
116 116
     public function actionCreate(Request $request, Response $response, $args)
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      * @param Response $response
134 134
      * @param array    $args
135 135
      *
136
-     * @return mixed
136
+     * @return \Psr\Http\Message\ResponseInterface
137 137
      * @throws JsonException
138 138
      */
139 139
     public function actionUpdate(Request $request, Response $response, $args)
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @param Response $response
163 163
      * @param array    $args
164 164
      *
165
-     * @return mixed
165
+     * @return \Psr\Http\Message\ResponseInterface
166 166
      * @throws JsonException
167 167
      */
168 168
     public function actionDelete(Request $request, Response $response, $args)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                         $query = $query->whereNotIn($filter['attribute'], $filter['value']);
45 45
                         break;
46 46
                     case 'like':
47
-                        $query = $query->where($filter['attribute'], 'like', '%' . $filter['value'] . '%');
47
+                        $query = $query->where($filter['attribute'], 'like', '%'.$filter['value'].'%');
48 48
                         break;
49 49
                     case '=':
50 50
                     case '!=':
Please login to merge, or discard this patch.
app/src/Controller/UserController.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * @param Response $response
20 20
      * @param array    $args
21 21
      *
22
-     * @return mixed
22
+     * @return \Psr\Http\Message\ResponseInterface
23 23
      * @throws JsonException
24 24
      */
25 25
     public function actionCreate(Request $request, Response $response, $args)
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param Response $response
49 49
      * @param array    $args
50 50
      *
51
-     * @return mixed
51
+     * @return \Psr\Http\Message\ResponseInterface
52 52
      * @throws JsonException
53 53
      */
54 54
     public function actionUpdate(Request $request, Response $response, $args)
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * @param Response $response
81 81
      * @param array    $args
82 82
      *
83
-     * @return mixed
83
+     * @return \Psr\Http\Message\ResponseInterface
84 84
      * @throws JsonException
85 85
      */
86 86
     public function actionRequestResetPassword(Request $request, Response $response, $args)
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @param Response $response
127 127
      * @param array    $args
128 128
      *
129
-     * @return mixed
129
+     * @return \Psr\Http\Message\ResponseInterface
130 130
      * @throws JsonException
131 131
      */
132 132
     public function actionResetPassword(Request $request, Response $response, $args)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
             $user->setPassword($params['data']['attributes']['password']);
142 142
             $user->removePasswordResetToken();
143 143
 
144
-            if($user->save()){
144
+            if ($user->save()) {
145 145
                 return $this->renderer->jsonApiRender($response, 204);
146 146
             };
147 147
         }
Please login to merge, or discard this patch.
app/src/Controller/BaseController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     /**
164 164
      * Register model observers
165 165
      */
166
-    private function registerModelObservers(){
166
+    private function registerModelObservers() {
167 167
         $observers = [
168 168
             Observers\CreatedByAndUpdatedByObserver::class => [
169 169
                 Model\Right::class,
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
             ]
179 179
         ];
180 180
 
181
-        foreach($observers as $observer => $models){
182
-            foreach($models as $model){
183
-                call_user_func($model. '::observe', $observer);
181
+        foreach ($observers as $observer => $models) {
182
+            foreach ($models as $model) {
183
+                call_user_func($model.'::observe', $observer);
184 184
             }
185 185
         }
186 186
     }
Please login to merge, or discard this patch.
app/src/Common/Auth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     public static function getUserId()
51 51
     {
52
-        if(self::checkUser()){
52
+        if (self::checkUser()) {
53 53
             return self::$user->id;
54 54
         } else {
55 55
             return null;
Please login to merge, or discard this patch.
app/src/Schema/UserSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@
 block discarded – undo
312 312
         return [
313 313
             'full_name'  => $user->full_name,
314 314
             'email'      => $user->email,
315
-            'role_id'    => (int) $user->role_id,
315
+            'role_id'    => (int)$user->role_id,
316 316
             'created_at' => Carbon::parse($user->created_at)->setTimezone('UTC')->format(Carbon::ISO8601),
317 317
             'updated_at' => Carbon::parse($user->updated_at)->setTimezone('UTC')->format(Carbon::ISO8601),
318 318
             'created_by' => $user->created_by,
Please login to merge, or discard this patch.
app/src/Schema/LogSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
     {
102 102
         return [
103 103
             'action'      => $log->action,
104
-            'entity_id'   => (int) $log->entity_id,
104
+            'entity_id'   => (int)$log->entity_id,
105 105
             'entity_type' => $log->entity_type,
106 106
             'state'       => $log->state,
107 107
             'created_at'  => Carbon::parse($log->created_at)->setTimezone('UTC')->format(Carbon::ISO8601),
Please login to merge, or discard this patch.
app/src/Schema/UserSchemaExtended.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         return [
18 18
             'full_name'   => $user->full_name,
19 19
             'email'       => $user->email,
20
-            'role_id'     => (int) $user->role_id,
20
+            'role_id'     => (int)$user->role_id,
21 21
             'created_at'  => Carbon::parse($user->created_at)->setTimezone('UTC')->format(Carbon::ISO8601),
22 22
             'updated_at'  => Carbon::parse($user->updated_at)->setTimezone('UTC')->format(Carbon::ISO8601),
23 23
             'created_by'  => $user->created_by,
Please login to merge, or discard this patch.
app/src/Observers/CreatedByAndUpdatedByObserver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     public function creating(BaseModel $model)
16 16
     {
17 17
         $user = Auth::getUser();
18
-        if(!is_null($user)){
18
+        if (!is_null($user)) {
19 19
             $model->created_by = $user->id;
20 20
         }
21 21
     }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function updating(BaseModel $model)
31 31
     {
32 32
         $user = Auth::getUser();
33
-        if(!is_null($user)){
33
+        if (!is_null($user)) {
34 34
             $model->updated_by = $user->id;
35 35
         }
36 36
     }
Please login to merge, or discard this patch.
lang/ru/validation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,5 +119,5 @@
 block discarded – undo
119 119
     |   ],
120 120
     |
121 121
     */
122
-    'attributes' => [ ],
122
+    'attributes' => [],
123 123
 ];
124 124
\ No newline at end of file
Please login to merge, or discard this patch.