Skip to content

Commit c301f76

Browse files
committed
INFRA-132 - Batch civicrm#7
1 parent 0639ae0 commit c301f76

File tree

37 files changed

+472
-510
lines changed

37 files changed

+472
-510
lines changed

CRM/ACL/Page/ACLBasic.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function run() {
112112
array(
113113
'title' => ts('Access Control'),
114114
'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1'),
115-
)
115+
),
116116
);
117117
CRM_Utils_System::appendBreadCrumb($breadCrumb);
118118

CRM/Admin/Form/ScheduleReminders.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public function buildQuickForm() {
6767
return;
6868
}
6969
elseif ($this->_action & (CRM_Core_Action::UPDATE)) {
70-
$this->_mappingID =
71-
CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionSchedule', $this->_id, 'mapping_id');
70+
$this->_mappingID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionSchedule', $this->_id, 'mapping_id');
7271
if ($this->_context == 'event') {
7372
$this->_compId = CRM_Utils_Request::retrieve('compId', 'Integer', $this);
7473
}

CRM/Case/Info.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function creatNewShortcut(&$shortCuts) {
199199
'query' => "reset=1&action=add&atype=$atype&context=standalone",
200200
'ref' => 'new-case',
201201
'title' => ts('Case'),
202-
)
202+
),
203203
));
204204
}
205205
}

CRM/Contact/BAO/Relationship.php

