Skip to content

Commit b7e6315

Browse files
glennjacobsStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent d503a78 commit b7e6315

80 files changed

Lines changed: 441 additions & 326 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

database/migrations/2021_08_10_101547_create_media_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CreateMediaTable extends Migration
88
{
99
public function up()
1010
{
11-
if (! Schema::hasTable('media')) {
11+
if (!Schema::hasTable('media')) {
1212
Schema::create('media', function (Blueprint $table) {
1313
$table->bigIncrements('id');
1414

database/migrations/2021_08_17_142630_create_activity_log_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function up()
1010
{
1111
$tableName = config('activitylog.table_name');
1212

13-
if (! Schema::hasTable($tableName)) {
13+
if (!Schema::hasTable($tableName)) {
1414
Schema::create($tableName, function (Blueprint $table) {
1515
$table->bigIncrements('id');
1616
$table->string('log_name')->nullable();

database/state/ConvertProductTypeAttributesToProducts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function run()
1313
{
1414
$prefix = config('getcandy.database.table_prefix');
1515

16-
if (! $this->canRun()) {
16+
if (!$this->canRun()) {
1717
return;
1818
}
1919

database/state/EnsureDefaultTaxClassExists.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class EnsureDefaultTaxClassExists
99
{
1010
public function run()
1111
{
12-
if (! $this->canRun() || ! $this->shouldRun()) {
12+
if (!$this->canRun() || !$this->shouldRun()) {
1313
return;
1414
}
1515

@@ -32,6 +32,6 @@ protected function canRun()
3232

3333
protected function shouldRun()
3434
{
35-
return ! TaxClass::whereDefault(true)->count();
35+
return !TaxClass::whereDefault(true)->count();
3636
}
3737
}

database/state/EnsureUserOrdersHaveACustomer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EnsureUserOrdersHaveACustomer
1010
{
1111
public function run()
1212
{
13-
if (! $this->canRun()) {
13+
if (!$this->canRun()) {
1414
return;
1515
}
1616

src/Actions/Carts/CalculateLine.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ class CalculateLine
1414
/**
1515
* Execute the action.
1616
*
17-
* @param \GetCandy\Models\CartLine $cartLine
18-
* @param \Illuminate\Database\Eloquent\Collection $customerGroups
17+
* @param \GetCandy\Models\CartLine $cartLine
18+
* @param \Illuminate\Database\Eloquent\Collection $customerGroups
19+
*
1920
* @return \GetCandy\Models\CartLine
2021
*/
2122
public function execute(
@@ -29,7 +30,7 @@ public function execute(
2930
$unitQuantity = $purchasable->getUnitQuantity();
3031

3132
// we check if any cart line modifiers have already specified a unit price in their calculating() method
32-
if (! ($price = $cartLine->unitPrice) instanceof Price) {
33+
if (!($price = $cartLine->unitPrice) instanceof Price) {
3334
$priceResponse = Pricing::currency($cart->currency)
3435
->qty($cartLine->quantity)
3536
->currency($cart->currency)

src/Actions/Carts/CreateOrder.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public function __construct(OrderReferenceGeneratorInterface $generator)
2323
/**
2424
* Execute the action.
2525
*
26-
* @param \GetCandy\Models\Cart $cart
26+
* @param \GetCandy\Models\Cart $cart
27+
*
2728
* @return void
2829
*/
2930
public function execute(
@@ -56,9 +57,9 @@ public function execute(
5657
'tax_breakdown' => $cart->taxBreakdown->map(function ($tax) {
5758
return [
5859
'description' => $tax['description'],
59-
'identifier' => $tax['identifier'],
60-
'percentage' => $tax['amounts']->sum('percentage'),
61-
'total' => $tax['total']->value,
60+
'identifier' => $tax['identifier'],
61+
'percentage' => $tax['amounts']->sum('percentage'),
62+
'total' => $tax['total']->value,
6263
];
6364
})->values(),
6465
'tax_total' => $cart->taxTotal->value,
@@ -87,9 +88,9 @@ public function execute(
8788
'tax_breakdown' => $line->taxBreakdown->amounts->map(function ($amount) {
8889
return [
8990
'description' => $amount->description,
90-
'identifier' => $amount->identifier,
91-
'percentage' => $amount->percentage,
92-
'total' => $amount->price->value,
91+
'identifier' => $amount->identifier,
92+
'percentage' => $amount->percentage,
93+
'total' => $amount->price->value,
9394
];
9495
})->values(),
9596
'tax_total' => $line->taxAmount->value,
@@ -127,9 +128,9 @@ public function execute(
127128
'tax_breakdown' => $shippingAddress->taxBreakdown->amounts->map(function ($amount) {
128129
return [
129130
'description' => $amount->description,
130-
'identifier' => $amount->identifier,
131-
'percentage' => $amount->percentage,
132-
'total' => $amount->price->value,
131+
'identifier' => $amount->identifier,
132+
'percentage' => $amount->percentage,
133+
'total' => $amount->price->value,
133134
];
134135
})->values(),
135136
'tax_total' => $shippingAddress->shippingTaxTotal->value,

src/Actions/Carts/MergeCart.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ class MergeCart
1010
/**
1111
* Execute the action.
1212
*
13-
* @param \GetCandy\Models\Cart $target
14-
* @param \GetCandy\Models\Cart $source
13+
* @param \GetCandy\Models\Cart $target
14+
* @param \GetCandy\Models\Cart $source
15+
*
1516
* @return \GetCandy\Models\Cart
1617
*/
1718
public function execute(Cart $target, Cart $source)

src/Actions/Carts/ValidateCartForOrder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class ValidateCartForOrder
1616
/**
1717
* Execute the action.
1818
*
19-
* @param \GetCandy\Models\Cart $cart
19+
* @param \GetCandy\Models\Cart $cart
20+
*
2021
* @return void
2122
*/
2223
public function execute(
@@ -31,7 +32,7 @@ public function execute(
3132
}
3233

3334
// Do we have a billing address?
34-
if (! $cart->billingAddress) {
35+
if (!$cart->billingAddress) {
3536
throw new BillingAddressMissingException(
3637
__('getcandy::exceptions.carts.billing_missing')
3738
);
@@ -48,7 +49,7 @@ public function execute(
4849

4950
// Is this cart shippable and if so, does it have a shipping address.
5051
if ($cart->getManager()->isShippable()) {
51-
if (! $cart->shippingAddress) {
52+
if (!$cart->shippingAddress) {
5253
throw new ShippingAddressMissingException(
5354
__('getcandy::exceptions.carts.shipping_missing')
5455
);
@@ -64,7 +65,7 @@ public function execute(
6465
}
6566

6667
// Do we have a shipping option applied?
67-
if (! $cart->getManager()->getShippingOption()) {
68+
if (!$cart->getManager()->getShippingOption()) {
6869
throw new ShippingOptionMissingException();
6970
}
7071
}

src/Actions/Collections/SortProducts.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class SortProducts
1010
/**
1111
* Execute the action.
1212
*
13-
* @param \GetCandy\Models\Collection $collection
13+
* @param \GetCandy\Models\Collection $collection
14+
*
1415
* @return void
1516
*/
1617
public function execute(Collection $collection)

0 commit comments

Comments
 (0)