return true;
} else {
throw new \Exception(
- 'No contribution #' . $id . ' (user ' .$this->login->id . ')'
+ 'No contribution #' . $id . ' (user ' . $this->login->id . ')'
);
}
} catch (\Exception $e) {
) {
$this->errors[] = str_replace(
'%field',
- '<a href="#' . $key . '">' . $this->getFieldLabel($key) .'</a>',
+ '<a href="#' . $key . '">' . $this->getFieldLabel($key) . '</a>',
_T("- Mandatory field %field empty.")
);
}
*/
public function getRowClass()
{
- return ( $this->_end_date != $this->_begin_date && $this->_is_cotis) ?
- 'cotis-normal' :
- 'cotis-give';
+ return ($this->_end_date != $this->_begin_date && $this->_is_cotis) ?
+ 'cotis-normal' : 'cotis-give';
}
/**
$date_end = new \DateTime($this->_end_date);
$date_start = new \DateTime($this->_begin_date);
$diff = $date_end->diff($date_start);
- return $diff->format('%y') * 12 + $diff->format('%m');
+ return $diff->format('%y')*12 + $diff->format('%m');
} else {
return '';
}
return null;
}
return ($this->isCotis()) ?
- PdfModel::INVOICE_MODEL :
- PdfModel::RECEIPT_MODEL;
+ PdfModel::INVOICE_MODEL : PdfModel::RECEIPT_MODEL;
break;
default:
return $this->$rname;