+11-13
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,15 @@ public static function createMultiple(&$params, $ids = array()) {
189189
*
190190
* @param array $params
191191
* (reference ) an assoc array of name/value pairs.
192-
* @param int $contactId
193-
* This is contact id for adding relationship.
194192
* @param array $ids
195193
* The array that holds all the db ids.
194+
* @param int $contactId
195+
* This is contact id for adding relationship.
196196
*
197197
* @return CRM_Contact_BAO_Relationship
198198
*/
199199
public static function add(&$params, $ids = array(), $contactId = NULL) {
200-
$relationshipId =
201-
CRM_Utils_Array::value('relationship', $ids, CRM_Utils_Array::value('id', $params));
200+
$relationshipId = CRM_Utils_Array::value('relationship', $ids, CRM_Utils_Array::value('id', $params));
202201

203202
$hook = 'create';
204203
if ($relationshipId) {
@@ -372,7 +371,7 @@ public static function getdefaults() {
372371
* @param array $params
373372
* (reference ) an assoc array of name/value pairs.
374373
*
375-
* @return boolean
374+
* @return bool
376375
*/
377376
public static function dataExists(&$params) {
378377
// return if no data present
@@ -407,7 +406,7 @@ public static function dataExists(&$params) {
407406
* @return array
408407
* array reference of all relationship types with context to current contact.
409408
*/
410-
static function getContactRelationshipType(
409+
public static function getContactRelationshipType(
411410
$contactId = NULL,
412411
$contactSuffix = NULL,
413412
$relationshipId = NULL,
@@ -582,7 +581,6 @@ public static function del($id) {
582581
*
583582
* @param $action
584583
*
585-
* @return null
586584
*/
587585
public static function disableEnableRelationship($id, $action) {
588586
$relationship = self::clearCurrentEmployer($id, $action);
@@ -668,7 +666,7 @@ public static function getContactIds($id) {
668666
* @param int $relationshipTypeId
669667
* Relationship type id.
670668
*
671-
* @return boolean
669+
* @return bool
672670
* true if it is valid relationship else false
673671
*/
674672
public static function checkRelationshipType($contact_a, $contact_b, $relationshipTypeId) {
@@ -739,7 +737,7 @@ public static function checkValidRelationship($params, $ids, $contactId) {
739737
* @param int $relationshipId
740738
* This is relationship id for the contact.
741739
*
742-
* @return boolean
740+
* @return bool
743741
* true if record exists else false
744742
*/
745743
public static function checkDuplicateRelationship(&$params, $id, $contactId = 0, $relationshipId = 0) {
@@ -1045,7 +1043,7 @@ public static function makeURLClause($contactId, $status, $numRelationship, $cou
10451043
* @return array|int
10461044
* relationship records
10471045
*/
1048-
static function getRelationship(
1046+
public static function getRelationship(
10491047
$contactId = NULL,
10501048
$status = 0, $numRelationship = 0,
10511049
$count = 0, $relationshipId = 0,
@@ -1700,7 +1698,7 @@ public static function disableExpiredRelationships() {
17001698
* Api input array.
17011699
* @param null $direction
17021700
*
1703-
* @return array
1701+
* @return array|void
17041702
*/
17051703
public static function membershipTypeToRelationshipTypes(&$params, $direction = NULL) {
17061704
$membershipType = civicrm_api3('membership_type', 'getsingle', array(
@@ -1709,12 +1707,12 @@ public static function membershipTypeToRelationshipTypes(&$params, $direction =
17091707
));
17101708
$relationshipTypes = $membershipType['relationship_type_id'];
17111709
if (empty($relationshipTypes)) {
1712-
return;
1710+
return NULL;
17131711
}
17141712
// if we don't have any contact data we can only filter on type
17151713
if (empty($params['contact_id']) && empty($params['contact_id_a']) && empty($params['contact_id_a'])) {
17161714
$params['relationship_type_id'] = array('IN' => $relationshipTypes);
1717-
return;
1715+
return NULL;
17181716
}
17191717
else {
17201718
$relationshipDirections = (array) $membershipType['relationship_direction'];

CRM/Contact/Form/Edit/IM.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = F
6666
$form->addSelect("im[$blockId][location_type_id]", array(
6767
'entity' => 'im',
6868
'class' => 'eight',
69-
'placeholder' => NULL
69+
'placeholder' => NULL,
7070
));
7171

7272
//IM box

CRM/Contribute/Form/ContributionPage/Settings.php

+16-19
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,19 @@ public function buildQuickForm() {
144144
$coreTypes = array('Contact', 'Organization');
145145

146146
$entities[] = array(
147-
'entity_name' => array ('contact_1'),
147+
'entity_name' => array('contact_1'),
148148
'entity_type' => 'OrganizationModel',
149149
);
150150

151151
if ($member && $member['is_active']) {
152152
$coreTypes[] = 'Membership';
153153
$entities[] = array(
154-
'entity_name' => array ('membership_1'),
154+
'entity_name' => array('membership_1'),
155155
'entity_type' => 'MembershipModel',
156156
);
157157
}
158-
159-
$allowCoreTypes = array_merge($coreTypes,
160-
CRM_Contact_BAO_ContactType::subTypes('Organization'));
158+
159+
$allowCoreTypes = array_merge($coreTypes, CRM_Contact_BAO_ContactType::subTypes('Organization'));
161160
$allowSubTypes = array();
162161

163162
$this->addProfileSelector('onbehalf_profile_id', ts('Organization Profile'), $allowCoreTypes, $allowSubTypes, $entities);
@@ -207,7 +206,7 @@ public function buildQuickForm() {
207206
'Contact',
208207
'Individual',
209208
'Organization',
210-
'Household'
209+
'Household',
211210
), CRM_Contact_BAO_ContactType::subTypes('Individual'));
212211
$allowSubTypes = array();
213212

@@ -349,19 +348,17 @@ public function postProcess() {
349348
$dao = CRM_Contribute_BAO_ContributionPage::create($params);
350349

351350
$ufJoinParams = array(
352-
'onbehalf_profile_id' =>
353-
array(
354-
'is_active' => 1,
355-
'module' => 'OnBehalf',
356-
'entity_table' => 'civicrm_contribution_page',
357-
'entity_id' => $dao->id,
358-
),
359-
'honor_block_is_active' =>
360-
array(
361-
'module' => 'soft_credit',
362-
'entity_table' => 'civicrm_contribution_page',
363-
'entity_id' => $dao->id,
364-
),
351+
'onbehalf_profile_id' => array(
352+
'is_active' => 1,
353+
'module' => 'OnBehalf',
354+
'entity_table' => 'civicrm_contribution_page',
355+
'entity_id' => $dao->id,
356+
),
357+
'honor_block_is_active' => array(
358+
'module' => 'soft_credit',
359+
'entity_table' => 'civicrm_contribution_page',
360+
'entity_id' => $dao->id,
361+
),
365362
);
366363

367364
foreach ($ufJoinParams as $index => $ufJoinParam) {

CRM/Contribute/Import/Form/DataSource.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function buildQuickForm() {
6868
$this->setMaxFileSize($uploadFileSize);
6969
$this->addRule('uploadFile', ts('File size should be less than %1 MBytes (%2 bytes)', array(
7070
1 => $uploadSize,
71-
2 => $uploadFileSize
71+
2 => $uploadFileSize,
7272
)), 'maxfilesize', $uploadFileSize);
7373
$this->addRule('uploadFile', ts('A valid file must be uploaded.'), 'uploadedfile');
7474
$this->addRule('uploadFile', ts('Input file must be in CSV format'), 'utf8File');

CRM/Core/BAO/MailSettings.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function defaultDAO($reset = FALSE) {
5454
static $mailSettings = array();
5555
$domainID = CRM_Core_Config::domainID();
5656
if (empty($mailSettings[$domainID]) || $reset) {
57-
$dao = new self;
57+
$dao = new self();
5858
$dao->is_default = 1;
5959
$dao->domain_id = $domainID;
6060
$dao->find(TRUE);
@@ -96,7 +96,7 @@ public static function defaultReturnPath() {
9696
/**
9797
* Return the "include message ID" flag from the default set of settings.
9898
*
99-
* @return boolean
99+
* @return bool
100100
* default include message ID
101101
*/
102102
public static function includeMessageId() {

CRM/Core/I18n/SchemaStructure_3_0_alpha1.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ public static function &indices() {
238238
}
239239

240240
/**
241-
* @return array
241+
* @return array $result
242242
*/
243-
static function &tables() {
243+
public static function &tables() {
244244
static $result = NULL;
245245
if (!$result) {
246246
$result = array_keys(self::columns());

CRM/Core/Payment/eWAY.php

+26-18
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
* ie - all other amounts will return a failed response.
9090
*
9191
* -----------------------------------------------------------------------------------------------
92-
**/
92+
*/
9393
class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
9494
# (not used, implicit in the API, might need to convert?)
9595
const CHARSET = 'UTF-8';
@@ -102,15 +102,16 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
102102
*/
103103
static private $_singleton = NULL;
104104

105-
/**********************************************************
105+
/**
106+
* *******************************************************
106107
* Constructor
107108
*
108109
* @param string $mode
109110
* The mode of operation: live or test.
110111
*
111-
* @param $paymentProcessor
112+
* @param int $paymentProcessor
112113
*
113-
* @return \CRM_Core_Payment_eWAY *******************************************************
114+
* *******************************************************
114115
*/
115116
public function __construct($mode, &$paymentProcessor) {
116117
// require Standard eWAY API libraries
@@ -123,10 +124,12 @@ public function __construct($mode, &$paymentProcessor) {
123124
$this->_processorName = ts('eWay');
124125
}
125126

126-
/**********************************************************
127+
/**
128+
* *******************************************************
127129
* This function sends request and receives response from
128130
* eWAY payment process
129-
**********************************************************/
131+
* *******************************************************
132+
*/
130133
public function doDirectPayment(&$params) {
131134
if (CRM_Utils_Array::value('is_recur', $params) == TRUE) {
132135
CRM_Core_Error::fatal(ts('eWAY - recurring payments not implemented'));
@@ -144,13 +147,13 @@ public function doDirectPayment(&$params) {
144147
//------------------------------------
145148
// create eWAY gateway objects
146149
//------------------------------------
147-
$eWAYRequest = new GatewayRequest;
150+
$eWAYRequest = new GatewayRequest();
148151

149152
if (($eWAYRequest == NULL) || (!($eWAYRequest instanceof GatewayRequest))) {
150153
return self::errorExit(9001, "Error: Unable to create eWAY Request object.");
151154
}
152155

153-
$eWAYResponse = new GatewayResponse;
156+
$eWAYResponse = new GatewayResponse();
154157

155158
if (($eWAYResponse == NULL) || (!($eWAYResponse instanceof GatewayResponse))) {
156159
return self::errorExit(9002, "Error: Unable to create eWAY Response object.");
@@ -420,9 +423,11 @@ public function _checkDupe($invoiceId) {
420423
return $contribution->find();
421424
}
422425

423-
/*************************************************************************************************
426+
/**
427+
* **********************************************************************************************
424428
* This function checks the eWAY response status - returning a boolean false if status != 'true'
425-
*************************************************************************************************/
429+
* ************************************************************************************************
430+
*/
426431
public function isError(&$response) {
427432
$status = $response->Status();
428433

@@ -432,9 +437,11 @@ public function isError(&$response) {
432437
return FALSE;
433438
}
434439

435-
/**************************************************
440+
/**
441+
* ************************************************
436442
* Produces error message and returns from class
437-
**************************************************/
443+
* *************************************************
444+
*/
438445
public function &errorExit($errorCode = NULL, $errorMessage = NULL) {
439446
$e = CRM_Core_Error::singleton();
440447

@@ -447,14 +454,17 @@ public function &errorExit($errorCode = NULL, $errorMessage = NULL) {
447454
return $e;
448455
}
449456

450-
/**************************************************
457+
/**
458+
* ************************************************
451459
* NOTE: 'doTransferCheckout' not implemented
452-
**************************************************/
460+
* ************************************************
461+
*/
453462
public function doTransferCheckout(&$params, $component) {
454463
CRM_Core_Error::fatal(ts('This function is not implemented'));
455464
}
456465

457-
/********************************************************************************************
466+
/**
467+
* *****************************************************************************************
458468
* This public function checks to see if we have the right processor config values set
459469
*
460470
* NOTE: Called by Events and Contribute to check config params are set prior to trying
@@ -467,10 +477,8 @@ public function doTransferCheckout(&$params, $component) {
467477
*
468478
* returns string $errorMsg if any errors found - null if OK
469479
*
470-
******************************************************************************************
480+
* *****************************************************************************************
471481
*/
472-
//function checkConfig( $mode ) // CiviCRM V1.9 Declaration
473-
// CiviCRM V2.0 Declaration
474482
public function checkConfig() {
475483
$errorMsg = array();
476484

CRM/Core/Permission/DrupalBase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public function getContactEmails($uids) {
259259
* @param array $array
260260
* The roles to check.
261261
*
262-
* @return boolean
262+
* @return bool
263263
* true if yes, else false
264264
*/
265265
public function checkGroupRole($array) {

CRM/Core/Permission/Joomla.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base {
4343
* @param string $str
4444
* The permission to check.
4545
*
46-
* @return boolean
46+
* @return bool
4747
* true if yes, else false
4848
*/
4949
public function check($str) {
@@ -104,7 +104,7 @@ public function translateJoomlaPermission($perm) {
104104
* @param array $array
105105
* The roles to check.
106106
*
107-
* @return boolean
107+
* @return bool
108108
* true if yes, else false
109109
*/
110110
public function checkGroupRole($array) {

CRM/Custom/Import/Form/DataSource.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function buildQuickForm() {
9797
$this->setMaxFileSize($uploadFileSize);
9898
$this->addRule('uploadFile', ts('File size should be less than %1 MBytes (%2 bytes)', array(
9999
1 => $uploadSize,
100-
2 => $uploadFileSize
100+
2 => $uploadFileSize,
101101
)), 'maxfilesize', $uploadFileSize);
102102
$this->addRule('uploadFile', ts('A valid file must be uploaded.'), 'uploadedfile');
103103
$this->addRule('uploadFile', ts('Input file must be in CSV format'), 'utf8File');

0 commit comments

Comments
 (0)