Fix code style issues.
This commit is contained in:
parent
42c40e8c00
commit
8ff71e277e
5 changed files with 23 additions and 8 deletions
|
@ -280,6 +280,10 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
|
||||||
/**
|
/**
|
||||||
* Retrieves location types present within the system as options for select
|
* Retrieves location types present within the system as options for select
|
||||||
* form elements.
|
* form elements.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws \CiviCRM_API3_Exception
|
||||||
*/
|
*/
|
||||||
public function getLocationTypes() {
|
public function getLocationTypes() {
|
||||||
$location_types = array();
|
$location_types = array();
|
||||||
|
@ -296,6 +300,10 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
|
||||||
/**
|
/**
|
||||||
* Retrieves financial types present within the system as options for select
|
* Retrieves financial types present within the system as options for select
|
||||||
* form elements.
|
* form elements.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws \CiviCRM_API3_Exception
|
||||||
*/
|
*/
|
||||||
public function getFinancialTypes() {
|
public function getFinancialTypes() {
|
||||||
$financial_types = array();
|
$financial_types = array();
|
||||||
|
@ -313,6 +321,10 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
|
||||||
/**
|
/**
|
||||||
* Retrieves campaigns present within the system as options for select form
|
* Retrieves campaigns present within the system as options for select form
|
||||||
* elements.
|
* elements.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws \CiviCRM_API3_Exception
|
||||||
*/
|
*/
|
||||||
public function getGenderOptions() {
|
public function getGenderOptions() {
|
||||||
$genders = array();
|
$genders = array();
|
||||||
|
@ -335,6 +347,7 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
|
||||||
* Retrieves CiviSEPA creditors as options for select form elements.
|
* Retrieves CiviSEPA creditors as options for select form elements.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
*
|
||||||
* @throws \CiviCRM_API3_Exception
|
* @throws \CiviCRM_API3_Exception
|
||||||
*/
|
*/
|
||||||
public function getSepaCreditors() {
|
public function getSepaCreditors() {
|
||||||
|
|
|
@ -132,6 +132,8 @@ class CRM_Twingle_Form_Settings extends CRM_Core_Form {
|
||||||
* Get the settings we are going to allow to be set on this form.
|
* Get the settings we are going to allow to be set on this form.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws \CiviCRM_API3_Exception
|
||||||
*/
|
*/
|
||||||
function getFormSettings() {
|
function getFormSettings() {
|
||||||
if (empty($this->_settings)) {
|
if (empty($this->_settings)) {
|
||||||
|
|
|
@ -90,13 +90,15 @@ class CRM_Twingle_Submission {
|
||||||
|
|
||||||
// Get the gender ID defined within the profile, or return an error if none
|
// Get the gender ID defined within the profile, or return an error if none
|
||||||
// matches (i.e. an unknown gender was submitted).
|
// matches (i.e. an unknown gender was submitted).
|
||||||
if (!empty($params['user_gender']) && !$gender_id = $profile->getAttribute('gender_' . $params['user_gender'])) {
|
if (!empty($params['user_gender'])) {
|
||||||
throw new CiviCRM_API3_Exception(
|
if (!$gender_id = $profile->getAttribute('gender_' . $params['user_gender'])) {
|
||||||
E::ts('Gender could not be matched to existing gender.'),
|
throw new CiviCRM_API3_Exception(
|
||||||
'invalid_format'
|
E::ts('Gender could not be matched to existing gender.'),
|
||||||
);
|
'invalid_format'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$params['gender_id'] = $gender_id;
|
||||||
}
|
}
|
||||||
$params['gender_id'] = $gender_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -63,7 +63,6 @@ function _civicrm_api3_twingle_donation_Cancel_spec(&$params) {
|
||||||
* @return array API result descriptor
|
* @return array API result descriptor
|
||||||
* @see civicrm_api3_create_success
|
* @see civicrm_api3_create_success
|
||||||
* @see civicrm_api3_create_error
|
* @see civicrm_api3_create_error
|
||||||
* @throws API_Exception
|
|
||||||
*/
|
*/
|
||||||
function civicrm_api3_twingle_donation_Cancel($params) {
|
function civicrm_api3_twingle_donation_Cancel($params) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -56,7 +56,6 @@ function _civicrm_api3_twingle_donation_EndRecurring_spec(&$params) {
|
||||||
* @return array API result descriptor
|
* @return array API result descriptor
|
||||||
* @see civicrm_api3_create_success
|
* @see civicrm_api3_create_success
|
||||||
* @see civicrm_api3_create_error
|
* @see civicrm_api3_create_error
|
||||||
* @throws API_Exception
|
|
||||||
*/
|
*/
|
||||||
function civicrm_api3_twingle_donation_EndRecurring($params) {
|
function civicrm_api3_twingle_donation_EndRecurring($params) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue