Skip to content

Commit 36f822f

Browse files
brendtgithub-actions[bot]
authored andcommitted
Fix styling
1 parent a29ddab commit 36f822f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/SparkLine.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ public static function new(Collection $days): self
2727
public function __construct(Collection $days)
2828
{
2929
$this->days = $days
30-
->sortBy(fn(SparkLineDay $day) => $day->day->getTimestamp())
31-
->mapWithKeys(fn(SparkLineDay $day) => [$day->day->format('Y-m-d') => $day]);
30+
->sortBy(fn (SparkLineDay $day) => $day->day->getTimestamp())
31+
->mapWithKeys(fn (SparkLineDay $day) => [$day->day->format('Y-m-d') => $day]);
3232

3333
$this->maxValue = $this->resolveMaxValueFromDays();
3434
$this->maxItemAmount = $this->resolveMaxItemAmountFromDays();
3535
}
3636

3737
public function getTotal(): int
3838
{
39-
return $this->days->sum(fn(SparkLineDay $day) => $day->count) ?? 0;
39+
return $this->days->sum(fn (SparkLineDay $day) => $day->count) ?? 0;
4040
}
4141

4242
public function getPeriod(): Period
@@ -138,7 +138,7 @@ private function resolveMaxValueFromDays(): int
138138
}
139139

140140
return $this->days
141-
->sortByDesc(fn(SparkLineDay $day) => $day->count)
141+
->sortByDesc(fn (SparkLineDay $day) => $day->count)
142142
->first()
143143
->count;
144144
}
@@ -153,7 +153,7 @@ private function resolveCoordinates(): string
153153
$step = floor($this->width / $this->maxItemAmount);
154154

155155
return collect(range(0, $this->maxItemAmount))
156-
->map(fn(int $days) => (new DateTimeImmutable("-{$days} days"))->format('Y-m-d'))
156+
->map(fn (int $days) => (new DateTimeImmutable("-{$days} days"))->format('Y-m-d'))
157157
->reverse()
158158
->mapWithKeys(function (string $key) {
159159
/** @var SparkLineDay|null $day */
@@ -166,7 +166,7 @@ private function resolveCoordinates(): string
166166
];
167167
})
168168
->values()
169-
->map(fn(int $count, int $index) => $index * $step . ',' . $count)
169+
->map(fn (int $count, int $index) => $index * $step . ',' . $count)
170170
->implode(' ');
171171
}
172172
}

src/sparkLine.view.php

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

1010
echo PHP_EOL;
1111
}
12-
?>
12+
?>
1313
</linearGradient>
1414
<mask id="sparkline-<?= $id ?>" x="0" y="0" width="<?= $width ?>" height="<?= $height - 2 ?>">
1515
<polyline

0 commit comments

Comments
 (0)