Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5 - Bump dev dependencies #14

Merged
merged 6 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.composer
vendor
composer.lock
index.php
.phpunit.result.cache
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"license": "MIT",
"type": "library",
"require": {
"php": "^8.1",
"nesbot/carbon": "^2.63"
"php": "^8.2",
"nesbot/carbon": "^3.5"
},
"require-dev": {
"blumilksoftware/codestyle": "^1.10",
"phpunit/phpunit": "^9.5"
"blumilksoftware/codestyle": "^3.1",
"phpunit/phpunit": "^11.1.3"
},
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
php:
image: ghcr.io/blumilksoftware/php:8.1
image: ghcr.io/blumilksoftware/php:8.2
container_name: heatmap-builder-php
working_dir: /application
user: ${CURRENT_UID:-1000}
Expand Down
7 changes: 7 additions & 0 deletions src/HeatmapBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function build(iterable $data): array
$period = $this->getPeriod();

$bucket = [];

foreach ($period as $date) {
$bucket[] = new Tile(
label: match ($this->periodInterval) {
Expand Down Expand Up @@ -63,36 +64,42 @@ public function build(iterable $data): array
public function changeArrayAccessIndex(string $arrayAccessIndex): static
{
$this->arrayAccessIndex = $arrayAccessIndex;

return $this;
}

public function changeNow(Carbon $now): static
{
$this->now = $now;

return $this;
}

public function changePeriod(CarbonPeriod $period): static
{
$this->period = $period;

return $this;
}

public function changePeriodInterval(PeriodInterval $interval): static
{
$this->periodInterval = $interval;

return $this;
}

public function alignedToStartOfPeriod(): static
{
$this->alignedToStartOfPeriod = true;

return $this;
}

public function alignedToEndOfPeriod(): static
{
$this->alignedToEndOfPeriod = true;

return $this;
}

Expand Down
Loading