Skip to content

Commit 2261692

Browse files
authored
Merge pull request #10 from mikimaine/analysis-8b0wml
Applied fixes from StyleCI
2 parents aff243f + bde7da3 commit 2261692

File tree

77 files changed

+914
-1119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+914
-1119
lines changed

app/Http/Breadcrumbs/Backend/Tax.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@
2121
$breadcrumbs->parent('admin.tax.index');
2222
$breadcrumbs->push('Edit Tax', route('admin.tax.edit'));
2323
});
24-

app/Http/Controllers/Backend/Activity/ActivityController.php

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@
22

33
namespace App\Http\Controllers\Backend\Activity;
44

5-
65
use Activity;
76
use App\Exceptions\GeneralException;
8-
use App\Http\Requests;
97
use App\Http\Controllers\Controller;
108
use Innovate\Repositories\Activity\ActivityContract;
119

1210
/**
13-
* Class ActivityController
14-
* @package App\Http\Controllers\Tax\Backend
11+
* Class ActivityController.
1512
*/
1613
class ActivityController extends Controller
1714
{
18-
1915
/**
2016
* @var
2117
*/
@@ -24,53 +20,50 @@ class ActivityController extends Controller
2420
/**
2521
* @param ActivityContract $activity
2622
*/
27-
function __construct(ActivityContract $activity)
23+
public function __construct(ActivityContract $activity)
2824
{
2925
$this->activity = $activity;
3026
}
3127

3228
/**
3329
* @return mixed
3430
*/
35-
public function index()
31+
public function index()
3632
{
37-
3833
}
3934

4035
/**
4136
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
4237
*/
4338
public function create()
4439
{
45-
46-
47-
4840
}
4941

5042
/**
5143
* @param $id
44+
*
5245
* @return mixed
5346
*/
5447
public function destroy($id)
5548
{
5649
$this->activity->destroy($id);
57-
return redirect()->back()->withFlashSuccess(trans('activity.alerts.deleted'));
5850

51+
return redirect()->back()->withFlashSuccess(trans('activity.alerts.deleted'));
5952
}
6053

6154
/**
6255
* @return mixed
56+
*
6357
* @internal param $id
6458
*/
6559
public function flush()
6660
{
6761
try {
6862
Activity::cleanLog();
63+
6964
return redirect()->back()->withFlashSuccess(trans('activity.alerts.flushed'));
70-
}catch (GeneralException $e){
71-
dd($e);
65+
} catch (GeneralException $e) {
66+
dd($e);
7267
}
73-
74-
7568
}
7669
}

app/Http/Controllers/Backend/Category/CategoryController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(CategoryContract $categoryContract, InnovateImageUpl
5050
public function index()
5151
{
5252
return view('backend.category.index')
53-
->withCategorys($this->category->eagerLoad('category_description',9));
53+
->withCategorys($this->category->eagerLoad('category_description', 9));
5454
}
5555

5656
/**
@@ -145,6 +145,7 @@ public function update(Request $request, $id)
145145
public function destroy($id)
146146
{
147147
$this->category->destroy($id);
148+
148149
return redirect()->back()->withFlashSuccess(trans('category.alerts.category_deleted_'));
149150
}
150151
}

app/Http/Controllers/Backend/Order/OrderController.php

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,55 @@
44
* For : INNOVATE E-COMMERCE
55
* User: MIKI$
66
* Date: 6/26/2016
7-
* Time: 10:39 PM
7+
* Time: 10:39 PM.
88
*/
9-
109
namespace app\Http\Controllers\Backend\Order;
1110

12-
1311
use App\Http\Controllers\Controller;
1412
use Innovate\Repositories\Order\OrderContract;
1513
use Request;
1614

17-
class OrderController extends Controller{
18-
15+
class OrderController extends Controller
16+
{
1917
private $order;
2018

21-
function __construct(OrderContract $order)
19+
public function __construct(OrderContract $order)
2220
{
2321
$this->order = $order;
2422
}
2523

2624
public function index()
2725
{
28-
29-
3026
return view('backend.order.index')
3127
->withOrders($this->order->getAll());
3228
}
3329

3430
public function create()
3531
{
36-
3732
}
3833

3934
public function edit($id)
4035
{
41-
$order =$this->order->findOrThrowException($id);
36+
$order = $this->order->findOrThrowException($id);
37+
4238
return view('backend.order.edit')
4339
->withOrder($order);
44-
4540
}
4641

47-
public function update($id,Request $request)
42+
public function update($id, Request $request)
4843
{
49-
$this->order->update($id,$request->all());
50-
51-
44+
$this->order->update($id, $request->all());
5245
}
5346

5447
public function destroy($id)
5548
{
5649
$this->order->destroy($id);
57-
return redirect()->back()->withFlashSuccess(trans('order.alerts.deleted'));
5850

51+
return redirect()->back()->withFlashSuccess(trans('order.alerts.deleted'));
5952
}
6053

6154
/**
62-
* Returns products that are deleted
63-
*
55+
* Returns products that are deleted.
6456
*/
6557
public function deleted()
6658
{
@@ -69,26 +61,30 @@ public function deleted()
6961
}
7062

7163
/**
72-
* restore products from deleted box
64+
* restore products from deleted box.
65+
*
7366
* @param $id
67+
*
7468
* @return mixed
7569
*/
7670
public function restore($id)
7771
{
7872
$this->order->restore($id);
73+
7974
return redirect()->back()->withFlashSuccess(trans('order.restored'));
8075
}
8176

8277
/**
83-
* Delete product beyond recovery
78+
* Delete product beyond recovery.
79+
*
8480
* @param $id
81+
*
8582
* @return mixed
8683
*/
8784
public function delete($id)
8885
{
8986
$this->order->delete($id);
87+
9088
return redirect()->back()->withFlashSuccess(trans('order.deleted_permanently'));
9189
}
92-
93-
94-
}
90+
}

app/Http/Controllers/Backend/Product/ProductController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ public function storeDownloadable(Request $request, CommandBus $commandBus)
153153
}
154154
//pass the image along with the path to the upload to the imageDriver for further processing
155155

