Ejemplo n.º 1
0
 public function addWorkingUnit(WorkingUnit $workingUnit)
 {
     if ($workingUnit->getEffortSpent() > $this->getEffortLeft()) {
         throw new Exception('Effort can\'t be more than left');
     }
     $workingUnit->setTask($this);
     $this->WorkingUnits[] = $workingUnit;
     $this->save();
 }