Completed
Push — master ( 28284e...eaa9bf )
by
unknown
12:07
created
app/Http/Controllers/Auth/VerifyUserController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Illuminate\Contracts\Events\Dispatcher;
10 10
 use App\Http\Controllers\Controller;
11 11
 use Auth;
12
-use Log;
13 12
 
14 13
 class VerifyUserController extends Controller
15 14
 {
Please login to merge, or discard this patch.
app/Http/Controllers/CategoriesController.php 2 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\Category;
6 6
 use App\Lot;
7
-use App\Product;
8 7
 use App\Repositories\CategoryRepository;
9 8
 use App\Repositories\TagRepository;
10 9
 use Illuminate\Http\Request;
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -78,17 +78,20 @@  discard block
 block discarded – undo
78 78
      */
79 79
     protected function applyFilter(Request $request, $category, $subcategory, $perPage = 12)
80 80
     {
81
-        if($filters = $request->all() ? : false)
82
-            list($static, $dynamic) = $this->separateFilters($filters);
81
+        if($filters = $request->all() ? : false) {
82
+                    list($static, $dynamic) = $this->separateFilters($filters);
83
+        }
83 84
 
84 85
         $query = $category->products()
85 86
             ->getQuery()->select('products.*');
86 87
 
87
-        if(isset($static) && $static = $this->clearStaticFilters($static))
88
-            $query = $this->applyStaticFilter($query, $static);
88
+        if(isset($static) && $static = $this->clearStaticFilters($static)) {
89
+                    $query = $this->applyStaticFilter($query, $static);
90
+        }
89 91
 
90
-        if(isset($dynamic) && $dynamic = $this->clearDynamicFilters($dynamic, $category))
91
-            $query = $this->applyDynamicFilter($query, $dynamic);
92
+        if(isset($dynamic) && $dynamic = $this->clearDynamicFilters($dynamic, $category)) {
93
+                    $query = $this->applyDynamicFilter($query, $dynamic);
94
+        }
92 95
 
93 96
         $query->join('lots', 'lots.id', '=', 'products.lot_id')
94 97
             ->where('lots.status', Lot::STATUS_COMPLETE)
@@ -205,8 +208,9 @@  discard block
 block discarded – undo
205 208
             {
206 209
                 list($group, $tag) = $this->parseDynamicFilter($filter);
207 210
 
208
-                if (isset($available_filters[$group]))
209
-                    return in_array($tag, $available_filters[$group]);
211
+                if (isset($available_filters[$group])) {
212
+                                    return in_array($tag, $available_filters[$group]);
213
+                }
210 214
             }
211 215
         }, ARRAY_FILTER_USE_KEY);
212 216
 
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use App\Repositories\LotRepository;
7 7
 use App\Repositories\ProfileRepository;
8 8
 use App\Repositories\InvolvedRepository;
9
-use Carbon\Carbon;
10 9
 use Illuminate\Contracts\Auth\Guard;
11 10
 use App\Http\Requests\UpdateUserSettings;
12 11
 use App\Http\Requests\UpdateUserPassword;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
             foreach ($involved as $item) {
108 108
                 if ($item->lot->verify_status == 'verified') {
109 109
                     $product[] = ['date' =>$item->lot->public_date, 'product' => $item->product, 'involved' => $item];
110
-                }else {
110
+                } else {
111 111
                     $product[] = ['date' =>date('dmy',strtotime('9999999')), 'product' => $item->product, 'involved' => $item];
112 112
                 }
113 113
             }
Please login to merge, or discard this patch.
app/Http/Controllers/LotsController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,6 @@
 block discarded – undo
16 16
 use Illuminate\Contracts\Auth\Guard;
17 17
 use Illuminate\Http\Request;
18 18
 
19
-use App\Http\Requests;
20
-
21 19
 class LotsController extends Controller
