Completed
Push — master ( 28284e...eaa9bf )
by
unknown
12:07
created
app/Partner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     /**
17 17
      * @var array
18 18
      */
19
-    protected $fillable = ['name', 'link', 'active', 'rank'];
19
+    protected $fillable = [ 'name', 'link', 'active', 'rank' ];
20 20
 
21 21
     /**
22 22
      * @var bool
Please login to merge, or discard this patch.
app/Social.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     /**
18 18
      * @var array
19 19
      */
20
-    protected $fillable = ['key', 'link'];
20
+    protected $fillable = [ 'key', 'link' ];
21 21
 
22 22
     /**
23 23
      * @var bool
Please login to merge, or discard this patch.
app/Banner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
     /**
18 18
      * @var array
19 19
      */
20
-    protected $fillable = ['link', 'image_url', 'rank', 'active'];
20
+    protected $fillable = [ 'link', 'image_url', 'rank', 'active' ];
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     {
55 55
         $router->group([
56 56
             'namespace' => $this->namespace, 'middleware' => 'web',
57
-        ], function ($router) {
57
+        ], function($router) {
58 58
             require app_path('Http/routes.php');
59 59
         });
60 60
     }
Please login to merge, or discard this patch.
app/FavoriteProduct.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     /**
15 15
      * @var array
16 16
      */
17
-    protected $fillable = ['active'];
17
+    protected $fillable = [ 'active' ];
18 18
 
19 19
     /**
20 20
      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
Please login to merge, or discard this patch.
app/Http/administrator/routes.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // Use 'web' middleware if you using laravel version since 5.2
4 4
 
5
-Route::group(['prefix' => 'admin', 'middleware' => 'web'], function () {
5
+Route::group([ 'prefix' => 'admin', 'middleware' => 'web' ], function() {
6 6
     /*
7 7
     |-------------------------------------------------------
8 8
     | Authentication
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
     Route::get('logout', 'Keyhunter\Administrator\AuthController@logout');
14 14
 });
15 15
 
16
-Route::group(['prefix' => 'admin'
17
-    , 'middleware' => ['web', '\Keyhunter\Administrator\Middleware\Authenticate']
18
-], function () {
19
-    Route::get('/', function () {
16
+Route::group([ 'prefix' => 'admin'
17
+    , 'middleware' => [ 'web', '\Keyhunter\Administrator\Middleware\Authenticate' ]
18
+], function() {
19
+    Route::get('/', function() {
20 20
         $homepage = config('administrator.home_page', '/members');
21 21
 
22 22
         return \Redirect::to($homepage);
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     | Settings
28 28
     |-------------------------------------------------------
29 29
     */