156-
$im = $this->imageDriver->up($file, config('innovate.upload_path') . DS . 'product' . DS . Str::random(32) . '.' . $file->guessExtension());
157-
$fl_name = Str::random(32) . '.' .$prod->guessExtension();
158-
$pr =$prod->move(config('innovate.upload_path') . DS . 'product',$fl_name);
156+
$im = $this->imageDriver->up($file, config('innovate.upload_path').DS.'product'.DS.Str::random(32).'.'.$file->guessExtension());
157+
$fl_name = Str::random(32).'.'.$prod->guessExtension();
158+
$pr = $prod->move(config('innovate.upload_path').DS.'product', $fl_name);
159159

160160
$im = $this->imageDriver->up($file, config('innovate.upload_path').DS.'product'.DS.Str::random(32).'.'.$file->guessExtension());
161161

app/Http/Controllers/Backend/StaticPage/BankTransferInfoController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ public function destroy($id)
112112
return redirect()->back()->withFlashSuccess(trans('alerts.users.deleted'));
113113
}
114114

115-
116115
public function deleted()
117116
{
118117
return view('backend.staticPage.bank_transfer.deleted')

app/Http/Controllers/Backend/StaticPage/CheckOutAgreementController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ public function create()
5151
*/
5252
public function store(Request $request)
5353
{
54-
55-
5654
$this->checkOutAgreement->create($request->all());
5755

5856
return redirect()->route('admin.check_out_agreement.index')->withFlashSuccess(trans('tax.alerts.created'));
@@ -112,7 +110,6 @@ public function destroy($id)
112110
return redirect()->back()->withFlashSuccess(trans('alerts.users.deleted'));
113111
}
114112

115-
116113
public function deleted()
117114
{
118115
return view('backend.staticPage.check_out_agreement.deleted')

app/Http/Controllers/Backend/Stock/StockController.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
* For : INNOVATE E-COMMERCE
55
* User: MIKI$
66
* Date: 6/26/2016
7-
* Time: 10:39 PM
7+
* Time: 10:39 PM.
88
*/
9-
109
namespace app\Http\Controllers\Backend\Stock;
1110

12-
13-
class StockController {
14-
15-
}
11+
class StockController
12+
{
13+
}

app/Http/Controllers/Frontend/Activity/ActivityController.php

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22

33
namespace App\Http\Controllers\BFrontend\Activity;
44

5-
65
use Activity;
76
use App\Exceptions\GeneralException;
8-
use App\Http\Requests;
97
use App\Http\Controllers\Controller;
108
use Auth;
119
use Innovate\Repositories\Activity\ActivityContract;
1210

1311
/**
14-
* Class ActivityController
15-
* @package App\Http\Controllers\Tax\Backend
12+
* Class ActivityController.
1613
*/
1714
class ActivityController extends Controller
1815
{
19-
2016
/**
2117
* @var
2218
*/
@@ -25,15 +21,15 @@ class ActivityController extends Controller
2521
/**
2622
* @param ActivityContract $activity
2723
*/
28-
function __construct(ActivityContract $activity)
24+
public function __construct(ActivityContract $activity)
2925
{
3026
$this->activity = $activity;
3127
}
3228

3329
/**
3430
* @return mixed
3531
*/
36-
public function index()
32+
public function index()
3733
{
3834
return view('frontend.activitylog')
3935
->withActivities(Activity::with('user')->find(Auth::user()->id)->limit(100)->get());
@@ -44,35 +40,33 @@ public function index()
4440
*/
4541
public function create()
4642
{
47-
48-
49-
5043
}
5144

5245
/**
5346
* @param $id
47+
*
5448
* @return mixed
5549
*/
5650
public function destroy($id)
5751
{
5852
$this->activity->destroy($id);
59-
return redirect()->back()->withFlashSuccess(trans('activity.alerts.deleted'));
6053

54+
return redirect()->back()->withFlashSuccess(trans('activity.alerts.deleted'));
6155
}
6256

6357
/**
6458
* @return mixed
59+
*
6560
* @internal param $id
6661
*/
6762
public function flush()
6863
{
6964
try {
7065
Activity::cleanLog();
66+
7167
return redirect()->back()->withFlashSuccess(trans('activity.alerts.flushed'));
72-
}catch (GeneralException $e){
73-
dd($e);
68+
} catch (GeneralException $e) {
69+
dd($e);
7470
}
75-
76-
7771
}
7872
}

0 commit comments

Comments
 (0)