Completed
Push — master ( 5d88b0...c6fa36 )
by Scott
02:16
created
updates/1.0/create_category_discount_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_category_discount', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_category_discount', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->integer('category_id')->unsigned()->nullable();
14 14
             $table->integer('discount_id')->unsigned()->nullable();
Please login to merge, or discard this patch.
updates/1.0/create_category_product_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_category_product', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_category_product', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->integer('category_id')->unsigned()->nullable();
14 14
             $table->integer('product_id')->unsigned()->nullable();
Please login to merge, or discard this patch.
updates/1.0/create_discount_product_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_discount_product', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_discount_product', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->integer('discount_id')->unsigned()->nullable();
14 14
             $table->integer('product_id')->unsigned()->nullable();
Please login to merge, or discard this patch.
models/Discount.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function filterFields($fields)
157 157
     {
158 158
         $fields->amount_exact->hidden = $this->is_percentage;
159
-        $fields->amount_percentage->hidden = ! $this->is_percentage;
159
+        $fields->amount_percentage->hidden = !$this->is_percentage;
160 160
     }
161 161
 
162 162
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     {
169 169
         $productIds = $this->products()->lists('id');
170 170
         $categories = $this->categories()
171
-            ->with(['products' => function ($product) {
171
+            ->with(['products' => function($product) {
172 172
                 return $product->select('id');
173 173
             }])
174 174
             ->get(['id']);
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public function getAmountExactAttribute()
191 191
     {
192
-        return ! $this->is_percentage ? $this->amount : 0;
192
+        return !$this->is_percentage ? $this->amount : 0;
193 193
     }
194 194
 
195 195
     /**
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     public function savePrices()
211 211
     {
212 212
         $id = $this->id;
213
-        Queue::push(function ($job) use ($id) {
213
+        Queue::push(function($job) use ($id) {
214 214
             $discount = Discount::findOrFail($id);
215 215
             $productIds = $discount->getAllProductIds();
216 216
             $products = Product::whereIn('id', $productIds)->select('id', 'base_price')->get();
@@ -261,10 +261,10 @@  discard block
 block discarded – undo
261 261
     public static function syncProductPrice(Product $product, array $categoryIds)
262 262
     {
263 263
         $discounts = self::isNotExpired()
264
-            ->whereHas('products', function ($query) use ($product) {
264
+            ->whereHas('products', function($query) use ($product) {
265 265
                 return $query->where('id', $product->id);
266 266
             })
267
-            ->orWhereHas('categories', function ($query) use ($categoryIds) {
267
+            ->orWhereHas('categories', function($query) use ($categoryIds) {
268 268
                 return $query->whereIn('id', $categoryIds);
269 269
             })
270 270
             ->get();
Please login to merge, or discard this patch.
controllers/Inventories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function validate()
19 19
     {
20 20
         $data = input('option');
21
-        if (! $data || ! is_array($data)) {
21
+        if (!$data || !is_array($data)) {
22 22
             return Response::make('Error', 422);
23 23
         }
24 24
 
Please login to merge, or discard this patch.
classes/ApiMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     public function handle($request, Closure $next)
9 9
     {
10
-        if (! ApiSettings::isEnabled()) {
10
+        if (!ApiSettings::isEnabled()) {
11 11
             abort(403, 'Forbidden');
12 12
             return;
13 13
         }
Please login to merge, or discard this patch.
routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::group(['middleware' => '\Bedard\Shop\Classes\ApiMiddleware'], function () {
3
+Route::group(['middleware' => '\Bedard\Shop\Classes\ApiMiddleware'], function() {
4 4
     Route::resource('api/bedard/shop/categories', 'Bedard\Shop\Api\Categories');
5 5
 });
Please login to merge, or discard this patch.
classes/BackendController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         foreach ($keys as $key => $value) {
26 26
             $isFiltered = gettype($value) === 'array';
27 27
 
28
-            if (! $isFiltered) {
28
+            if (!$isFiltered) {
29 29
                 $key = $value;
30 30
             }
31 31
 
Please login to merge, or discard this patch.
models/Category.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
     public static function getParentIds($children, \October\Rain\Database\Collection $categories = null)
180 180
     {
181
-        if (! is_array($children)) {
181
+        if (!is_array($children)) {
182 182
             $children = [$children];
183 183
         }
184 184
 
@@ -188,13 +188,13 @@  discard block
 block discarded – undo
188 188
 
189 189
         $parents = [];
190 190
         foreach ($children as $child) {
191
-            $category = $categories->filter(function ($model) use ($child) {
191
+            $category = $categories->filter(function($model) use ($child) {
192 192
                 return $model->id == $child;
193 193
             })->first();
194 194
 
195 195
             while ($category && $category->parent_id) {
196 196
                 $parents[] = $category->parent_id;
197
-                $category = $categories->filter(function ($model) use ($category) {
197
+                $category = $categories->filter(function($model) use ($category) {
198 198
                     return $model->id == $category->parent_id;
199 199
                 })->first();
200 200
             }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     public function isCustomSorted()
228 228
     {
229
-        return ! $this->product_sort_column && ! $this->product_sort_direction;
229
+        return !$this->product_sort_column && !$this->product_sort_direction;
230 230
     }
231 231
 
232 232
     /**
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      */
307 307
     protected function setNullParentId()
308 308
     {
309
-        if (! $this->parent_id) {
309
+        if (!$this->parent_id) {
310 310
             $this->parent_id = null;
311 311
         }
312 312
     }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      */
348 348
     public function syncInheritedProductsAfterDelete()
349 349
     {
350
-        if (! $this->dontSyncAfterDelete) {
350
+        if (!$this->dontSyncAfterDelete) {
351 351
             Product::syncAllInheritedCategories();
352 352
         }
353 353
     }
Please login to merge, or discard this patch.