From 9473b6a566c7a59365a2e25cdb4668d90cadde44 Mon Sep 17 00:00:00 2001 From: StyleJS-Bot Date: Sat, 27 Jan 2018 15:27:11 +0000 Subject: [PATCH 1/3] StyleJS fixes [skip ci] --- readme.md | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/readme.md b/readme.md index 5261256..514f9e5 100644 --- a/readme.md +++ b/readme.md @@ -1,10 +1,9 @@ ## LaraCart - Laravel Shopping Cart Package (http://laracart.lukepolo.com) -[![Build Status](https://travis-ci.org/lukepolo/laracart.svg?branch=master)](https://travis-ci.org/lukepolo/laracart) -[![Latest Stable Version](https://poser.pugx.org/lukepolo/laracart/v/stable)](https://packagist.org/packages/lukepolo/laracart) -[![Test Coverage](https://codeclimate.com/github/lukepolo/laracart/badges/coverage.svg)](https://codeclimate.com/github/lukepolo/laracart/coverage) -[![Total Downloads](https://poser.pugx.org/lukepolo/laracart/downloads)](https://packagist.org/packages/lukepolo/laracart) [![License](https://poser.pugx.org/lukepolo/laracart/license)](https://packagist.org/packages/lukepolo/laracart) + +[![Build Status](https://travis-ci.org/lukepolo/laracart.svg?branch=master)](https://travis-ci.org/lukepolo/laracart) [![Latest Stable Version](https://poser.pugx.org/lukepolo/laracart/v/stable)](https://packagist.org/packages/lukepolo/laracart) [![Test Coverage](https://codeclimate.com/github/lukepolo/laracart/badges/coverage.svg)](https://codeclimate.com/github/lukepolo/laracart/coverage) [![Total Downloads](https://poser.pugx.org/lukepolo/laracart/downloads)](https://packagist.org/packages/lukepolo/laracart) [![License](https://poser.pugx.org/lukepolo/laracart/license)](https://packagist.org/packages/lukepolo/laracart) ## Features + * Coupons * Session Based System * Cross Device Support @@ -15,26 +14,24 @@ * Endless item chaining for complex systems * Totals of all items within the item chains * Item Model Relation at a global and item level -* Quickly insert items with your own item models +* Quickly insert items with your own item models ## Laravel compatibility - Laravel | laracart -:---------|:---------- - 5.x | .* - 1.1.* - 5.4+ | 1.3.* - - +| Laravel | laracart | +| :------ | :--------- | +| 5.x | ._ - 1.1._ | +| 5.4+ | 1.3.\* | ## Installation Install the package through [Composer](http://getcomposer.org/). Edit your project's `composer.json` file by adding: { - "require": { - ........, - "lukepolo/laracart": "1.3.*" - } + "require": { + ........, + "lukepolo/laracart": "1.3.*" + } } If using 5.4 you will need to include the service providers / facade in `app/config/app.php`: @@ -52,16 +49,17 @@ Include the Facade : Copy over the configuration file by running the command: ``` - php artisan vendor:publish --provider='LukePOLO\LaraCart\LaraCartServiceProvider' + php artisan vendor:publish --provider='LukePOLO\LaraCart\LaraCartServiceProvider' ``` ### Documentation + http://laracart.lukepolo.com -To Contribute to documentation use this repo : +To Contribute to documentation use this repo : https://github.com/lukepolo/laracart-docs -License ----- +## License + MIT From 65133a37814e85dbd87e80f0906b9fd4529d0d0c Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Sat, 27 Jan 2018 15:27:15 +0000 Subject: [PATCH 2/3] Apply fixes from StyleCI [ci skip] [skip ci] --- src/LaraCart.php | 5 ++--- tests/TotalsTest.php | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/LaraCart.php b/src/LaraCart.php index b07fc0a..43c1948 100644 --- a/src/LaraCart.php +++ b/src/LaraCart.php @@ -570,11 +570,10 @@ public function taxTotal($format = true, $withFees = true) $discounted = 0; $totalDiscount = $this->totalDiscount(false, false); - if(config('laracart.discountsAlreadyTaxed')) { - $totalDiscount = 0; + if (config('laracart.discountsAlreadyTaxed')) { + $totalDiscount = 0; } - if ($this->count() != 0) { /** * @var diff --git a/tests/TotalsTest.php b/tests/TotalsTest.php index f9fd469..0814f67 100644 --- a/tests/TotalsTest.php +++ b/tests/TotalsTest.php @@ -305,8 +305,8 @@ public function testTaxationOnCoupons() $this->assertEquals(6639.12, $this->laracart->total(false)); } - public function testTaxationAndDiscount() { - + public function testTaxationAndDiscount() + { $this->app['config']->set('laracart.tax_by_item', true); $this->app['config']->set('laracart.discountTaxable', false); $this->app['config']->set('laracart.discountsAlreadyTaxed', true); @@ -322,7 +322,7 @@ public function testTaxationAndDiscount() { ); $coupon = new \LukePOLO\LaraCart\Coupons\Fixed('50EUR', 50, [ - 'description' => '50EUR' + 'description' => '50EUR', ]); $this->laracart->addCoupon($coupon); From f9a59c974b532d9fa251f246e27788a4d800b005 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Sat, 27 Jan 2018 15:27:20 +0000 Subject: [PATCH 3/3] Apply fixes from StyleCI [ci skip] [skip ci] --- src/LaraCart.php | 5 ++--- tests/TotalsTest.php | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/LaraCart.php b/src/LaraCart.php index b07fc0a..43c1948 100644 --- a/src/LaraCart.php +++ b/src/LaraCart.php @@ -570,11 +570,10 @@ public function taxTotal($format = true, $withFees = true) $discounted = 0; $totalDiscount = $this->totalDiscount(false, false); - if(config('laracart.discountsAlreadyTaxed')) { - $totalDiscount = 0; + if (config('laracart.discountsAlreadyTaxed')) { + $totalDiscount = 0; } - if ($this->count() != 0) { /** * @var diff --git a/tests/TotalsTest.php b/tests/TotalsTest.php index f9fd469..0814f67 100644 --- a/tests/TotalsTest.php +++ b/tests/TotalsTest.php @@ -305,8 +305,8 @@ public function testTaxationOnCoupons() $this->assertEquals(6639.12, $this->laracart->total(false)); } - public function testTaxationAndDiscount() { - + public function testTaxationAndDiscount() + { $this->app['config']->set('laracart.tax_by_item', true); $this->app['config']->set('laracart.discountTaxable', false); $this->app['config']->set('laracart.discountsAlreadyTaxed', true); @@ -322,7 +322,7 @@ public function testTaxationAndDiscount() { ); $coupon = new \LukePOLO\LaraCart\Coupons\Fixed('50EUR', 50, [ - 'description' => '50EUR' + 'description' => '50EUR', ]); $this->laracart->addCoupon($coupon);