From 0ef9723689963d01d2759f50f61f977efccd9633 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Tue, 29 May 2018 19:45:03 +0100 Subject: [PATCH] Commenting/unused variables --- CRM/Admin/Form/Options.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CRM/Admin/Form/Options.php b/CRM/Admin/Form/Options.php index bcb7739e14..ce018dd517 100644 --- a/CRM/Admin/Form/Options.php +++ b/CRM/Admin/Form/Options.php @@ -129,7 +129,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { } } - //setDefault of contact types for email greeting, postal greeting, addressee, CRM-4575 + // setDefault of contact types for email greeting, postal greeting, addressee, CRM-4575 if (in_array($this->_gName, array( 'email_greeting', 'postal_greeting', @@ -302,7 +302,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { $enabled->freeze(); } - //fix for CRM-3552, CRM-4575 + // fix for CRM-3552, CRM-4575 $showIsDefaultGroups = array( 'email_greeting', 'postal_greeting', @@ -322,7 +322,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { $this->add('checkbox', 'is_default', ts('Default Option?')); } - //get contact type for which user want to create a new greeting/addressee type, CRM-4575 + // get contact type for which user want to create a new greeting/addressee type, CRM-4575 if (in_array($this->_gName, array( 'email_greeting', 'postal_greeting', @@ -341,7 +341,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { if ($this->_gName == 'participant_status') { // For Participant Status options, expose the 'filter' field to track which statuses are "Counted", and the Visibility field - $element = $this->add('checkbox', 'filter', ts('Counted?')); + $this->add('checkbox', 'filter', ts('Counted?')); $this->add('select', 'visibility_id', ts('Visibility'), CRM_Core_PseudoConstant::visibility()); } if ($this->_gName == 'participant_role') { @@ -364,6 +364,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { * * @return array * array of errors / empty array. + * @throws \CRM_Core_Exception */ public static function formRule($fields, $files, $self) { $errors = array(); @@ -435,7 +436,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { public function postProcess() { if ($this->_action & CRM_Core_Action::DELETE) { $fieldValues = array('option_group_id' => $this->_gid); - $wt = CRM_Utils_Weight::delWeight('CRM_Core_DAO_OptionValue', $this->_id, $fieldValues); + CRM_Utils_Weight::delWeight('CRM_Core_DAO_OptionValue', $this->_id, $fieldValues); if (CRM_Core_BAO_OptionValue::del($this->_id)) { if ($this->_gName == 'phone_type') { -- 2.25.1