Ejemplo n.º 1
0
 public function addMatchStatistics(MatchPlayerStatistics $mps)
 {
     $this->setAccurateCrosses($this->getAccurateCrosses() + $mps->getAccurateCrosses());
     $this->setAccurateLongBalls($this->getAccurateLongBalls() + $mps->getAccurateLongBalls());
     $this->setAccuratePasses($this->getAccuratePasses() + $mps->getAccuratePasses());
     $this->setAccurateThroughBalls($this->getAccurateThroughBalls() + $mps->getAccurateThroughBalls());
     $this->setAerialLost($this->getAerialLost() + $mps->getAerialLost());
     $this->setAerialWon($this->getAerialWon() + $mps->getAerialWon());
     $this->setAssists($this->getAssists() + $mps->getAssists());
     $this->setBlockedShots($this->getBlockedShots() + $mps->getBlockedShots());
     $this->setClaims($this->getClaims() + $mps->getClaims());
     $this->setDispossessed($this->getDispossessed() + $mps->getDispossessed());
     $this->setDribblesLost($this->getDribblesLost() + $mps->getDribblesLost());
     $this->setDribblesWon($this->getDribblesWon() + $mps->getDribblesWon());
     $this->setEffectiveClearances($this->getEffectiveClearances() + $mps->getEffectiveClearances());
     $this->setErrorLeadGoal($this->getErrorLeadGoal() + $mps->getErrorLeadGoal());
     $this->setErrorLeadShot($this->getErrorLeadShot() + $mps->getErrorLeadShot());
     $this->setFouls($this->getFouls() + $mps->getFouls());
     $this->setGamesStarted($this->getGamesStarted() + $mps->getGameStarted());
     $this->setGoalsScored($this->getGoalsScored() + $mps->getGoalsScored());
     $this->setInterceptions($this->getInterceptions() + $mps->getInterceptions());
     $this->setKeyPasses($this->getKeyPasses() + $mps->getKeyPasses());
     $this->setManOfTheMatch($this->getManOfTheMatch() + $mps->getManOfTheMatch());
     $this->setMinsPlayed($this->getMinsPlayed() + $mps->getMinsPlayed());
     $this->setOffsides($this->getOffsides() + $mps->getOffsides());
     $this->setOffsidesProvoked($this->getOffsidesProvoked() + $mps->getOffsidesProvoked());
     $this->setOwnGoalsScored($this->getOwnGoalsScored() + $mps->getOwnGoalsScored());
     $this->setPunches($this->getPunches() + $mps->getPunches());
     $this->setRedCards($this->getRedCards() + $mps->getRedCards());
     $this->setSaves($this->getSaves() + $mps->getSaves());
     $this->setSecondYellowCards($this->getSecondYellowCards() + $mps->getSecondYellowCards());
     $this->setShotsBlocked($this->getShotsBlocked() + $mps->getShotsBlocked());
     $this->setShotsHitPost($this->getShotsHitPost() + $mps->getShotsHitPost());
     $this->setShotsOnTarget($this->getShotsOnTarget() + $mps->getShotsOnTarget());
     if ($mps->getSubstitutionType() == 1) {
         $this->setSubOff($this->getSubOff() + 1);
         $this->setSubOn($this->getSubOn() == null ? 0 : $this->getSubOn());
     } elseif ($mps->getSubstitutionType() == 2) {
         $this->setSubOn($this->getSubOn() + 1);
         $this->setSubOff($this->getSubOff() == null ? 0 : $this->getSubOff());
     } else {
         $this->setSubOff($this->getSubOff() == null ? 0 : $this->getSubOff());
         $this->setSubOn($this->getSubOn() == null ? 0 : $this->getSubOn());
     }
     $this->setTotalClearances($this->getTotalClearances() + $mps->getTotalClearances());
     $this->setTotalCrosses($this->getTotalCrosses() + $mps->getTotalCrosses());
     $this->setTotalLongBalls($this->getTotalLongBalls() + $mps->getTotalLongBalls());
     $this->setTotalPasses($this->getTotalPasses() + $mps->getTotalPasses());
     $this->setTotalShots($this->getTotalShots() + $mps->getTotalShots());
     $this->setTotalTackles($this->getTotalTackles() + $mps->getTotalTackles());
     $this->setTotalThroughBalls($this->getTotalThroughBalls() + $mps->getTotalThroughBalls());
     $this->setTouches($this->getTouches() + $mps->getTouches());
     $this->setTurnovers($this->getTurnovers() + $mps->getTurnovers());
     $this->setWasDribbled($this->getWasDribbled() + $mps->getWasDribbled());
     $this->setWasFouled($this->getWasFouled() + $mps->getWasFouled());
     $this->setYellowCards($this->getYellowCards() + $mps->getYellowCards());
 }