/**
* Get Option Group ID for Paper Sizes
*
- * @param void
- *
- * @return int Group ID (null if Group ID doesn't exist)
+ * @return int
+ * Group ID (null if Group ID doesn't exist)
*/
private static function _getGid() {
if (!self::$_gid) {
* @param string $returnURL
* URL of page calling this function.
*
- * @return array (reference) List of Paper Sizes
- * @static
*/
public static function &addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
* @param bool $namesOnly
* Return simple list of names.
*
- * @return array (reference) Paper Size list
- * @static
+ * @return array
+ * (reference) Paper Size list
*/
public static function &getList($namesOnly = FALSE) {
static $list = array();
/**
* Retrieve the default Paper Size values
*
- * @param NULL
- *
- * @return array Name/value pairs containing the default Paper Size values.
- * @static
+ * @return array
+ * Name/value pairs containing the default Paper Size values.
*/
public static function &getDefaultValues() {
$params = array('is_active' => 1, 'is_default' => 1);
* @param int $val
* Field value to search for.
*
- * @return array $values (reference) associative array of name/value pairs
+ * @return array
+ * (reference) associative array of name/value pairs
*/
public static function &getPaperFormat($field, $val) {
$params = array('is_active' => 1, $field => $val);
* @param int $name
* Paper Size name. Empty = get default Paper Size.
*
- * @return array $values (reference) associative array of name/value pairs
+ * @return array
+ * (reference) associative array of name/value pairs
*/
public static function &getByName($name) {
return self::getPaperFormat('name', $name);
* @param int $id
* Paper Size id. 0 = get default Paper Size.
*
- * @return array $values (reference) associative array of name/value pairs
+ * @return array
+ * (reference) associative array of name/value pairs
*/
public static function &getById($id) {
return self::getPaperFormat('id', $id);
* @param null $default
*
* @return value
- * @static
*/
public static function getValue($field, &$values, $default = NULL) {
if (array_key_exists($field, self::$optionValueFields)) {
switch (self::$optionValueFields[$field]['type']) {
case CRM_Utils_Type::T_INT:
- return (int)CRM_Utils_Array::value($field, $values, $default);
+ return (int) CRM_Utils_Array::value($field, $values, $default);
case CRM_Utils_Type::T_FLOAT:
// Round float values to three decimal places and trim trailing zeros.
$f = sprintf('%05.3f', $values[$field]);
$f = rtrim($f, '0');
$f = rtrim($f, '.');
- return (float)(empty($f) ? '0' : $f);
+ return (float) (empty($f) ? '0' : $f);
}
return CRM_Utils_Array::value($field, $values, $default);
}
* @param array $values
* (reference ) an assoc array to hold the flattened values.
*
- * @return CRM_Core_DAO_OptionValue object
- * @static
+ * @return CRM_Core_DAO_OptionValue
*/
public static function retrieve(&$params, &$values) {
$optionValue = new CRM_Core_DAO_OptionValue();
* @param int $id
* ID of the Paper Size to be deleted.
*
- * @static
*/
public static function del($id) {
if ($id) {