Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(NFC) Update for compliance with next phpcs standard #577

Merged
merged 1 commit into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions civicrm.module
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,10 @@ function civicrm_initialize() {
if (!include_once 'CRM/Core/Config.php') {
$failure = TRUE;
drupal_set_message(t("<strong><p class='error'>Oops! - The path for including CiviCRM code files is not set properly. Most likely there is an error in the <em>civicrm_root</em> setting in your CiviCRM settings file (!1). </p><p class='error'> &raquo; civicrm_root is currently set to: <em>!2</em></p><p class='error'>!3</p></strong>", array(
'!1' => $settingsFile,
'!2' => $civicrm_root,
'!3' => $errorMsgAdd,
))
);
'!1' => $settingsFile,
'!2' => $civicrm_root,
'!3' => $errorMsgAdd,
)));
return FALSE;
}

Expand Down Expand Up @@ -330,7 +329,7 @@ function _civicrm_registerClassLoader() {
*
* @param string $default contact type
*
* @return string $ctype
* @return string
* Contact type
*/
function civicrm_get_ctype($default = NULL) {
Expand Down Expand Up @@ -445,7 +444,7 @@ function civicrm_invoke() {
$pageContent = CRM_Core_Invoke::invoke($args);

$printedContent = ob_get_clean();
if (empty($pageContent) AND
if (empty($pageContent) and
!empty($printedContent)
) {
$pageContent = $printedContent;
Expand Down Expand Up @@ -664,7 +663,7 @@ function _civicrm_get_user_profile_id($name) {
));
continue;
}
catch (Exception $e){
catch (Exception $e) {
}
}
}
Expand Down Expand Up @@ -945,8 +944,7 @@ function civicrm_theme_registry_alter(&$theme_registry) {
*/
function civicrm_preprocess_page(&$variables) {
// to increase it's flexibility.
if (module_exists('date_popup') && (in_array(arg(0), array(
'civicrm', 'user')))) {
if (module_exists('date_popup') && (in_array(arg(0), array('civicrm', 'user')))) {

/**
* Have hidden this function as it is not needed,
Expand Down
3 changes: 2 additions & 1 deletion modules/civicrm_contact_ref/civicrm_contact_ref.module
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ function civicrm_contact_ref_field_info() {
'description' => t('Reference a CiviCRM contact.'),
'default_widget' => 'options_select',
'default_formatter' => 'civicrm_contact_ref_link',
'property_type' => 'integer', // note that this property is used by entity.module
// note that this property is used by entity.module
'property_type' => 'integer',
),
);
}
Expand Down
1 change: 1 addition & 0 deletions modules/civicrm_engage/civicrm_engage.module
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
define('CIVICRM_ENGAGE_CG_DEMOGRAPHICS_NAME', 'Demographics');
define('CIVICRM_ENGAGE_DEMOGRAPHICS_PREFIX', 'demographics_');
define('CIVICRM_ENGAGE_DEMOGRAPHICS_TITLE', 'Demographics');

function _civicrm_engage_getCustomGroupID($customGroupName) {
require_once 'CRM/Utils/Type.php';
$customGroupName = CRM_Utils_Type::escape($customGroupName, 'String');
Expand Down
16 changes: 8 additions & 8 deletions modules/civicrm_group_roles/civicrm_group_roles.module
Original file line number Diff line number Diff line change
Expand Up @@ -551,19 +551,19 @@ function civicrm_group_roles_add_rule_form_submit($form, &$form_state) {
if (isset($form_state['values']['edit_flag'])) {

$edit_rule = db_update('civicrm_group_roles_rules')->fields(array(
'role_id' => (int) $form_state['values']['add_rule']['select_role'],
'group_id' => (int) $form_state['values']['add_rule']['select_group'],
))->condition('id', (int) $form_state['values']['edit_flag'])->execute();
'role_id' => (int) $form_state['values']['add_rule']['select_role'],
'group_id' => (int) $form_state['values']['add_rule']['select_group'],
))->condition('id', (int) $form_state['values']['edit_flag'])->execute();

if ($edit_rule) {
drupal_set_message(t('Your association rule has been edited.'));
}
}
else {
$add_rule = db_insert('civicrm_group_roles_rules')->fields(array(
'role_id' => (int) $form_state['values']['add_rule']['select_role'],
'group_id' => (int) $form_state['values']['add_rule']['select_group'],
))->execute();
'role_id' => (int) $form_state['values']['add_rule']['select_role'],
'group_id' => (int) $form_state['values']['add_rule']['select_group'],
))->execute();

if ($add_rule) {
drupal_set_message(t('Your association rule has been added.'));
Expand Down Expand Up @@ -648,7 +648,8 @@ function civicrm_group_roles_add_remove_groups($roles, $user, $op) {
} //end foreach
} //end foreach

} //end if contact_id
}
//end if contact_id

else {
watchdog('civicrm_group_roles', $msg, $variables, WATCHDOG_ERROR);
Expand All @@ -660,7 +661,6 @@ function civicrm_group_roles_add_remove_groups($roles, $user, $op) {
} //endif $roles
}


/**
* Manual sync form. Provides a submit button to manually sync groups to roles.
*
Expand Down
16 changes: 8 additions & 8 deletions modules/civicrm_member_roles/civicrm_member_roles.module
Original file line number Diff line number Diff line change
Expand Up @@ -438,21 +438,21 @@ function civicrm_member_roles_add_rule_form_submit($form, &$form_state) {
//If edit_flag is set then process as an edit form, if not then process as an add form.
if (isset($form_state['values']['edit_flag'])) {
$edit_rule = db_update('civicrm_member_roles_rules')->fields(array(
'rid' => (int) $form_state['values']['add_rule']['select_role'],
'type_id' => (int) $form_state['values']['add_rule']['select_membership'],
'status_codes' => serialize($codes),
))->condition('rule_id', (int) $form_state['values']['edit_flag'])->execute();
'rid' => (int) $form_state['values']['add_rule']['select_role'],
'type_id' => (int) $form_state['values']['add_rule']['select_membership'],
'status_codes' => serialize($codes),
))->condition('rule_id', (int) $form_state['values']['edit_flag'])->execute();

if ($edit_rule) {
drupal_set_message(t('Your association rule has been edited.'));
}
}
else {
$add_rule = db_insert('civicrm_member_roles_rules')->fields(array(
'rid' => (int) $form_state['values']['add_rule']['select_role'],
'type_id' => (int) $form_state['values']['add_rule']['select_membership'],
'status_codes' => serialize($codes),
))->execute();
'rid' => (int) $form_state['values']['add_rule']['select_role'],
'type_id' => (int) $form_state['values']['add_rule']['select_membership'],
'status_codes' => serialize($codes),
))->execute();
if ($add_rule) {
drupal_set_message(t('Your association rule has been added.'));
}
Expand Down
1 change: 0 additions & 1 deletion modules/civicrm_og_sync/civicrm_og_sync.module
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
* mirroring OG for most organizations.
*/


/**
* Implements hook_node_update().
*/
Expand Down
1 change: 1 addition & 0 deletions modules/civicrm_rules/civicrm_rules.module
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ FROM civicrm_mailing
}
}
}

/**
* Implements hook_permission().
*/
Expand Down
6 changes: 4 additions & 2 deletions modules/civicrmtheme/civicrmtheme.module
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ function civicrmtheme_form_system_themes_admin_form_alter(&$form, $form_state) {
$form['admin_theme']['civicrm']['civicrm_admin'] = array(
'#type' => 'select',
'#options' => array(
0 => t('Default theme')) + $theme_list,
0 => t('Default theme'),
) + $theme_list,
'#title' => t('CiviCRM Administration theme'),
'#description' => t('Choose theme for CiviCRM administration/backend pages.'),
'#default_value' => variable_get('civicrmtheme_theme_admin', 0),
Expand All @@ -78,7 +79,8 @@ function civicrmtheme_form_system_themes_admin_form_alter(&$form, $form_state) {
$form['admin_theme']['civicrm']['civicrm_public'] = array(
'#type' => 'select',
'#options' => array(
0 => t('Default theme')) + $theme_list,
0 => t('Default theme'),
) + $theme_list,
'#title' => t('CiviCRM Public theme'),
'#description' => t('Choose theme for CiviCRM frontend pages.'),
'#default_value' => variable_get('civicrmtheme_theme_public', 0),
Expand Down