Completed
Push — master ( 27095d...5e6011 )
by Glenn
19s
created
app/Http/Controllers/StaffController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
89 89
      */
90 90
     public function index()
91
-	{
91
+    {
92 92
         $data["departments"] = Departments::all();
93
-		$data['users'] = User::paginate(15);
94
-    	return view('users/index', $data);
93
+        $data['users'] = User::paginate(15);
94
+        return view('users/index', $data);
95 95
     }
96 96
 
97 97
     /**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $id = auth()->user()->id;
133 133
         $data['tokens'] = ApiKey::where('user_id', $id)->get();
134
-    	return view('users/profile', $data);
134
+        return view('users/profile', $data);
135 135
     }
136 136
 
137 137
     /**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $data2 = [];
158 158
         foreach($items as $role)
159 159
         {
160
-         $data2[] = [
160
+            $data2[] = [
161 161
         'value' => $role["id"],
162 162
         'text'  => $role["name"]
163 163
         ];
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $user = auth()->user();
40 40
 
41 41
         if ($user->is('Manager') || $user->is('Administrator')) {
42
-            $data['departments'] = Departments::all();
42
+            $data[ 'departments' ] = Departments::all();
43 43
             return view('staff.create', $data);
44 44
         }
45 45
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $user = auth()->user();
59 59
 
60 60
         if ($user->is('Manager') || $user->is('Administrator')) {
61
-            $newUser = User::create($input->except(['_token', 'department']))->id;
61
+            $newUser = User::create($input->except([ '_token', 'department' ]))->id;
62 62
             User::find($newUser)->departments()->attach($input->department);
63 63
 
64 64
             session()->flash('message', 'New staff member created');
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function update(Requests\NewStaffValidator $input, $id)
79 79
     {
80
-        User::find($id)-update($input->except('_token'));
80
+        User::find($id) - update($input->except('_token'));
81 81
         //session()->flash('message', 'Staff member has been updated');
82 82
 
83 83
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function edit($id)
92 92
     {
93
-        $data['query'] = User::find($id);
93
+        $data[ 'query' ] = User::find($id);
94 94
         return view('staff.edit', $data);
95 95
     }
96 96
 
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function index()
103 103
 	{
104
-        $data["departments"] = Departments::all();
105
-		$data['users'] = User::paginate(15);
104
+        $data[ "departments" ] = Departments::all();
105
+		$data[ 'users' ] = User::paginate(15);
106 106
     	return view('users/index', $data);
107 107
     }
108 108
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function profile()
143 143
     {
144 144
         $id = auth()->user()->id;
145
-        $data['tokens'] = ApiKey::where('user_id', $id)->get();
145
+        $data[ 'tokens' ] = ApiKey::where('user_id', $id)->get();
146 146
     	return view('users/profile', $data);
147 147
     }
148 148
 
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $user = auth()->user();
158 158
 
159
-        if (! $user->is('Manager') || ! $user->is('Administrator')) {
159
+        if (!$user->is('Manager') || !$user->is('Administrator')) {
160 160
             return redirect()->back();
161 161
         }
162 162
 
163 163
         $user = User::find($id);
164
-        $user->roles()->sync([]);
164
+        $user->roles()->sync([ ]);
165 165
 
166 166
         User::destroy($id);
167 167
         session()->flash('message', 'User deleted');
@@ -172,12 +172,12 @@  discard block
 block discarded – undo
172 172
     public function get_roles()
173 173
     {
174 174
         $items = Roles::all();
175
-        $data2 = [];
176
-        foreach($items as $role)
175
+        $data2 = [ ];
176
+        foreach ($items as $role)
177 177
         {
178
-         $data2[] = [
179
-        'value' => $role["id"],
180
-        'text'  => $role["name"]
178
+         $data2[ ] = [
179
+        'value' => $role[ "id" ],
180
+        'text'  => $role[ "name" ]
181 181
         ];
182 182
 
183 183
         }
Please login to merge, or discard this patch.
app/Http/Controllers/BackupController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class BackupController extends Controller
11 11
 {
12
-	    public function __construct()
12
+        public function __construct()
13 13
     {
14 14
         $this->middleware('auth');
15 15
         $this->middleware('lang');
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $data['MonthlyBackups']    = Config::get('laravel-backup.cleanup.defaultStrategy.keepMonthlyBackupsForMonths');
31 31
         $data['KeepYearlyBackups'] = Config::get('laravel-backup.cleanup.defaultStrategy.keepYearlyBackupsForYears');
32 32
 
33
-    	return view('settings.backups', $data);
33
+        return view('settings.backups', $data);
34 34
     }
35 35
 
36 36
     /**
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
     {
25 25
 
26 26
         // Config data
27
-        $data['StoreAllBackups']   = Config::get('laravel-backup.cleanup.defaultStrategy.keepAllBackupsForDays');
28
-        $data['KeepDailyBackups']  = Config::get('laravel-backup.cleanup.defaultStrategy.keepDailyBackupsForDays');
29
-        $data['WeeklyBackups']     = Config::get('laravel-backup.cleanup.defaultStrategy.keepWeeklyBackupsForWeeks');
30
-        $data['MonthlyBackups']    = Config::get('laravel-backup.cleanup.defaultStrategy.keepMonthlyBackupsForMonths');
31
-        $data['KeepYearlyBackups'] = Config::get('laravel-backup.cleanup.defaultStrategy.keepYearlyBackupsForYears');
27
+        $data[ 'StoreAllBackups' ]   = Config::get('laravel-backup.cleanup.defaultStrategy.keepAllBackupsForDays');
28
+        $data[ 'KeepDailyBackups' ]  = Config::get('laravel-backup.cleanup.defaultStrategy.keepDailyBackupsForDays');
29
+        $data[ 'WeeklyBackups' ]     = Config::get('laravel-backup.cleanup.defaultStrategy.keepWeeklyBackupsForWeeks');
30
+        $data[ 'MonthlyBackups' ]    = Config::get('laravel-backup.cleanup.defaultStrategy.keepMonthlyBackupsForMonths');
31
+        $data[ 'KeepYearlyBackups' ] = Config::get('laravel-backup.cleanup.defaultStrategy.keepYearlyBackupsForYears');
32 32
 
33 33
     	return view('settings.backups', $data);
34 34
     }
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
     public function storeBackup(Requests\BackupSettingValidator $input)
44 44
     {
45 45
         $config = new \Larapack\ConfigWriter\Repository('laravel-backup');
46
-        $config->set('cleanup.defaultStrategy.keepAllBackupsForDays',       $input->keepAllBackupsForDaysAll);
47
-        $config->set('cleanup.defaultStrategy.keepDailyBackupsForDays',     $input->keepAllBackupsForDays);
48
-        $config->set('cleanup.defaultStrategy.keepWeeklyBackupsForWeeks',   $input->keepWeeklyBackupsForWeeks);
46
+        $config->set('cleanup.defaultStrategy.keepAllBackupsForDays', $input->keepAllBackupsForDaysAll);
47
+        $config->set('cleanup.defaultStrategy.keepDailyBackupsForDays', $input->keepAllBackupsForDays);
48
+        $config->set('cleanup.defaultStrategy.keepWeeklyBackupsForWeeks', $input->keepWeeklyBackupsForWeeks);
49 49
         $config->set('cleanup.defaultStrategy.keepMonthlyBackupsForMonths', $input->keepMonthlyBackupsForWeeks);
50
-        $config->set('cleanup.defaultStrategy.keepYearlyBackupsForYears',   $input->keepAllBackupsYearly);
50
+        $config->set('cleanup.defaultStrategy.keepYearlyBackupsForYears', $input->keepAllBackupsYearly);
51 51
         $config->save();
52 52
 
53 53
         if ($config) {
Please login to merge, or discard this patch.
app/Http/Controllers/ProfileController.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,11 +3,8 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use App\User;
6
-use Illuminate\Http\Request;
7
-
8 6
 use App\Http\Requests;
9 7
 use Illuminate\Support\Facades\Input;
10
-use Illuminate\Support\Facades\Storage;
11 8
 use Intervention\Image\Facades\Image;
12 9
 
13 10
 class ProfileController extends Controller
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
     public function updateProfile(Requests\ProfileValidator $input)
31 31
     {
32 32
         // User information
33
-        User::find(auth()->user()->id)->update($input->except(['_token', 'avatar']));
33
+        User::find(auth()->user()->id)->update($input->except([ '_token', 'avatar' ]));
34 34
 
35 35
         // User image information.
36 36
         if (Input::file()) {
37 37
             $image    = Input::file('avatar');
38
-            $filename = time() . '.' . $image->getClientOriginalExtension();
39
-            $path     = public_path('avatars/' . $filename);
38
+            $filename = time().'.'.$image->getClientOriginalExtension();
39
+            $path     = public_path('avatars/'.$filename);
40 40
             
41 41
             //Image::make($image->getRealPath())->resize(80, 80)->save($path);
42 42
             $image->move(public_path('avatars'), $filename);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function updateSecurity(Requests\PasswordValidation $input)
60 60
     {
61
-        $data['password'] = bcrypt($input->password);
61
+        $data[ 'password' ] = bcrypt($input->password);
62 62
 
63 63
         User::find(auth()->user()->id)->update($data);
64 64
         session()->flash('message', 'Your password has been updated.');
Please login to merge, or discard this patch.
app/Http/Controllers/SettingsController.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     // TODO: Needs phpunit tests. -> create github issue
12 12
 
13
-	/**
13
+    /**
14 14
      * SettingsController constructor.
15 15
      */
16 16
     public function __construct()
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function index()
28 28
     {
29
-    	return view('settings.index');
29
+        return view('settings.index');
30 30
     }
31 31
 
32
-		/**
33
-		 * Get the email settings page.
34
-		 *
35
-		 * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
36
-		 */
37
-		public function email()
38
-		{
39
-			return view('settings.email');
40
-		}
32
+        /**
33
+         * Get the email settings page.
34
+         *
35
+         * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
36
+         */
37
+        public function email()
38
+        {
39
+            return view('settings.email');
40
+        }
41 41
 
42 42
 }
Please login to merge, or discard this patch.
app/ProductsCategories.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
      *
20 20
      * @var array
21 21
      */
22
-    protected $fillable = ['name'];
22
+    protected $fillable = [ 'name' ];
23 23
 }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@
 block discarded – undo
10 10
  */
11 11
 class ProductsCategories extends Model
12 12
 {
13
-  /**
14
-   * Model table.
15
-   *
16
-   * @var string
17
-   */
18
-  protected $table = 'products_categories';
13
+    /**
14
+     * Model table.
15
+     *
16
+     * @var string
17
+     */
18
+    protected $table = 'products_categories';
19 19
 
20 20
     /**
21 21
      * Mass-assign fields
Please login to merge, or discard this patch.
app/Products.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @var array
24 24
      */
25
-    protected $fillable = ['name', 'category_id'];
25
+    protected $fillable = [ 'name', 'category_id' ];
26 26
 
27 27
 
28 28
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/ProductsController.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use App\Departments;
6 6
 use Illuminate\Http\Request;
7
-
8 7
 use App\Http\Requests;
9 8
 
10 9
 /**
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -35,17 +35,17 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function edit_categories($id)
37 37
     {
38
-      $data['category'] = ProductsCategories::find($id);
39
-      return view('products.edit_category', $data);
38
+        $data['category'] = ProductsCategories::find($id);
39
+        return view('products.edit_category', $data);
40 40
     }
41 41
 
42 42
     public function remove_category($id)
43 43
     {
44
-      $category = ProductsCategories::find($id);
45
-      $category->delete();
44
+        $category = ProductsCategories::find($id);
45
+        $category->delete();
46 46
 
47
-      session()->flash('message', trans('products.removed_category'));
48
-      return redirect()->back();
47
+        session()->flash('message', trans('products.removed_category'));
48
+        return redirect()->back();
49 49
     }
50 50
 
51 51
 
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
     public function store(Requests\ProductValidator $input)
62 62
     {
63 63
         $this->validate($input, [
64
-          'name' => 'required',
65
-          'category' => 'required',
66
-         ]);
64
+            'name' => 'required',
65
+            'category' => 'required',
66
+            ]);
67 67
 
68 68
         $product       = new Products();
69 69
         $product->name = $input->name;
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function saveCat(Request $input)
87 87
     {
88
-      $this->validate($input, [
88
+        $this->validate($input, [
89 89
         'name' => 'required|unique:products_categories'
90
-       ]);
90
+        ]);
91 91
 
92 92
         $category       = new ProductsCategories();
93 93
         $category->name = $input->name;
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 
101 101
     public function remove($id)
102 102
     {
103
-      $product = Products::find($id);
104
-      $product->delete();
103
+        $product = Products::find($id);
104
+        $product->delete();
105 105
 
106
-      session()->flash('message', trans('products.removed'));
107
-      return redirect()->back();
106
+        session()->flash('message', trans('products.removed'));
107
+        return redirect()->back();
108 108
     }
109 109
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,21 +21,21 @@
 block discarded – undo
21 21
 
22 22
     public function index()
23 23
     {
24
-        $data['products'] = Products::with('category')->paginate(10);
25
-        $data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
24
+        $data[ 'products' ] = Products::with('category')->paginate(10);
25
+        $data[ 'category' ] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
26 26
 
27 27
         return view('products.index', $data);
28 28
     }
29 29
 
30 30
     public function categories()
31 31
     {
32
-        $data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
32
+        $data[ 'category' ] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
33 33
         return view('products.categories', $data);
34 34
     }
35 35
 
36 36
     public function edit_categories($id)
37 37
     {
38
-      $data['category'] = ProductsCategories::find($id);
38
+      $data[ 'category' ] = ProductsCategories::find($id);
39 39
       return view('products.edit_category', $data);
40 40
     }
41 41
 
Please login to merge, or discard this patch.
app/Segments.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,10 +6,10 @@
 block discarded – undo
6 6
 
7 7
 class Segments extends Model
8 8
 {
9
-  /**
10
-   * The database table used by the model.
11
-   *
12
-   * @var string
13
-   */
14
-  protected $table = 'customers_segments';
9
+    /**
10
+     * The database table used by the model.
11
+     *
12
+     * @var string
13
+     */
14
+    protected $table = 'customers_segments';
15 15
 }
Please login to merge, or discard this patch.
app/Http/Controllers/AssetsController.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,27 +8,27 @@
 block discarded – undo
8 8
 
9 9
 class AssetsController extends Controller
10 10
 {
11
-  /**
12
-   * AssetsController constructor.
13
-   */
14
-  public function __construct()
15
-  {
16
-      $this->middleware('auth');
17
-      $this->middleware('lang');
18
-  }
11
+    /**
12
+     * AssetsController constructor.
13
+     */
14
+    public function __construct()
15
+    {
16
+        $this->middleware('auth');
17
+        $this->middleware('lang');
18
+    }
19 19
 
20
-  public function index()
21
-  {
20
+    public function index()
21
+    {
22 22
     return view('assets.index');
23
-  }
23
+    }
24 24
 
25
-  public function edit()
26
-  {
25
+    public function edit()
26
+    {
27 27
     return view('assets.edit');
28
-  }
28
+    }
29 29
 
30
-  public function remove()
31
-  {
30
+    public function remove()
31
+    {
32 32
     
33
-  }
33
+    }
34 34
 }
Please login to merge, or discard this patch.