name)) { $leagueEntity->setName($leagueDto->name); } if (!empty($leagueDto->logo)) { $leagueEntity->setLogo($leagueDto->logo); } if (!empty($leagueDto->description)) { $leagueEntity->setDescription($leagueDto->description); } if (isset($leagueDto->pointsPerWin)) { $leagueEntity->setPointsPerWin($leagueDto->pointsPerWin); } if (!empty($leagueDto->pointsPerDraw)) { $leagueEntity->setPointsPerDraw($leagueDto->pointsPerDraw); } if (!empty($leagueDto->pointsPerLoss)) { $leagueEntity->setPointsPerLoss($leagueDto->pointsPerLoss); } if (!empty($leagueDto->matchesBetweenTeams)) { $leagueEntity->setMatchesBetweenTeams($leagueDto->matchesBetweenTeams); } if (!empty($leagueDto->blockedMatchDates)) { $leagueEntity->setBlockedMatchDates($leagueDto->blockedMatchDates); } if (!empty($leagueDto->city)) { $leagueEntity->setCity($leagueDto->city); } if (!empty($leagueDto->isPublic)) { $leagueEntity->setIsPublic($leagueDto->isPublic); } else { $leagueEntity->setIsPublic(true); } $leagueEntity->setActive(true); return $leagueEntity; } }