Completed
Pull Request — master (#73)
by Tim
02:26
created
app/Http/Controllers/ApiKeyController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,10 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use App\User;
6 5
 use Illuminate\Http\Request;
7 6
 use Chrisbjr\ApiGuard\Models\ApiKey;
8
-use App\Http\Requests;
9 7
 
10 8
 class ApiKeyController extends Controller
11 9
 {
Please login to merge, or discard this patch.
app/Http/Controllers/StaffController.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
82 82
      */
83 83
     public function index()
84
-	{
85
-		$data['users'] = User::paginate(15);
86
-    	return view('users/index', $data);
84
+    {
85
+        $data['users'] = User::paginate(15);
86
+        return view('users/index', $data);
87 87
     }
88 88
 
89 89
     /**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     {
124 124
         $id = auth()->user()->id;
125 125
         $data['tokens'] = ApiKey::where('user_id', $id)->get();
126
-    	return view('users/profile', $data);
126
+        return view('users/profile', $data);
127 127
     }
128 128
 
129 129
     /**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $data2 = [];
150 150
         foreach($items as $role)
151 151
         {
152
-         $data2[] = [
152
+            $data2[] = [
153 153
         'value' => $role["id"],
154 154
         'text'  => $role["name"]
155 155
         ];
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -4,11 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use App\User;
6 6
 use App\Roles;
7
-
8 7
 use Chrisbjr\ApiGuard\Models\ApiKey;
9
-use Illuminate\Http\Request;
10
-
11
-use App\Http\Requests;
12 8
 use Bouncer;
13 9
 
14 10
 /**
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function create()
38 38
     {
39
-        $data['departments'] = Departments::all();
39
+        $data[ 'departments' ] = Departments::all();
40 40
         return view('staff.create', $data);
41 41
     }
42 42
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function edit($id)
77 77
     {
78
-        $data['query'] = User::find($id);
78
+        $data[ 'query' ] = User::find($id);
79 79
         return view('staff.edit', $data);
80 80
     }
81 81
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function index()
88 88
 	{
89
-		$data['users'] = User::paginate(15);
89
+		$data[ 'users' ] = User::paginate(15);
90 90
     	return view('users/index', $data);
91 91
     }
92 92
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     public function profile()
127 127
     {
128 128
         $id = auth()->user()->id;
129
-        $data['tokens'] = ApiKey::where('user_id', $id)->get();
129
+        $data[ 'tokens' ] = ApiKey::where('user_id', $id)->get();
130 130
     	return view('users/profile', $data);
131 131
     }
132 132
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     public function destroy($id)
140 140
     {
141 141
         $user = User::find($id);
142
-        $user->roles()->sync([]);
142
+        $user->roles()->sync([ ]);
143 143
 
144 144
         User::destroy($id);
145 145
         session()->flash('message', 'User deleted');
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
     public function get_roles()
151 151
     {
152 152
         $items = Roles::all();
153
-        $data2 = [];
154
-        foreach($items as $role)
153
+        $data2 = [ ];
154
+        foreach ($items as $role)
155 155
         {
156
-         $data2[] = [
157
-        'value' => $role["id"],
158
-        'text'  => $role["name"]
156
+         $data2[ ] = [
157
+        'value' => $role[ "id" ],
158
+        'text'  => $role[ "name" ]
159 159
         ];
160 160
 
161 161
         }
Please login to merge, or discard this patch.
app/Http/Controllers/ProfileController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use App\Customer;
6
-use Illuminate\Http\Request;
7
-
8 6
 use App\Http\Requests;
9 7
 
10 8
 class CustomersController extends Controller
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
     public function updateProfile(Requests\ProfileValidator $input)
30 30
     {
31 31
         // User information
32
-        User::find(auth()->user()->id)->update($input->except(['_token', 'avatar']));
32
+        User::find(auth()->user()->id)->update($input->except([ '_token', 'avatar' ]));
33 33
 
34 34
         // User image information.
35 35
         if (Input::file()) {
36 36
             $image    = Input::file('avatar');
37
-            $filename = time() . '.' . $image->getClientOriginalExtension();
38
-            $path     = public_path('profilepics/' . $filename);
37
+            $filename = time().'.'.$image->getClientOriginalExtension();
38
+            $path     = public_path('profilepics/'.$filename);
39 39
             
40 40
             Image::make($image->getRealPath())->resize(80, 80)->save($path);
41 41
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function updateSecurity(Requests\PasswordValidation $input)
58 58
     {
59
-        $data['password'] = bcrypt($input->password);
59
+        $data[ 'password' ] = bcrypt($input->password);
60 60
 
61 61
         User::find(auth()->user()->id)->update($data);
62 62
         session()->flash('message', 'Your password has been updated.');
Please login to merge, or discard this patch.
app/Http/Requests/PasswordValidation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
      */
27 27
     public function rules()
28 28
     {
29
-        return ['password' => 'required|min:6|confirmed'];
29
+        return [ 'password' => 'required|min:6|confirmed' ];
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
app/Departments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class Departments extends Model
8 8
 {
9
-    protected $fillable = ['name', 'manager'];
9
+    protected $fillable = [ 'name', 'manager' ];
10 10
 
11 11
     /**
12 12
      * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
Please login to merge, or discard this patch.