22 20
 {
23 21
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/PagesController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,6 @@
 block discarded – undo
6 6
 use App\Repositories\LotRepository;
7 7
 use App\Repositories\ProductsRepository;
8 8
 use App\Repositories\PagesRepository;
9
-use App\Repositories\VendorRepository;
10
-use Illuminate\Http\Request;
11 9
 
12 10
 class PagesController extends Controller
13 11
 {
Please login to merge, or discard this patch.
app/Http/Controllers/ProductsController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use App\Http\Requests\ProductCreateRequest;
6
-use App\Http\Requests\ProductUpdateRequest;
7 5
 use App\Http\Requests\SaveProductRequest;
8 6
 use App\Image;
9 7
 use App\ImprovedSpec;
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -107,15 +107,18 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $product = $this->products->saveProduct($product, $request->all());
109 109
 
110
-        if (!empty($spec_price = $request->get('spec_price')))
111
-            $this->saveSpecificationsPrice($request,$product);
110
+        if (!empty($spec_price = $request->get('spec_price'))) {
111
+                    $this->saveSpecificationsPrice($request,$product);
112
+        }
112 113
 
113
-        if (!empty($spec = $request->get('spec')))
114
-            $this->saveSpecifications($spec, $product);
114
+        if (!empty($spec = $request->get('spec'))) {
115
+                    $this->saveSpecifications($spec, $product);
116
+        }
115 117
 
116
-        if (!empty($fileInput = $request->file('image')))
117
-            array_walk($fileInput, function($image) use (&$product){
118
+        if (!empty($fileInput = $request->file('image'))) {
119
+                    array_walk($fileInput, function($image) use (&$product){
118 120
                 $this->addImage($image, $product);
121
+        }
119 122
             });
120 123
 
121 124
        /* if (!empty($specs = $request->get('i_spec')))
@@ -289,8 +292,9 @@  discard block
 block discarded – undo
289 292
     {
290 293
         array_walk($specs, function($data, $product){
291 294
             $spec = $this->improvedSpecs->find($spec_id);
292
-            if($spec)
293
-                $this->improvedSpecs->update($spec, $data);
295
+            if($spec) {
296
+                            $this->improvedSpecs->update($spec, $data);
297
+            }
294 298
         });
295 299
     }
296 300
 
Please login to merge, or discard this patch.
app/Http/Controllers/UsersController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use App\Repositories\InvolvedRepository;
8 8
 use App\Repositories\LotRepository;
9 9
 use App\Repositories\SpecPriceRepository;
10
-use Illuminate\Http\Request;
11 10
 
12 11
 class UsersController extends Controller
13 12
 {
Please login to merge, or discard this patch.
app/Http/Requests/InvolveProductRequest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Requests;
4 4
 
5 5
 use App\Repositories\InvolvedRepository;
6
-use Illuminate\Support\Facades\Auth;
7 6
 
8 7
 class InvolveProductRequest extends Request
9 8
 {
Please login to merge, or discard this patch.
app/Http/ViewComposers/HomePageComposer.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\ViewComposers;
4 4
 
5
-use App\Product;
6 5
 use App\Repositories\CategoryRepository;
7 6
 use App\Repositories\PostsRepository;
8 7
 use App\Repositories\ProductsRepository;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,13 +87,14 @@  discard block
 block discarded – undo
87 87
                         'data' => function () use ($category_1){
88 88
                             $products = [];
89 89
 
90
-                            if($category_1)
91
-                            $category_1->categoryables()
90
+                            if($category_1) {
91
+                                                        $category_1->categoryables()
92 92
                                 ->active()
93 93
                                 ->elementType(get_class($this->products->getModel()))
94 94
                                 ->get()
95 95
                                 ->each(function ($morph) use (&$products) {
96 96
                                     $products[] = $morph->categoryable;
97
+                            }
97 98
                                 });
98 99
 
99 100
                             return $products;
@@ -104,13 +105,14 @@  discard block
 block discarded – undo
104 105
                         'data' => function () use ($category_2){
105 106
                             $products = [];
106 107
 
107
-                            if($category_2)
108
-                            $category_2->categoryables()
108
+                            if($category_2) {
109
+                                                        $category_2->categoryables()
109 110
                                 ->active()
110 111
                                 ->elementType(get_class($this->products->getModel()))
111 112
                                 ->get()
112 113
                                 ->each(function ($morph) use (&$products) {
113 114
                                     $products[] = $morph->categoryable;
115
+                            }
114 116
                                 });
115 117
 
116 118
                             return $products;
Please login to merge, or discard this patch.