This commit is contained in:
Adrian Hopek
2022-01-24 10:23:08 +01:00
parent 75889a16e6
commit 62fc1e1ca9
14 changed files with 51 additions and 37 deletions

View File

@@ -16,7 +16,9 @@ trait InteractsWithYearPeriods
public function createYearPeriod(int $year): YearPeriod
{
/** @var YearPeriod $yearPeriod */
$yearPeriod = YearPeriod::factory()->create(["year" => $year]);
$yearPeriod = YearPeriod::factory()->create([
"year" => $year,
]);
return $yearPeriod;
}
@@ -28,7 +30,9 @@ trait InteractsWithYearPeriods
public function markYearPeriodAsSelected(YearPeriod $yearPeriod): void
{
$this->session([YearPeriodRetriever::SESSION_KEY => $yearPeriod->id]);
$this->session([
YearPeriodRetriever::SESSION_KEY => $yearPeriod->id,
]);
}
public function clearSelectedYearPeriod(): void
@@ -42,4 +46,4 @@ trait InteractsWithYearPeriods
YearPeriod::query()->delete();
}
}
}