@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * Reset the given user's password. |
| 240 | 240 | * |
| 241 | 241 | * @param array $credentials |
| 242 | - * @return array |
|
| 242 | + * @return string|null |
|
| 243 | 243 | */ |
| 244 | 244 | public function resetPassword($credentials) |
| 245 | 245 | { |
@@ -322,7 +322,6 @@ discard block |
||
| 322 | 322 | /** |
| 323 | 323 | * Save the given data to the logged in user. |
| 324 | 324 | * |
| 325 | - * @param array $credentials |
|
| 326 | 325 | * @return void |
| 327 | 326 | */ |
| 328 | 327 | public function saveProfile($data) |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @param array $relations |
| 34 | 34 | * @param string $sortBy |
| 35 | - * @param boolean $desc |
|
| 35 | + * @param integer $desc |
|
| 36 | 36 | * @param array $columns |
| 37 | 37 | * @return collection |
| 38 | 38 | */ |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param integer $perPage |
| 51 | 51 | * @param array $relations |
| 52 | 52 | * @param string $sortBy |
| 53 | - * @param boolean $desc |
|
| 53 | + * @param integer $desc |
|
| 54 | 54 | * @param array $columns |
| 55 | 55 | * @return collection |
| 56 | 56 | */ |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | * @param integer $perPage |
| 165 | 165 | * @param array $relations |
| 166 | 166 | * @param string $sortBy |
| 167 | - * @param boolean $desc |
|
| 167 | + * @param integer $desc |
|
| 168 | 168 | * @param array $columns |
| 169 | 169 | * @return collection |
| 170 | 170 | */ |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | * @param integer $perPage |
| 183 | 183 | * @param array $relations |
| 184 | 184 | * @param string $sortBy |
| 185 | - * @param boolean $desc |
|
| 185 | + * @param integer $desc |
|
| 186 | 186 | * @param array $columns |
| 187 | 187 | * @return collection |
| 188 | 188 | */ |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * Save the given model to the storage. |
| 199 | 199 | * |
| 200 | 200 | * @param array $data |
| 201 | - * @return object |
|
| 201 | + * @return boolean |
|
| 202 | 202 | */ |
| 203 | 203 | public function save(array $data) |
| 204 | 204 | { |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | * id. |
| 517 | 517 | * |
| 518 | 518 | * @param integer $id |
| 519 | - * @param array $relations |
|
| 519 | + * @param string[] $relations |
|
| 520 | 520 | * @param array $columns |
| 521 | 521 | * @return object |
| 522 | 522 | */ |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | * @param array $conditions array of conditions |
| 533 | 533 | * @param array $relations |
| 534 | 534 | * @param string $sortBy |
| 535 | - * @param boolean $desc |
|
| 535 | + * @param integer $desc |
|
| 536 | 536 | * @param array $columns |
| 537 | 537 | * @return collection |
| 538 | 538 | */ |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | * @param array $conditions array of conditions |
| 565 | 565 | * @param integer $perPage |
| 566 | 566 | * @param string $sortBy |
| 567 | - * @param boolean $desc |
|
| 567 | + * @param integer $desc |
|
| 568 | 568 | * @param array $columns |
| 569 | 569 | * @return collection |
| 570 | 570 | */ |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * to preform actions like (add, edit ... etc). |
| 14 | 14 | * @var string |
| 15 | 15 | */ |
| 16 | - protected $model = 'users'; |
|
| 16 | + protected $model = 'users'; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * List of all route actions that the base api controller |
@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | * will skip login check for them. |
| 28 | 28 | * @var array |
| 29 | 29 | */ |
| 30 | - protected $skipLoginCheck = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken']; |
|
| 30 | + protected $skipLoginCheck = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken']; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * The validations rules used by the base api controller |
| 34 | 34 | * to check before add. |
| 35 | 35 | * @var array |
| 36 | 36 | */ |
| 37 | - protected $validationRules = [ |
|
| 37 | + protected $validationRules = [ |
|
| 38 | 38 | 'name' => 'nullable|string', |
| 39 | 39 | 'email' => 'required|email|unique:users,email,{id}', |
| 40 | 40 | 'password' => 'nullable|min:6' |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | { |
| 250 | 250 | $this->validate($request, [ |
| 251 | 251 | 'name' => 'nullable|string', |
| 252 | - 'email' => 'required|email|unique:users,email,' . \Auth::id() |
|
| 252 | + 'email' => 'required|email|unique:users,email,'.\Auth::id() |
|
| 253 | 253 | ]); |
| 254 | 254 | |
| 255 | 255 | return \Response::json($this->repo->saveProfile($request->only('name', 'email')), 200); |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | * to preform actions like (add, edit ... etc). |
| 14 | 14 | * @var string |
| 15 | 15 | */ |
| 16 | - protected $model = 'oauthClients'; |
|
| 16 | + protected $model = 'oauthClients'; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * The validations rules used by the base api controller |
| 20 | 20 | * to check before add. |
| 21 | 21 | * @var array |
| 22 | 22 | */ |
| 23 | - protected $validationRules = [ |
|
| 23 | + protected $validationRules = [ |
|
| 24 | 24 | 'name' => 'required|max:255', |
| 25 | 25 | 'redirect' => 'required|url', |
| 26 | 26 | 'user_id' => 'required|exists:users,id', |
@@ -20,27 +20,27 @@ discard block |
||
| 20 | 20 | ], |
| 21 | 21 | [ |
| 22 | 22 | 'title' => 'email equal [email protected] and user is blocked:', |
| 23 | - 'content' => ['and' => ['email' => '[email protected]','blocked' => 1]] |
|
| 23 | + 'content' => ['and' => ['email' => '[email protected]', 'blocked' => 1]] |
|
| 24 | 24 | ], |
| 25 | 25 | [ |
| 26 | 26 | 'title' => 'email equal [email protected] or user is blocked:', |
| 27 | - 'content' => ['or' => ['email' => '[email protected]','blocked' => 1]] |
|
| 27 | + 'content' => ['or' => ['email' => '[email protected]', 'blocked' => 1]] |
|
| 28 | 28 | ], |
| 29 | 29 | [ |
| 30 | 30 | 'title' => 'email contain John:', |
| 31 | - 'content' => ['email' => ['op' => 'like','val' => '%John%']] |
|
| 31 | + 'content' => ['email' => ['op' => 'like', 'val' => '%John%']] |
|
| 32 | 32 | ], |
| 33 | 33 | [ |
| 34 | 34 | 'title' => 'user created after 2016-10-25:', |
| 35 | - 'content' => ['created_at' => ['op' => '>','val' => '2016-10-25']] |
|
| 35 | + 'content' => ['created_at' => ['op' => '>', 'val' => '2016-10-25']] |
|
| 36 | 36 | ], |
| 37 | 37 | [ |
| 38 | 38 | 'title' => 'user created between 2016-10-20 and 2016-10-25:', |
| 39 | - 'content' => ['created_at' => ['op' => 'between','val1' => '2016-10-20','val2' => '2016-10-25']] |
|
| 39 | + 'content' => ['created_at' => ['op' => 'between', 'val1' => '2016-10-20', 'val2' => '2016-10-25']] |
|
| 40 | 40 | ], |
| 41 | 41 | [ |
| 42 | 42 | 'title' => 'user id in 1,2,3:', |
| 43 | - 'content' => ['id' => ['op' => 'in','val' => [1, 2, 3]]] |
|
| 43 | + 'content' => ['id' => ['op' => 'in', 'val' => [1, 2, 3]]] |
|
| 44 | 44 | ], |
| 45 | 45 | [ |
| 46 | 46 | 'title' => 'user name is null:', |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | ], |
| 53 | 53 | [ |
| 54 | 54 | 'title' => 'user has group admin:', |
| 55 | - 'content' => ['groups' => ['op' => 'has','val' => ['name' => 'Admin']]] |
|
| 55 | + 'content' => ['groups' => ['op' => 'has', 'val' => ['name' => 'Admin']]] |
|
| 56 | 56 | ] |
| 57 | 57 | ]; |
| 58 | 58 | |