30
-    Route::group(['middleware' => '\Keyhunter\Administrator\Middleware\Settings'], function () {
30
+    Route::group([ 'middleware' => '\Keyhunter\Administrator\Middleware\Settings' ], function() {
31 31
         Route::get('settings/{page}',
32 32
             [
33 33
                 'as' => 'admin_settings_edit',
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     | Main Scaffolding routes
47 47
     |-------------------------------------------------------
48 48
     */
49
-    Route::group(['middleware' => '\Keyhunter\Administrator\Middleware\Module'], function () {
49
+    Route::group([ 'middleware' => '\Keyhunter\Administrator\Middleware\Module' ], function() {
50 50
         /*
51 51
         |-------------------------------------------------------
52 52
         | Custom routes
Please login to merge, or discard this patch.
app/Http/ViewComposers/BannerComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         // Here template names is hardcoded, but here is easy to edit them, then go to templates and change variables there
31 31
 
32
-        switch ($view->getName()){
32
+        switch ($view->getName()) {
33 33
             case "partials.banners.small":
34 34
                 return $view->with('banners', $this->banners->getSmallAdBlocks(2));
35 35
                 break;
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/VerifyUserController.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         $user = $this->users->getByConfirmationCode($code);
47 47
 
48 48
         if ($user) {
49
-            if (! $user->confirmed) {
49
+            if (!$user->confirmed) {
50 50
                 
51 51
                 $this->users->confirmate($user);
52 52
                 
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.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -78,23 +78,23 @@  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)
81
+        if ($filters = $request->all() ?: false)
82 82
             list($static, $dynamic) = $this->separateFilters($filters);
83 83
 
84 84
         $query = $category->products()
85 85
             ->getQuery()->select('products.*');
86 86
 
87
-        if(isset($static) && $static = $this->clearStaticFilters($static))
87
+        if (isset($static) && $static = $this->clearStaticFilters($static))
88 88
             $query = $this->applyStaticFilter($query, $static);
89 89
 
90
-        if(isset($dynamic) && $dynamic = $this->clearDynamicFilters($dynamic, $category))
90
+        if (isset($dynamic) && $dynamic = $this->clearDynamicFilters($dynamic, $category))
91 91
             $query = $this->applyDynamicFilter($query, $dynamic);
92 92
 
93 93
         $query->join('lots', 'lots.id', '=', 'products.lot_id')
94 94
             ->where('lots.status', Lot::STATUS_COMPLETE)
95 95
             ->where('lots.verify_status', Lot::STATUS_VERIFY_ACCEPTED);
96 96
 
97
-        if($subcategory)
97
+        if ($subcategory)
98 98
         {
99 99
             // todo: fix it, subcategory don;t incoming..
100 100
             $query = $query->where('products.sub_category_id', $subcategory->id);
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
     protected function applyStaticFilter($query, array $filters = null)
116 116
     {
117 117
         /** Price range static filter. */
118
-        if(isset($filters['price_min']) && isset($filters['price_max']))
118
+        if (isset($filters[ 'price_min' ]) && isset($filters[ 'price_max' ]))
119 119
         {
120 120
             $query->where(function($q) use ($filters){
121
-                $q->whereBetween('products.price', array($filters['price_min'], $filters['price_max']));
121
+                $q->whereBetween('products.price', array($filters[ 'price_min' ], $filters[ 'price_max' ]));
122 122
             });
123 123
         }
124 124
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         array_walk($filters, function($filter_val, $filter) use (&$query, &$tags, $filters, $dynamic_count, &$i){
142 142
             list($group, $tag) = $this->parseDynamicFilter($filter);
143 143
 
144
-            if($i !== $dynamic_count)
144
+            if ($i !== $dynamic_count)
145 145
             {
146 146
                 $tags .= sprintf('%s,', $tag);
147 147
             } else {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $available_filters = array_flip($this->getStaticFilters());
183 183
 
184 184
         $filters = array_filter($filters, function($filter_v, $filter_k) use ($available_filters){
185
-            return isset($available_filters[$filter_k]);
185
+            return isset($available_filters[ $filter_k ]);
186 186
         }, ARRAY_FILTER_USE_BOTH);
187 187
 
188 188
         return (!empty($filters)) ? $filters : null;
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
         $available_filters = $this->tags->getAvailableDynamicFilters($category);
202 202
 
203 203
         $filters = array_filter($filters, function($filter) use ($available_filters){
204
-            if($this->isDynamicFilter($filter))
204
+            if ($this->isDynamicFilter($filter))
205 205
             {
206 206
                 list($group, $tag) = $this->parseDynamicFilter($filter);
207 207
 
208
-                if (isset($available_filters[$group]))
209
-                    return in_array($tag, $available_filters[$group]);
208
+                if (isset($available_filters[ $group ]))
209
+                    return in_array($tag, $available_filters[ $group ]);
210 210
             }
211 211
         }, ARRAY_FILTER_USE_KEY);
212 212
 
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
     {
225 225
         $static_filters = $this->getStaticFilters();
226 226
 
227
-        $static = [];
227
+        $static = [ ];
228 228
         $dynamic = $filters;
229 229
         array_walk($static_filters, function($static_filter) use (&$static, &$dynamic){
230
-            if(isset($dynamic[$static_filter]))
230
+            if (isset($dynamic[ $static_filter ]))
231 231
             {
232
-                $static[$static_filter] = $dynamic[$static_filter];
232
+                $static[ $static_filter ] = $dynamic[ $static_filter ];
233 233
 
234
-                unset($dynamic[$static_filter]);
234
+                unset($dynamic[ $static_filter ]);
235 235
             }
236 236
         });
237 237
 
Please login to merge, or discard this patch.