Completed
Branch next (9144f5)
by Scott
04:11
created
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_cart_items_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_cart_items', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_cart_items', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->integer('cart_id')->unsigned()->index();
Please login to merge, or discard this patch.
updates/1.0/create_options_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_options', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_options', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->integer('product_id')->unsigned()->nullable()->index();
Please login to merge, or discard this patch.
traits/Subqueryable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $self = $this->getTable().'.*';
42 42
 
43
-        if (! in_array($self, $query->getQuery()->columns)) {
43
+        if (!in_array($self, $query->getQuery()->columns)) {
44 44
             $query->addSelect($self);
45 45
         }
46 46
 
Please login to merge, or discard this patch.
classes/DriverManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     /**
13 13
      * Construct.
14 14
      *
15
-     * @return void
15
+     * @return string
16 16
      */
17 17
     public function __construct()
18 18
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $drivers = [];
30 30
 
31 31
         foreach ($this->manager->getPlugins() as $id => $plugin) {
32
-            if (! method_exists($plugin, 'registerShopDrivers')) {
32
+            if (!method_exists($plugin, 'registerShopDrivers')) {
33 33
                 continue;
34 34
             }
35 35
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function getDriversByType($type)
55 55
     {
56
-        return array_filter($this->getDrivers(), function ($driver) use ($type) {
56
+        return array_filter($this->getDrivers(), function($driver) use ($type) {
57 57
             return $driver['type'] === $type;
58 58
         });
59 59
     }
Please login to merge, or discard this patch.
models/Cart.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@
 block discarded – undo
292 292
     /**
293 293
      * Save an item and sync the cart.
294 294
      *
295
-     * @param  \Bedard\Shop\Models\Item     $item
295
+     * @param  Inventory     $item
296 296
      * @return \Bedard\Shop\Models\Item
297 297
      */
298 298
     public function saveItem($item)
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             'product_id' => $inventory->product_id,
196 196
         ]);
197 197
 
198
-        $item->bindEvent('model.beforeSave', function () use ($inventory, $item) {
198
+        $item->bindEvent('model.beforeSave', function() use ($inventory, $item) {
199 199
             if ($item->quantity > $inventory->quantity) {
200 200
                 $item->quantity = $inventory->quantity;
201 201
             }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      */
232 232
     public static function processAbandoned()
233 233
     {
234
-        self::isAbandoned()->get()->each(function ($cart) {
234
+        self::isAbandoned()->get()->each(function($cart) {
235 235
             $cart->abandon();
236 236
         });
237 237
     }
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
     public function reduceAvailableInventory()
245 245
     {
246 246
         $id = $this->id;
247
-        Queue::push(function ($job) use ($id) {
247
+        Queue::push(function($job) use ($id) {
248 248
             $cart = Cart::with('items.inventory')->findOrFail($id);
249 249
 
250
-            $cart->items->each(function ($item) {
250
+            $cart->items->each(function($item) {
251 251
                 $item->reduceAvailableInventory();
252 252
             });
253 253
         });
@@ -280,9 +280,9 @@  discard block
 block discarded – undo
280 280
     public function restockInventories()
281 281
     {
282 282
         $id = $this->id;
283
-        Queue::push(function ($job) use ($id) {
283
+        Queue::push(function($job) use ($id) {
284 284
             $cart = Cart::with('items.inventory')->findOrFail($id);
285
-            $cart->items->each(function ($item) {
285
+            $cart->items->each(function($item) {
286 286
                 $item->inventory->quantity += $item->quantity;
287 287
                 $item->inventory->save();
288 288
             });
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         // reduce inventories if neccessary
371 371
         if ($status->is_reducing) {
372 372
             $id = $this->id;
373
-            Queue::push(function () use ($id) {
373
+            Queue::push(function() use ($id) {
374 374
                 $cart = Cart::findOrFail($id);
375 375
                 $cart->reduceAvailableInventory();
376 376
             });
Please login to merge, or discard this patch.
models/DriverConfig.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,6 @@
 block discarded – undo
63 63
     /**
64 64
      * Populate attriutes based on config so a form can be rendered.
65 65
      *
66
-     * @param  string   $class
67 66
      * @return void
68 67
      */
69 68
     public function populate()
Please login to merge, or discard this patch.
updates/1.0/create_driver_configs_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_driver_configs', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_driver_configs', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->string('class')->default('');
Please login to merge, or discard this patch.
updates/1.0/create_inventories_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_inventories', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_inventories', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->integer('product_id')->unsigned()->nullable()->index();
Please login to merge, or discard this patch.