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

Laravel 11 #1201

Merged
merged 3 commits into from
Mar 24, 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
4 changes: 2 additions & 2 deletions app/Models/MedalAnalytic.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public static function purgeSeason(Medal $medal, ?Season $season = null): void
$query->delete();
}

public function getTimePlayedAttribute(): int
public function getTimePlayedAttribute(): float
{
return now()->addSeconds($this->total_seconds_played)->diffInHours();
return now()->addSeconds($this->total_seconds_played)->diffInHours(absolute: true);
}

public function medal(): BelongsTo
Expand Down
4 changes: 2 additions & 2 deletions app/Models/ServiceRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public function getAverageScoreAttribute(): float
return $this->total_score / $this->total_matches;
}

public function getTimePlayedAttribute(): int
public function getTimePlayedAttribute(): float
{
return now()->addSeconds($this->total_seconds_played)->diffInHours();
return now()->addSeconds($this->total_seconds_played)->diffInHours(absolute: true);
}

public function getWinPercentColorAttribute(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function property(): string

public function displayProperty(Analytic $analytic): string
{
return number_format(now()->addSeconds((int) $analytic->value)->diffInHours());
return number_format(now()->addSeconds((int) $analytic->value)->diffInHours(absolute: true));
}

public function results(int $limit = 10): ?Collection
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
"doctrine/dbal": "^3.2",
"guzzlehttp/guzzle": "^7.4",
"jaybizzle/laravel-crawler-detect": "^1.3",
"laravel/framework": "^10.0",
"laravel/framework": "^11.0",
"laravel/horizon": "^v5.15.0",
"laravel/sanctum": "^3.2",
"laravel/socialite": "^5.5",
"laravel/tinker": "^2.5",
"league/csv": "^9.8",
Expand All @@ -24,7 +23,7 @@
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.5",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"nunomaduro/collision": "^8.1",
"larastan/larastan": "2.9.2",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ignition": "^2.0"
Expand Down
Loading