Skip to content

Commit a130e04

Browse files
committed
INFRA-132 - Batch civicrm#6
1 parent be0f31c commit a130e04

File tree

20 files changed

+317
-323
lines changed

20 files changed

+317
-323
lines changed

CRM/Campaign/Form/Task/Interview.php

+9-11
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function preProcess() {
8181
foreach (array(
8282
'surveyId',
8383
'contactIds',
84-
'interviewerId'
84+
'interviewerId',
8585
) as $fld) {
8686
$this->{"_$fld"} = $this->get($fld);
8787
}
@@ -300,7 +300,7 @@ public function buildQuickForm() {
300300
$this->addElement('select', "order_bys[{$i}][column]", ts('Order by Column'), $options);
301301
$this->addElement('select', "order_bys[{$i}][order]", ts('Order by Order'), array(
302302
'ASC' => 'Ascending',
303-
'DESC' => 'Descending'
303+
'DESC' => 'Descending',
304304
));
305305
}
306306

@@ -321,7 +321,7 @@ public function buildQuickForm() {
321321
if (!empty($this->_resultOptions)) {
322322
$this->add('select', "field[$contactId][result]", ts('Result'),
323323
array(
324-
'' => ts('- select -')
324+
'' => ts('- select -'),
325325
) +
326326
array_combine($this->_resultOptions, $this->_resultOptions)
327327
);
@@ -350,7 +350,7 @@ public function buildQuickForm() {
350350
'name' => ts('Done'),
351351
'subName' => 'interview',
352352
'isDefault' => TRUE,
353-
)
353+
),
354354
);
355355

356356
$buttons[] = array(
@@ -431,11 +431,10 @@ public function setDefaultValues() {
431431
else {
432432
$defaults['order_bys'] =
433433
array(
434-
1 =>
435-
array(
436-
'column' => 'contact_a.sort_name',
437-
'order' => 'ASC',
438-
),
434+
1 => array(
435+
'column' => 'contact_a.sort_name',
436+
'order' => 'ASC',
437+
),
439438
);
440439
}
441440
return $defaults;
@@ -458,15 +457,14 @@ public function postProcess() {
458457
foreach (array(
459458
'surveyId',
460459
'contactIds',
461-
'interviewerId'
460+
'interviewerId',
462461
) as $fld) {
463462
$this->controller->set($fld, $this->{"_$fld"});
464463
}
465464
$this->controller->set('interviewToRelease', TRUE);
466465
}
467466

468467
// vote is done through ajax
469-
return;
470468
}
471469

472470
/**

CRM/Case/BAO/Case.php

+7-6
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ public static function &create(&$params) {
153153
/**
154154
* Create case contact record
155155
*
156-
* @param array case_id, contact_id
156+
* @param array $params
157+
* case_id, contact_id
157158
*
158159
* @return object
159160
*/
@@ -195,7 +196,7 @@ public static function addCaseToContact($params) {
195196
/**
196197
* Delet case contact record
197198
*
198-
* @param int case_id
199+
* @param int $caseID
199200
*
200201
* @return Void
201202
*/
@@ -2341,7 +2342,7 @@ public static function mergeContacts($mainContactId, $otherContactId) {
23412342
*
23422343
* @return int|NULL
23432344
*/
2344-
static function mergeCases(
2345+
public static function mergeCases(
23452346
$mainContactId, $mainCaseId = NULL, $otherContactId = NULL,
23462347
$otherCaseId = NULL, $changeClient = FALSE) {
23472348
$moveToTrash = TRUE;
@@ -2800,7 +2801,7 @@ public static function buildPermissionLinks(&$tplParams, $activityParams) {
28002801
* @param bool $checkComponent
28012802
* Do we need to check component enabled.
28022803
*
2803-
* @return boolean
2804+
* @return bool
28042805
*/
28052806
public static function checkPermission($activityId, $operation, $actTypeId = NULL, $contactId = NULL, $checkComponent = TRUE) {
28062807
$allow = FALSE;
@@ -3111,7 +3112,7 @@ public static function accessCase($caseId, $denyClosed = TRUE) {
31113112
* @param int $activityID
31123113
* Activity id.
31133114
*
3114-
* @return boolean
3115+
* @return bool
31153116
*/
31163117
public static function isCaseActivity($activityID) {
31173118
$isCaseActivity = FALSE;
@@ -3382,7 +3383,7 @@ public static function getCaseClients($caseId) {
33823383
* @param array $props
33833384
* Whatever is known about this dao object.
33843385
*
3385-
* @return Array|bool
3386+
* @return array|bool
33863387
*/
33873388
public static function buildOptions($fieldName, $context = NULL, $props = array()) {
33883389
$className = __CLASS__;

CRM/Contribute/BAO/Contribution.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -642,16 +642,16 @@ public static function &exportableFields() {
642642
'title' => ts('Contribution Page'),
643643
'name' => 'contribution_page',
644644
'where' => 'civicrm_contribution_page.title',
645-
'data_type' => CRM_Utils_Type::T_STRING
646-
));
645+
'data_type' => CRM_Utils_Type::T_STRING,
646+
)
647+
);
647648

648649
$contributionNote = array(
649-
'contribution_note' =>
650-
array(
651-
'title' => ts('Contribution Note'),
652-
'name' => 'contribution_note',
653-
'data_type' => CRM_Utils_Type::T_TEXT,
654-
),
650+
'contribution_note' => array(
651+
'title' => ts('Contribution Note'),
652+
'name' => 'contribution_note',
653+
'data_type' => CRM_Utils_Type::T_TEXT,
654+
),
655655
);
656656

657657
$contributionRecurId = array(
@@ -844,7 +844,7 @@ public static function deleteContribution($id) {
844844
* (reference) store ids of duplicate contribs.
845845
* @param int $id
846846
*
847-
* @return boolean
847+
* @return bool
848848
* true if duplicate, false otherwise
849849
*/
850850
public static function checkDuplicate($input, &$duplicates, $id = NULL) {
@@ -1580,7 +1580,7 @@ public static function transitionComponents($params, $processContributionObject
15801580
WHERE membership_id=$membership->id
15811581
ORDER BY id DESC
15821582
LIMIT 1;";
1583-
$dao = new CRM_Core_DAO;
1583+
$dao = new CRM_Core_DAO();
15841584
$dao->query($sql);
15851585
if ($dao->fetch()) {
15861586
if (!empty($dao->membership_type_id)) {
@@ -2570,7 +2570,7 @@ public function _assignMessageVariablesToTemplate(&$values, $input, &$template,
25702570
*
25712571
* @param bool $isNotCancelled
25722572
*
2573-
* @return boolean
2573+
* @return bool
25742574
*/
25752575
public static function isCancelSubscriptionSupported($contributionId, $isNotCancelled = TRUE) {
25762576
$cacheKeyString = "$contributionId";
@@ -3156,7 +3156,7 @@ public static function deleteContactContribution($contactId) {
31563156
* @param array $props
31573157
* whatever is known about this dao object.
31583158
*
3159-
* @return Array|bool
3159+
* @return array|bool
31603160
*/
31613161
public static function buildOptions($fieldName, $context = NULL, $props = array()) {
31623162
$className = __CLASS__;

CRM/Contribute/Form/SoftCredit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static function buildQuickForm(&$form) {
133133
$form->addSelect("soft_credit_type[{$rowNumber}]", array(
134134
'entity' => 'contribution_soft',
135135
'field' => 'soft_credit_type_id',
136-
'label' => ts('Type')
136+
'label' => ts('Type'),
137137
));
138138
if (!empty($form->_softCreditInfo['soft_credit'][$rowNumber]['soft_credit_id'])) {
139139
$form->add('hidden', "soft_credit_id[{$rowNumber}]",

CRM/Contribute/Page/ContributionPage.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class CRM_Contribute_Page_ContributionPage extends CRM_Core_Page {
7171
*
7272
* @return array
7373
*/
74-
function &actionLinks() {
74+
public function &actionLinks() {
7575
// check if variable _actionsLinks is populated
7676
if (!isset(self::$_actionLinks)) {
7777
// helper variable for nicer formatting
@@ -294,7 +294,7 @@ public function run() {
294294
'url' => CRM_Utils_System::url(CRM_Utils_System::currentPath(),
295295
'reset=1'
296296
),
297-
)
297+
),
298298
);
299299

300300
// what action to take ?
@@ -624,7 +624,7 @@ public function whereClause(&$params, $sortBy = TRUE) {
624624
*
625625
* @return int[]
626626
*/
627-
function getCampaignIds() {
627+
pubic function getCampaignIds() {
628628
// The unfiltered value from the session cannot be trusted, it needs to be
629629
// processed to get a clean array of positive integers.
630630
$ids = array();
@@ -640,7 +640,7 @@ function getCampaignIds() {
640640
* @param $whereClause
641641
* @param array $whereParams
642642
*/
643-
function pager($whereClause, $whereParams) {
643+
public function pager($whereClause, $whereParams) {
644644

645645
$params['status'] = ts('Contribution %%StatusMessage%%');
646646
$params['csvString'] = NULL;

CRM/Core/BAO/ActionSchedule.php

+16-17
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public static function getMapping($id = NULL) {
7171
/**
7272
* Get all fields of the type Date
7373
*/
74-
7574
public static function getDateFields() {
7675
$allFields = CRM_Core_BAO_CustomField::getFields('');
7776
$dateFields = array('birth_date' => ts('Birth Date'));
@@ -489,7 +488,7 @@ public static function sendReminder($contactId, $to, $scheduleID, $from, $tokenP
489488
foreach (array(
490489
'text',
491490
'html',
492-
'sms_text'
491+
'sms_text',
493492
) as $elem) {
494493
$$elem = $smarty->fetch("string:{$$elem}");
495494
}
@@ -529,7 +528,7 @@ public static function sendReminder($contactId, $to, $scheduleID, $from, $tokenP
529528
$smsParams = array(
530529
'To' => $phoneNumber,
531530
'provider_id' => $schedule->sms_provider_id,
532-
'activity_subject' => $messageSubject
531+
'activity_subject' => $messageSubject,
533532
);
534533
$activityTypeID = CRM_Core_OptionGroup::getValue('activity_type',
535534
'SMS',
@@ -701,16 +700,16 @@ public static function sendMailings($mappingID, $now) {
701700
$activityStatusID = FALSE;
702701
if ($actionSchedule->record_activity) {
703702
if ($mapping->entity == 'civicrm_membership') {
704-
$activityTypeID =
705-
CRM_Core_OptionGroup::getValue('activity_type', 'Membership Renewal Reminder', 'name');
703+
$activityTypeID
704+
= CRM_Core_OptionGroup::getValue('activity_type', 'Membership Renewal Reminder', 'name');
706705
}
707706
else {
708-
$activityTypeID =
709-
CRM_Core_OptionGroup::getValue('activity_type', 'Reminder Sent', 'name');
707+
$activityTypeID
708+
= CRM_Core_OptionGroup::getValue('activity_type', 'Reminder Sent', 'name');
710709
}
711710

712-
$activityStatusID =
713-
CRM_Core_OptionGroup::getValue('activity_status', 'Completed', 'name');
711+
$activityStatusID
712+
= CRM_Core_OptionGroup::getValue('activity_status', 'Completed', 'name');
714713
}
715714

716715
if ($mapping->entity == 'civicrm_activity') {
@@ -753,7 +752,7 @@ public static function sendMailings($mappingID, $now) {
753752
'fee_amount',
754753
'contact_email',
755754
'contact_phone',
756-
'balance'
755+
'balance',
757756
);
758757
$extraSelect = ', ov.label as event_type, ev.title, ev.id as event_id, ev.start_date, ev.end_date, ev.summary, ev.description, address.street_address, address.city, address.state_province_id, address.postal_code, email.email as contact_email, phone.phone as contact_phone ';
759758

@@ -880,8 +879,8 @@ public static function sendMailings($mappingID, $now) {
880879
if ($toEmail || !(empty($toPhoneNumber) or $toDoNotSms)) {
881880
$to['email'] = $toEmail;
882881
$to['phone'] = $toPhoneNumber;
883-
$result =
884-
CRM_Core_BAO_ActionSchedule::sendReminder(
882+
$result
883+
= CRM_Core_BAO_ActionSchedule::sendReminder(
885884
$dao->contactID,
886885
$to,
887886
$actionSchedule->id,
@@ -913,8 +912,7 @@ public static function sendMailings($mappingID, $now) {
913912
$activityParams = array(
914913
'subject' => $actionSchedule->title,
915914
'details' => $actionSchedule->body_html,
916-
'source_contact_id' =>
917-
$session->get('userID') ? $session->get('userID') : $dao->contactID,
915+
'source_contact_id' => $session->get('userID') ? $session->get('userID') : $dao->contactID,
918916
'target_contact_id' => $dao->contactID,
919917
'activity_date_time' => date('YmdHis'),
920918
'status_id' => $activityStatusID,
@@ -1333,9 +1331,10 @@ public static function buildRecipientContacts($mappingID, $now, $params = array(
13331331
$valsqlInsertValues = CRM_Core_DAO::executeQuery($sqlInsertValues, array(
13341332
1 => array(
13351333
$actionSchedule->id,
1336-
'Integer'
1337-
)
1338-
));
1334+
'Integer',
1335+
),
1336+
)
1337+
);
13391338

13401339
$arrValues = array();
13411340
while ($valsqlInsertValues->fetch()) {

CRM/Core/BAO/Domain.php

-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ public static function version($skipUsingCache = FALSE) {
131131
/**
132132
* Get the location values of a domain
133133
*
134-
* @param NULL
135-
*
136134
* @return array
137135
* Location::getValues
138136
*/

0 commit comments

Comments
 (0)