Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 25, 2024
1 parent eb5abe2 commit 60a45a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Http/Controllers/CustomerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ public function show(Request $request, Customer $customer): View
}

$periodFormat = [
'daily' => fn($date) => $date->toDateString(),
'monthly' => fn($date) => $date->format('Y-m'),
'annual' => fn($date) => $date->format('Y'),
'daily' => fn ($date) => $date->toDateString(),
'monthly' => fn ($date) => $date->format('Y-m'),
'annual' => fn ($date) => $date->format('Y'),
];

// Calculate the sums for each key (date) of the $customerPurchases array
foreach ($purchases as $purchase) {
if ($resolution === 'weekly') {
if ('weekly' === $resolution) {
foreach ($customerPurchases as $key => $value) {
// Split the period key into start and end dates (e.g., '2024-11-01 - 2024-11-07')
[$startOfWeek, $endOfWeek] = explode(' - ', $key);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/ChartResolution.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Konekt\AppShell\Models;

use Konekt\Enum\Enum;
Expand Down

0 comments on commit 60a45a3

Please sign in to comment.