Exemplo n.º 1
0
 /**
  * @param TransferOffer $transferOffer
  * @param GameDate $gameDate
  *
  * @return Transfer
  */
 public static function createFromOffer(TransferOffer $transferOffer, GameDate $gameDate)
 {
     $transfer = new Transfer();
     $transfer->setOriginTeam($transferOffer->getOriginTeam());
     $transfer->setTargetTeam($transferOffer->getTargetTeam());
     $transfer->setPlayer($transferOffer->getPlayer());
     $transfer->setAmount($transferOffer->getAmount());
     $transfer->setSeason($gameDate->getSeason());
     return $transfer;
 }
Exemplo n.º 2
0
 /**
  * @param GameDate $gameDate
  *
  * @return Fixture[]
  */
 public function findByGameDate(GameDate $gameDate)
 {
     return $this->findBy(array('season' => $gameDate->getSeason(), 'week' => $gameDate->getWeek()));
 }
Exemplo n.º 3
0
 /**
  * @param int $season
  * @param int $week
  * @param GameDate $gameDate
  */
 private function assertEqualsGameDate($season, $week, GameDate $gameDate)
 {
     $this->assertEquals($season, $gameDate->getSeason());
     $this->assertEquals($week, $gameDate->getWeek());
 }