Skip to content

Commit 8625016

Browse files
glennjacobsStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent f8b07b7 commit 8625016

File tree

106 files changed

+580
-445
lines changed

Some content is hidden

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

106 files changed

+580
-445
lines changed

config/payments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
'types' => [
77
'cash-in-hand' => [
8-
'driver' => 'offline',
8+
'driver' => 'offline',
99
'authorized' => 'payment-offline',
1010
],
1111
],

database/factories/OrderFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public function definition(): array
2626
'tax_breakdown' => [
2727
[
2828
'description' => 'VAT',
29-
'total' => 200,
30-
'percentage' => 20,
29+
'total' => 200,
30+
'percentage' => 20,
3131
],
3232
],
3333
'tax_total' => $taxTotal,

database/factories/OrderLineFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public function definition(): array
3030
'tax_breakdown' => [
3131
[
3232
'description' => 'VAT',
33-
'total' => 200,
34-
'percentage' => 20,
33+
'total' => 200,
34+
'percentage' => 20,
3535
],
3636
],
3737
'tax_total' => $this->faker->numberBetween(1, 5000),

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,

0 commit comments

Comments
 (0)