}
/**
- * @param type $newState
+ * @param int $newState
* @void
*/
public function finish($newState = self::F_DONE) {
*/
public function getBaseFrame() {
if (empty($this->frames)) return NULL;
- return $this->frames[count($this->frames)-1];
+ return $this->frames[count($this->frames) - 1];
}
/**
* - version: string
* - function: callback (mixed)
* - params: array, varies
- * @return array API success object
+ * @return array API success object
*/
function civicrm_api3_generic_getfields($apiRequest) {
static $results = array();
$tracking = CRM_Utils_Array::value('tracking', $params);
if ($op == 'Added' || $op == 'Pending') {
- $extraReturnValues= array(
+ $extraReturnValues = array(
'total_count' => 0,
'added' => 0,
'not_added' => 0,
}
}
else {
- $extraReturnValues= array(
+ $extraReturnValues = array(
'total_count' => 0,
'removed' => 0,
'not_removed' => 0,
* @access public
*/
function civicrm_api3_job_cleanup($params) {
- $session = CRM_Utils_Array::value('session' , $params, true );
+ $session = CRM_Utils_Array::value('session', $params, true );
$tempTable = CRM_Utils_Array::value('tempTables', $params, true );
- $jobLog = CRM_Utils_Array::value('jobLog' , $params, true );
- $prevNext = CRM_Utils_Array::value('prevNext' , $params, true );
- $dbCache = CRM_Utils_Array::value('dbCache' , $params, false);
- $memCache = CRM_Utils_Array::value('memCache' , $params, false);
+ $jobLog = CRM_Utils_Array::value('jobLog', $params, true );
+ $prevNext = CRM_Utils_Array::value('prevNext', $params, true );
+ $dbCache = CRM_Utils_Array::value('dbCache', $params, false);
+ $memCache = CRM_Utils_Array::value('memCache', $params, false);
if ($session || $tempTable || $prevNext) {
CRM_Core_BAO_Cache::cleanup($session, $tempTable, $prevNext);
$tokens = CRM_Core_SelectValues::contactTokens();
switch ($params['usage']) {
- case 'Mailing' :
+ case 'Mailing':
$tokens = array_merge(CRM_Core_SelectValues::mailingTokens(), $tokens);
break;
- case 'ScheduleEventReminder' :
+ case 'ScheduleEventReminder':
$tokens = array_merge(CRM_Core_SelectValues::activityTokens(), $tokens);
$tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
$tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens);
break;
- case 'ManageEventScheduleReminder' :
+ case 'ManageEventScheduleReminder':
$tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
break;
}
* This api will return the membership records for the contacts
* having membership based on the relationship with the direct members.
*
- * @param Array $params
+ * @param array $params
* Key/value pairs for contact_id and some.
* options affecting the desired results; has legacy support
* for just passing the contact_id itself as the argument
* Input parameters.
*
* @return array array of properties, if error an array with an error id and error message
- * @example MembershipPaymentGet
+ * @example MembershipPaymentGet
* {@getfields MembershipPayment_get}
* @access public
*/
* This api is used for updating an existing membership status.
* Required parameters : id of a membership status
*
- * @param Array $params
+ * @param array $params
* An associative array of name/value property values of civicrm_membership_status.
* @deprecated - should just use create
*
* 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state.
* @param $is_flush
*
- * @return
+ * @return array
*/
-
function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour = 1, $is_flush) {
static $profileFields = array();
if ($is_flush) {
* @param bool $getCount
* Are we just after the count.
*
- * @return
+ * @return array
*/
function _civicrm_api3_get_using_query_object($entity, $params, $additional_options = array(), $getCount = NULL) {
*
* @daoName string DAO to check params agains
*
- * @return bool
+ * @return bool
* Sshould the missing fields be returned as an array (core error created as default)
* true if all fields present, depending on $result a core error is created of an array of missing fields is returned
* @access public
body {
- background: #EEE;
+ background: #eee;
}
#All {
font-family: Arial, sans-serif;
width: auto;
margin: 0.5em auto;
padding: 1em;
- border: 1px #CCC solid;
+ border: 1px #ccc solid;
border-radius: 10px;
background: #fff;
max-width: 1200px;
}
.testResults .error td {
- background-color: #C00;
+ background-color: #c00;
border: 1px #700 solid;
color: white;
}
p.error {
padding: 0.5em;
- background-color: #C00;
+ background-color: #c00;
border: 1px #700 solid;
color: white;
clear: both;
}
p.warning {
padding: 0.5em;
- background-color: #E70;
+ background-color: #e70;
border: 1px #A70 solid;
color: white;
clear: both;
}
p.good {
padding: 0.5em;
- background-color: #0C0;
+ background-color: #0c0;
border: 1px #070 solid;
color: white;
clear: both;
}
p.error a {
- color: #CCF;
+ color: #ccf;
}
.testResults {
font-size: 80%;
}
.testResults td {
- border: 1px #CCC solid;
+ border: 1px #ccc solid;
width: 400px;
padding: 0.2em;
}
<?php
/**
- * Implemenation of hook_civicrm_install
+ * Implements hook_civicrm_install
*/
function moduletest_civicrm_install() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'install');
}
/**
- * Implementation of hook_civicrm_postInstall
+ * Implements hook_civicrm_postInstall
*/
function moduletest_civicrm_postInstall() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'postInstall');
}
/**
- * Implementation of hook_civicrm_uninstall
+ * Implements hook_civicrm_uninstall
*/
function moduletest_civicrm_uninstall() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'uninstall');
}
/**
- * Implemenation of hook_civicrm_enable
+ * Implements hook_civicrm_enable
*/
function moduletest_civicrm_enable() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'enable');
}
/**
- * Implemenation of hook_civicrm_disable
+ * Implements hook_civicrm_disable
*/
function moduletest_civicrm_disable() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'disable');
$result = $this->callAPISuccess('contribution', 'get', array('return' => 'total_amount'));
$this->assertEquals(3, $result['count']);
foreach ($result['values'] as $contribution) {
- $this-> assertEquals($this->callAPISuccess('line_item', 'getvalue', array(
+ $this->assertEquals($this->callAPISuccess('line_item', 'getvalue', array(
'contribution_id' => $contribution['id'],
'return' => 'line_total',
$result = $this->callAPISuccess('contribution', 'get', array('return' => 'total_amount'));
$this->assertEquals(2, $result['count']);
foreach ($result['values'] as $contribution) {
- $this-> assertEquals($this->callAPISuccess('line_item', 'getvalue', array(
+ $this->assertEquals($this->callAPISuccess('line_item', 'getvalue', array(
'contribution_id' => $contribution['id'],
'return' => 'line_total',
}
/**
- * Implementation of hook_civicrm_post used with all our test cases
+ * An implementation of hook_civicrm_post used with all our test cases.
*
* @param $op
* @param string $objectName
*/
class CRM_Utils_HtmlToTextTest extends CiviUnitTestCase {
protected $_testInput = array(
- '<br><p>' => '', // empty test
+ '<br/><p>' => '', // empty test
'
<p>
This is a paragraph with <b>Bold</b> and <i>italics</i>
if (function_exists('variable_get') && variable_get('clean_url', '0') != '0') {
define('CIVICRM_CLEANURL', 1);
-} else {
+}
+else {
define('CIVICRM_CLEANURL', 0);
}
else {
$this->clickLink("xpath=//fieldset/legend[text()='Delivery Summary']/../table//tr[td/a[text()='{$key}']]/descendant::td[3]/span/a[2][text()='Advanced Search']");
}
- $this-> _verifyCriteria($key, $dataToCheck, $entity);
+ $this->_verifyCriteria($key, $dataToCheck, $entity);
}
}
}
$this->assertTrue(is_integer($baoObj->id), 'check first id');
$this->deletableTestObjects[$baoString][] = $baoObj->id;
$baos[] = $baoObj;
- $i ++;
+ $i++;
}
return $baos;
}
];
_.each(cases, function(caseDetails, caseIndex) {
- test("#"+caseIndex+": With group_type="+caseDetails.group_type, function() {
+ test("#" + caseIndex + ": With group_type=" + caseDetails.group_type, function() {
var ufGroupModel = new CRM.UF.UFGroupModel({
group_type: caseDetails.group_type
});