}
}
- public function setPhone(Phone &$phone)
+ public function setPhone(Phone $phone)
{
if ($phone->link_type == Phone::LINK_COMPANY && $phone->link_id == $this->id) {
$this->phone = $phone;
}
}
- public function setAddress(Address &$address)
+ public function setAddress(Address $address)
{
if ($address->type == Address::LINK_COMPANY && $address->jobid == $this->id) {
$this->address = $address;
return $this->address;
}
- public function addPhone(Phone &$phone)
+ public function addPhone(Phone $phone)
{
if ($phone->link_type == Phone::LINK_JOB && $phone->link_id == $this->id && $phone->pid == $this->pid) {
$this->phones[$phone->uniqueId()] = $phone;
}
}
- public function addTerm(JobTerm &$term)
+ public function addTerm(JobTerm $term)
{
$this->terms[$term->jtid] = $term;
}
{
$a = $addresses->get(Profile::ADDRESS_PRO);
foreach ($a as $address) {
- if ($address->type == Address::LINK_JOB && array_key_exists($address->jobid, $this->jobs)) {
+ if ($address->type == Address::LINK_JOB && array_key_exists($address->id, $this->jobs)) {
$this->jobs[$address->id]->setAddress($address);
}
}
$terms = $jobterms->get();
foreach ($terms as $term) {
if ($this->pid == $term->pid && array_key_exists($term->jid, $this->jobs)) {
- $this->jobs[$term->jid]->addTerm(&$term);
+ $this->jobs[$term->jid]->addTerm($term);
}
}
}