Completed
Push — master ( 7a6efc...6971a7 )
by Quim González
03:26
created
app/Http/Controllers/ApiUserController.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,17 +27,17 @@
 block discarded – undo
27 27
     public function store(StoreUser $request)
28 28
     {
29 29
         $request->validate([
30
-           'name'     => 'required|max:255',
31
-           'username' => 'sometimes|required|max:255|unique:users',
32
-           'email'    => 'required|email|max:255|unique:users',
33
-           'password' => 'required|min:6',
30
+            'name'     => 'required|max:255',
31
+            'username' => 'sometimes|required|max:255|unique:users',
32
+            'email'    => 'required|email|max:255|unique:users',
33
+            'password' => 'required|min:6',
34 34
         ]);
35 35
 
36 36
         $user = User::create([
37
-               'name'     => $request->name,
38
-               'username' => $request->username,
39
-               'email'    => $request->email,
40
-               'password' => bcrypt($request->password),
37
+                'name'     => $request->name,
38
+                'username' => $request->username,
39
+                'email'    => $request->email,
40
+                'password' => bcrypt($request->password),
41 41
             ]);
42 42
 
43 43
         return $user;
Please login to merge, or discard this patch.
app/Console/Commands/ListUserCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
             $this->table($headers, $tasks);
49 49
         } catch (exception $e) {
50
-            $this->error('Error: '.$e);
50
+            $this->error('Error: ' . $e);
51 51
         }
52 52
     }
53 53
 }
Please login to merge, or discard this patch.
app/Console/Commands/CreateUserCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 'password' => $this->argument('password') ? $this->argument('password') : $this->ask('User password?'),
46 46
             ]);
47 47
         } catch (Exception $e) {
48
-            $this->error('error'.$e);
48
+            $this->error('error' . $e);
49 49
         }
50 50
 
51 51
         $this->info('User has been added to database succesfully');
Please login to merge, or discard this patch.
app/Console/Commands/DestroyUserCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@
 block discarded – undo
42 42
             $id = $this->argument('id') ? $this->argument('id') : $this->ask('User id?');
43 43
             $count = User::destroy($id);
44 44
         } catch (Exception $e) {
45
-            $this->error('error'.$e);
45
+            $this->error('error' . $e);
46 46
         }
47 47
         if ($count == 0) {
48 48
             $this->alert('User does not exist');
49
-        } else {
49
+        }else {
50 50
             $this->info('User has been deleted to database succesfully');
51 51
         }
52 52
     }
Please login to merge, or discard this patch.
app/Console/Commands/ShowUserCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             ];
57 57
             $this->table($headers, $info);
58 58
         } catch (Exception $e) {
59
-            $this->error('error'.$e);
59
+            $this->error('error' . $e);
60 60
         }
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
app/Console/Commands/EditUserCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 'email'       => $this->argument('email') ? $this->argument('user_id') : $this->ask('User email?'),
52 52
             ]);
53 53
         } catch (Exception $e) {
54
-            $this->error('error'.$e);
54
+            $this->error('error' . $e);
55 55
         }
56 56
         $this->info('User has been edited succesfully');
57 57
     }
Please login to merge, or discard this patch.
app/Http/Controllers/ApiCompletedTasksController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
             'completed' => 'required',
19 19
         ]);
20 20
 
21
-        $task = Task::create($request->only([ 'completed']));
21
+        $task = Task::create($request->only(['completed']));
22 22
 
23 23
         return $task;
24 24
     }
Please login to merge, or discard this patch.
app/Task.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
             'name' => $this->name,
16 16
             'description' => $this->description,
17 17
             'user_id' => $this->user_id,
18
-            'completed' => $this->completed? true:false,
19
-            'created_at' => $this->created_at."",
20
-            'updated_at' => $this->updated_at."",
18
+            'completed' => $this->completed ? true:false,
19
+            'created_at' => $this->created_at . "",
20
+            'updated_at' => $this->updated_at . "",
21 21
         ];
22 22
     }
23 23
 }
Please login to merge, or discard this patch.