This commit is contained in:
@@ -30,9 +30,14 @@ class SeasonDto
|
||||
public function createSeasonArray(): array
|
||||
{
|
||||
$numberOfTeams = $this->numberOfTeams ?? 0;
|
||||
$teamList = [];
|
||||
if (!empty($this->teamDtoList))
|
||||
{
|
||||
$numberOfTeams = count($this->teamDtoList);
|
||||
foreach ($this->teamDtoList as $teamDto)
|
||||
{
|
||||
$teamList[] = $teamDto->toArray();
|
||||
}
|
||||
}
|
||||
return [
|
||||
'id' => $this->id ?? null,
|
||||
@@ -42,6 +47,7 @@ class SeasonDto
|
||||
'dateStart' => !empty($this->dateStart) ? $this->dateStart->format('Y-m-d'): null,
|
||||
'leagueId' => $this->leagueId ?? null,
|
||||
'leagueName' => $this->leagueName ?? null,
|
||||
'teams' => $teamList,
|
||||
'pointsPerWin' => $this->pointsPerWin ?? null,
|
||||
'pointsPerDraw' => $this->pointsPerDraw ?? null,
|
||||
'pointsPerLoss' => $this->pointsPerLoss ?? null,
|
||||
|
||||
Reference in New Issue
Block a user