From: atif-shaikh .
* An offset to check for.
*
';
CRM_Core_Session::setStatus($status, ts('Relationship created.', array(
'count' => $valid,
- 'plural' => 'Relationships created.'
+ 'plural' => 'Relationships created.',
)), 'success', array('expires' => 0));
}
}
diff --git a/CRM/Contact/Form/Task/PickProfile.php b/CRM/Contact/Form/Task/PickProfile.php
index b2f46d3c5b..05c7774450 100644
--- a/CRM/Contact/Form/Task/PickProfile.php
+++ b/CRM/Contact/Form/Task/PickProfile.php
@@ -77,7 +77,7 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task {
if (count($this->_contactIds) > $this->_maxContacts) {
CRM_Core_Session::setStatus(ts("The maximum number of contacts you can select for Batch Update is %1. You have selected %2. Please select fewer contacts from your search results and try again.", array(
1 => $this->_maxContacts,
- 2 => count($this->_contactIds)
+ 2 => count($this->_contactIds),
)), ts('Maximum Exceeded'), 'error');
$validate = TRUE;
}
diff --git a/CRM/Contribute/BAO/ManagePremiums.php b/CRM/Contribute/BAO/ManagePremiums.php
index 28da593c42..a46c380ae8 100644
--- a/CRM/Contribute/BAO/ManagePremiums.php
+++ b/CRM/Contribute/BAO/ManagePremiums.php
@@ -133,7 +133,6 @@ class CRM_Contribute_BAO_ManagePremiums extends CRM_Contribute_DAO_Product {
*
* @param int $productID
*/
-
public static function del($productID) {
//check dependencies
$premiumsProduct = new CRM_Contribute_DAO_PremiumsProduct();
diff --git a/CRM/Core/Block.php b/CRM/Core/Block.php
index 8f6a9d635f..2b6366ab09 100644
--- a/CRM/Core/Block.php
+++ b/CRM/Core/Block.php
@@ -241,7 +241,7 @@ class CRM_Core_Block {
if ($value['active']) {
if (in_array($id, array(
self::ADD,
- self::CREATE_NEW
+ self::CREATE_NEW,
))) {
$hasAccess = TRUE;
if (!CRM_Core_Permission::check('add contacts') &&
@@ -329,7 +329,7 @@ class CRM_Core_Block {
$urlArray = array(
'fullTextSearchID' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue',
'CRM_Contact_Form_Search_Custom_FullText', 'value', 'name'
- )
+ ),
);
self::setProperty(self::FULLTEXT_SEARCH, 'templateValues', $urlArray);
break;
@@ -369,7 +369,7 @@ class CRM_Core_Block {
'query' => 'action=add&reset=1&context=standalone',
'ref' => 'new-activity',
'title' => ts('Activity'),
- )
+ ),
));
$components = CRM_Core_Component::getEnabledComponents();
@@ -392,7 +392,7 @@ class CRM_Core_Block {
'query' => 'atype=3&action=add&reset=1&context=standalone',
'ref' => 'new-email',
'title' => ts('Email'),
- )
+ ),
));
if (CRM_Core_Permission::check('edit groups')) {
@@ -402,7 +402,7 @@ class CRM_Core_Block {
'query' => 'reset=1',
'ref' => 'new-group',
'title' => ts('Group'),
- )
+ ),
));
}
@@ -413,7 +413,7 @@ class CRM_Core_Block {
'query' => 'reset=1&action=add',
'ref' => 'new-tag',
'title' => ts('Tag'),
- )
+ ),
));
}
@@ -481,7 +481,7 @@ class CRM_Core_Block {
'path' => 'civicrm/user',
'query' => 'reset=1',
'title' => ts('My Contact Dashboard'),
- )
+ ),
);
}
@@ -590,7 +590,7 @@ class CRM_Core_Block {
// return if upgrade mode
$config = CRM_Core_Config::singleton();
if ($config->isUpgradeMode()) {
- return;
+ return NULL;
}
if (!self::getProperty($id, 'active')) {
diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php
index 8a16fa3652..ae0bab6e0d 100644
--- a/CRM/Core/Error.php
+++ b/CRM/Core/Error.php
@@ -57,7 +57,7 @@ class CRM_Exception extends PEAR_Exception {
* - PEAR_Exception(string $message, array $causes);
* - PEAR_Exception(string $message, array $causes, int $code);
*
- * @param string exception message
+ * @param string $message exception message
* @param int $code
* @param Exception $previous
*/
@@ -167,7 +167,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
* the errors we expect are from the pear modules DB, DB_DataObject
* which currently use PEAR::raiseError to notify of error messages.
*
- * @param object PEAR_Error
+ * @param object $pearError PEAR_Error
*
* @return void
*/
@@ -461,11 +461,11 @@ class CRM_Core_Error extends PEAR_ErrorStack {
* Outputs pre-formatted debug information. Flushes the buffers
* so we can interrupt a potential POST/redirect
*
- * @param string name of debug section
- * @param mixed reference to variables that we need a trace of
- * @param bool should we log or return the output
- * @param bool whether to generate a HTML-escaped output
- * @param bool should we check permissions before displaying output
+ * @param string $name name of debug section
+ * @param $variable mixed reference to variables that we need a trace of
+ * @param bool $log should we log or return the output
+ * @param bool $html whether to generate a HTML-escaped output
+ * @param bool $checkPermission should we check permissions before displaying output
* useful when we die during initialization and permissioning
* subsystem is not initialized - CRM-13765
*
@@ -526,7 +526,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
* @see CRM_Core_Error::debug()
* @see CRM_Core_Error::debug_log_message()
*/
- static function debug_var(
+ public static function debug_var(
$variable_name,
$variable,
$print = TRUE,
diff --git a/CRM/Core/I18n/Schema.php b/CRM/Core/I18n/Schema.php
index 61f5dc2112..f8fb5ed044 100644
--- a/CRM/Core/I18n/Schema.php
+++ b/CRM/Core/I18n/Schema.php
@@ -121,7 +121,7 @@ class CRM_Core_I18n_Schema {
* @return void
*/
public static function makeSinglelingual($retain) {
- $domain = new CRM_Core_DAO_Domain;
+ $domain = new CRM_Core_DAO_Domain();
$domain->find(TRUE);
$locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
@@ -131,7 +131,7 @@ class CRM_Core_I18n_Schema {
}
// lets drop all triggers first
- $logging = new CRM_Logging_Schema;
+ $logging = new CRM_Logging_Schema();
$logging->dropTriggers();
// turn subsequent tables singlelingual
@@ -166,13 +166,13 @@ class CRM_Core_I18n_Schema {
*
* @return void
*/
- static function makeSinglelingualTable(
+ public static function makeSinglelingualTable(
$retain,
$table,
$class = 'CRM_Core_I18n_SchemaStructure',
$triggers = array()
) {
- $domain = new CRM_Core_DAO_Domain;
+ $domain = new CRM_Core_DAO_Domain();
$domain->find(TRUE);
$locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
@@ -212,7 +212,7 @@ class CRM_Core_I18n_Schema {
$queries = array_merge($queries, self::createIndexQueries(NULL, $table));
// execute the queries without i18n rewriting
- $dao = new CRM_Core_DAO;
+ $dao = new CRM_Core_DAO();
foreach ($queries as $query) {
$dao->query($query, FALSE);
}
@@ -318,7 +318,7 @@ class CRM_Core_I18n_Schema {
$indices =& $class::indices();
$tables =& $class::tables();
$queries = array();
- $dao = new CRM_Core_DAO;
+ $dao = new CRM_Core_DAO();
// get all of the already existing indices
$existing = array();
@@ -562,7 +562,7 @@ class CRM_Core_I18n_Schema {
foreach ($locales as $old) {
$trigger[] = "ELSEIF NEW.{$column}_{$old} IS NOT NULL THEN";
foreach (array_merge($locales, array(
- $locale
+ $locale,
)) as $loc) {
if ($loc == $old) {
continue;
@@ -593,7 +593,7 @@ class CRM_Core_I18n_Schema {
foreach ($locales as $old) {
$trigger[] = "ELSEIF NEW.{$column}_{$old} IS NOT NULL THEN";
foreach (array_merge($locales, array(
- $locale
+ $locale,
)) as $loc) {
if ($loc == $old) {
continue;
diff --git a/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php b/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php
index 09ce51c5fd..3ac06772d4 100644
--- a/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php
+++ b/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php
@@ -36,7 +36,7 @@ class CRM_Core_I18n_SchemaStructure_3_1_alpha1 {
/**
* @return array
*/
- static function &columns() {
+ public static function &columns() {
static $result = NULL;
if (!$result) {
$result = array(
diff --git a/CRM/Core/IDS.php b/CRM/Core/IDS.php
index c65a417d87..5b5bb44b69 100644
--- a/CRM/Core/IDS.php
+++ b/CRM/Core/IDS.php
@@ -52,16 +52,16 @@ class CRM_Core_IDS {
* This function includes the IDS vendor parts and runs the
* detection routines on the request array.
*
- * @param object cake controller object
+ * @param object $args cake controller object
*
- * @return boolean
+ * @return bool
*/
public function check(&$args) {
// lets bypass a few civicrm urls from this check
static $skip = array('civicrm/admin/setting/updateConfigBackend', 'civicrm/admin/messageTemplates');
$path = implode('/', $args);
if (in_array($path, $skip)) {
- return;
+ return NULL;
}
#add request url and user agent
@@ -162,7 +162,6 @@ class CRM_Core_IDS {
CRM_Core_Error::movedSiteError($configFile);
}
-
// also create the .htaccess file so we prevent the reading of the log and ini files
// via a browser, CRM-3875
CRM_Utils_File::restrictAccess($config->configAndLogDir);
@@ -179,7 +178,7 @@ class CRM_Core_IDS {
*
* @param IDS_Report $result
*
- * @return boolean
+ * @return bool
*/
private function react(IDS_Report $result) {
@@ -210,14 +209,12 @@ class CRM_Core_IDS {
* @param array $result
* @param int $reaction
*
- * @return boolean
+ * @return bool
*/
private function log($result, $reaction = 0) {
$ip = (isset($_SERVER['SERVER_ADDR']) &&
- $_SERVER['SERVER_ADDR'] != '127.0.0.1'
- ) ? $_SERVER['SERVER_ADDR'] : (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
- $_SERVER['HTTP_X_FORWARDED_FOR'] :
- '127.0.0.1'
+ $_SERVER['SERVER_ADDR'] != '127.0.0.1') ? $_SERVER['SERVER_ADDR'] : (
+ isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : '127.0.0.1'
);
$data = array();
diff --git a/CRM/Core/Page/Redirect.php b/CRM/Core/Page/Redirect.php
index 31ad0fc831..9883bfcd85 100644
--- a/CRM/Core/Page/Redirect.php
+++ b/CRM/Core/Page/Redirect.php
@@ -25,8 +25,6 @@ class CRM_Core_Page_Redirect extends CRM_Core_Page {
* Any GET arguments.
* @param array $pageArgs
* The page_arguments registered in the router.
- * @param array $requestArgs
- * Any parameters passed as part of this page request.
* @param bool $absolute
* Whether to return an absolute URL.
* @return string
diff --git a/CRM/Core/Payment/GoogleIPN.php b/CRM/Core/Payment/GoogleIPN.php
index 2c2fa54d7f..16c5d6633c 100644
--- a/CRM/Core/Payment/GoogleIPN.php
+++ b/CRM/Core/Payment/GoogleIPN.php
@@ -303,7 +303,7 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN {
foreach (array(
'membership',
'related_contact',
- 'onbehalf_dupe_alert'
+ 'onbehalf_dupe_alert',
) as $fld) {
if (!is_numeric($ids[$fld])) {
unset($ids[$fld]);
@@ -491,8 +491,7 @@ WHERE contribution_recur_id = {$ids['contributionRecur']}
$ids['event'] = $privateData['eventID'];
}
else {
- list($ids['event'], $ids['participant']) =
- explode(CRM_Core_DAO::VALUE_SEPARATOR, $contribution->trxn_id);
+ list($ids['event'], $ids['participant']) = explode(CRM_Core_DAO::VALUE_SEPARATOR, $contribution->trxn_id);
}
}
@@ -585,13 +584,12 @@ WHERE contribution_recur_id = {$ids['contributionRecur']}
case "merchant-calculation-callback":
break;
- case "new-order-notification": {
+ case "new-order-notification":
$response->SendAck($serial, FALSE);
$ipn->newOrderNotify($data[$root], $privateData, $module);
break;
- }
- case "order-state-change-notification": {
+ case "order-state-change-notification":
$response->SendAck($serial, FALSE);
$new_financial_state = $data[$root]['new-financial-order-state']['VALUE'];
$new_fulfillment_order = $data[$root]['new-fulfillment-order-state']['VALUE'];
@@ -615,9 +613,8 @@ WHERE contribution_recur_id = {$ids['contributionRecur']}
break;
}
break;
- }
- case "authorization-amount-notification": {
+ case "authorization-amount-notification":
$response->SendAck($serial, FALSE);
$new_financial_state = $data[$root]['order-summary']['financial-order-state']['VALUE'];
$new_fulfillment_order = $data[$root]['order-summary']['fulfillment-order-state']['VALUE'];
@@ -644,7 +641,6 @@ WHERE contribution_recur_id = {$ids['contributionRecur']}
break;
}
break;
- }
case "charge-amount-notification":
case "chargeback-amount-notification":
diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php
index 674610f0f1..ba2459484d 100644
--- a/CRM/Custom/Form/Group.php
+++ b/CRM/Custom/Form/Group.php
@@ -69,7 +69,6 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
/**
* Set variables up before form is built
*
- * @param null
*
* @return void
*/
@@ -174,7 +173,6 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
* add the rules (mainly global rules) for form.
* All local rules are added near the element
*
- * @param null
*
* @return void
* @see valid_date
@@ -186,7 +184,6 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
/**
* Build the form object
*
- * @param null
*
* @return void
*/
@@ -257,13 +254,13 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
if ($main == 'Relationship') {
$relName = self::getFormattedList($sel2[$main]);
$sel2[$main] = array(
- '' => ts("- Any -")
- ) + $relName;
+ '' => ts("- Any -"),
+ ) + $relName;
}
else {
$sel2[$main] = array(
- '' => ts("- Any -")
- ) + $sel2[$main];
+ '' => ts("- Any -"),
+ ) + $sel2[$main];
}
}
}
@@ -276,8 +273,8 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
$contactSubTypes[$key] = $key;
}
$sel2['Contact'] = array(
- "" => "-- Any --"
- ) + $contactSubTypes;
+ "" => "-- Any --",
+ ) + $contactSubTypes;
}
else {
if (!isset($this->_id)) {
@@ -405,7 +402,6 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @param null
*
* @return array
* array of default values
@@ -457,7 +453,6 @@ class CRM_Custom_Form_Group extends CRM_Core_Form {
/**
* Process the form
*
- * @param null
*
* @return void
*/
diff --git a/CRM/Event/Cart/Page/AddToCart.php b/CRM/Event/Cart/Page/AddToCart.php
index 1aabf6919a..d248e6ad95 100644
--- a/CRM/Event/Cart/Page/AddToCart.php
+++ b/CRM/Event/Cart/Page/AddToCart.php
@@ -18,7 +18,7 @@ class CRM_Event_Cart_Page_AddToCart extends CRM_Core_Page {
$url = CRM_Utils_System::url('civicrm/event/view_cart');
CRM_Utils_System::setUFMessage(ts("%1 has been added to your cart. View your cart.", array(
1 => $event_in_cart->event->title,
- 2 => $url
+ 2 => $url,
)));
$transaction->commit();
diff --git a/CRM/Event/Page/UserDashboard.php b/CRM/Event/Page/UserDashboard.php
index b14799a9db..35f7cfb959 100644
--- a/CRM/Event/Page/UserDashboard.php
+++ b/CRM/Event/Page/UserDashboard.php
@@ -41,7 +41,6 @@ class CRM_Event_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard {
/**
* List participations for the UF user
*
- * @return null
*/
public function listParticipations() {
$controller = new CRM_Core_Controller_Simple(
@@ -63,7 +62,6 @@ class CRM_Event_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard {
* the main function that is called when the page
* loads, it decides the which action has to be taken for the page.
*
- * @return null
*/
public function run() {
parent::preProcess();
diff --git a/CRM/Grant/Selector/Search.php b/CRM/Grant/Selector/Search.php
index 7e0d26c15b..ba089a3cb2 100644
--- a/CRM/Grant/Selector/Search.php
+++ b/CRM/Grant/Selector/Search.php
@@ -143,7 +143,7 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co
*
* @return \CRM_Grant_Selector_Search
*/
- function __construct(
+ public function __construct(
&$queryParams,
$action = CRM_Core_Action::NONE,
$grantClause = NULL,
diff --git a/CRM/Mailing/Form/ForwardMailing.php b/CRM/Mailing/Form/ForwardMailing.php
index 005bb10edf..29f0ff932b 100644
--- a/CRM/Mailing/Form/ForwardMailing.php
+++ b/CRM/Mailing/Form/ForwardMailing.php
@@ -147,12 +147,12 @@ class CRM_Mailing_Form_ForwardMailing extends CRM_Core_Form {
$status = ts('Mailing is not forwarded to the given email address.', array(
'count' => count($emails),
- 'plural' => 'Mailing is not forwarded to the given email addresses.'
+ 'plural' => 'Mailing is not forwarded to the given email addresses.',
));
if ($forwarded) {
$status = ts('Mailing is forwarded successfully to %count email address.', array(
'count' => $forwarded,
- 'plural' => 'Mailing is forwarded successfully to %count email addresses.'
+ 'plural' => 'Mailing is forwarded successfully to %count email addresses.',
));
}
diff --git a/CRM/Mailing/Form/Schedule.php b/CRM/Mailing/Form/Schedule.php
index 49028a4ced..223d8e25c6 100644
--- a/CRM/Mailing/Form/Schedule.php
+++ b/CRM/Mailing/Form/Schedule.php
@@ -196,7 +196,7 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form {
* @param $files
* @param $self
*
- * @return boolean
+ * @return bool
* True if either we deliver immediately, or the
* date is properly set.
*/
diff --git a/CRM/Member/Import/Parser.php b/CRM/Member/Import/Parser.php
index 2dad4b2984..269e8a4f3c 100644
--- a/CRM/Member/Import/Parser.php
+++ b/CRM/Member/Import/Parser.php
@@ -74,7 +74,7 @@ abstract class CRM_Member_Import_Parser extends CRM_Import_Parser {
* @return mixed
* @throws Exception
*/
- function run(
+ public function run(
$fileName,
$seperator = ',',
&$mapper,
@@ -283,7 +283,7 @@ abstract class CRM_Member_Import_Parser extends CRM_Import_Parser {
* Given a list of the importable field keys that the user has selected
* set the active fields array to this list
*
- * @param array mapped array of values
+ * @param array $fieldKeys mapped array of values
*
* @return void
*/
diff --git a/CRM/Pledge/BAO/Query.php b/CRM/Pledge/BAO/Query.php
index 762f262446..129ae568e1 100644
--- a/CRM/Pledge/BAO/Query.php
+++ b/CRM/Pledge/BAO/Query.php
@@ -471,7 +471,7 @@ class CRM_Pledge_BAO_Query {
/**
* Ideally this function should include fields that are displayed in the selector
*/
- static function defaultReturnProperties(
+ public static function defaultReturnProperties(
$mode,
$includeCustomFields = TRUE
) {
diff --git a/CRM/Report/Form/Campaign/SurveyDetails.php b/CRM/Report/Form/Campaign/SurveyDetails.php
index 6ee444f9b9..5ba8f79841 100644
--- a/CRM/Report/Form/Campaign/SurveyDetails.php
+++ b/CRM/Report/Form/Campaign/SurveyDetails.php
@@ -99,8 +99,8 @@ class CRM_Report_Form_Campaign_SurveyDetails extends CRM_Report_Form {
'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_SELECT,
'options' => array(
- '' => ts('- any interviewer -'),
- ) + $allSurveyInterviewers,
+ '' => ts('- any interviewer -'),
+ ) + $allSurveyInterviewers,
),
),
'grouping' => 'survey-interviewer-fields',
@@ -412,8 +412,7 @@ class CRM_Report_Form_Campaign_SurveyDetails extends CRM_Report_Form {
//apply survey activity types filter.
$surveyActivityTypes = CRM_Campaign_BAO_Survey::getSurveyActivityType();
if (!empty($surveyActivityTypes)) {
- $clauses[] =
- "( {$this->_aliases['civicrm_activity']}.activity_type_id IN ( " .
+ $clauses[] = "( {$this->_aliases['civicrm_activity']}.activity_type_id IN ( " .
implode(' , ', array_keys($surveyActivityTypes)) . ' ) )';
}
@@ -489,8 +488,7 @@ class CRM_Report_Form_Campaign_SurveyDetails extends CRM_Report_Form {
//get the data per page.
$dataPerPage[$pageCnt][] = $row;
$lastStreetName = CRM_Utils_Array::value('civicrm_address_street_name', $row);
- $lastStreetNum =
- CRM_Utils_Array::value('civicrm_address_street_number', $row) % 2;
+ $lastStreetNum = CRM_Utils_Array::value('civicrm_address_street_number', $row) % 2;
}
foreach ($dataPerPage as $page) {
@@ -870,20 +868,19 @@ INNER JOIN civicrm_custom_group cg ON ( cg.id = cf.custom_group_id )
foreach ($responseFields as $key => $value) {
if (substr($key, 0, 5) == 'phone' && !empty($value['location_type_id'])) {
$fName = str_replace('-', '_', $key);
- $this->_columns["civicrm_{$fName}"] =
- array(
- 'dao' => 'CRM_Core_DAO_Phone',
- 'alias' => "phone_civireport_{$fName}",
- 'fields' => array(
- $fName => array_merge($value, array(
- 'is_required' => '1',
- 'alias' => "phone_civireport_{$fName}",
- 'dbAlias' => "phone_civireport_{$fName}.phone",
- 'no_display' => TRUE,
- )
- ),
+ $this->_columns["civicrm_{$fName}"] = array(
+ 'dao' => 'CRM_Core_DAO_Phone',
+ 'alias' => "phone_civireport_{$fName}",
+ 'fields' => array(
+ $fName => array_merge($value, array(
+ 'is_required' => '1',
+ 'alias' => "phone_civireport_{$fName}",
+ 'dbAlias' => "phone_civireport_{$fName}.phone",
+ 'no_display' => TRUE,
+ )
),
- );
+ ),
+ );
$this->_aliases["civicrm_phone_{$fName}"] = $this->_columns["civicrm_{$fName}"]['alias'];
$this->_locationBasedPhoneField = TRUE;
}
@@ -957,9 +954,9 @@ INNER JOIN civicrm_custom_field cf ON ( cg.id = cf.custom_group_id )
'htmlType' => $response->html_type,
'required' => TRUE,
'alias' => ($response->data_type == 'ContactReference') ? $this->_columns[$resTable]['alias'] .
- '_contact' : $this->_columns[$resTable]['alias'],
+ '_contact' : $this->_columns[$resTable]['alias'],
'dbAlias' => $this->_columns[$resTable]['alias'] . '.' .
- $response->column_name,
+ $response->column_name,
'no_display' => TRUE,
'isSurveyResponseField' => TRUE,
);
diff --git a/CRM/Report/Form/Contact/LoggingSummary.php b/CRM/Report/Form/Contact/LoggingSummary.php
index 9968e950aa..a4438b3775 100644
--- a/CRM/Report/Form/Contact/LoggingSummary.php
+++ b/CRM/Report/Form/Contact/LoggingSummary.php
@@ -166,15 +166,15 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
foreach ($rows as $key => &$row) {
if (!isset($isDeleted[$row['log_civicrm_entity_altered_contact_id']])) {
- $isDeleted[$row['log_civicrm_entity_altered_contact_id']] =
- CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $row['log_civicrm_entity_altered_contact_id'], 'is_deleted') !== '0';
+ $isDeleted[$row['log_civicrm_entity_altered_contact_id']] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
+ $row['log_civicrm_entity_altered_contact_id'], 'is_deleted') !== '0';
}
if (!empty($row['log_civicrm_entity_altered_contact']) &&
!$isDeleted[$row['log_civicrm_entity_altered_contact_id']]
) {
- $row['log_civicrm_entity_altered_contact_link'] =
- CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $row['log_civicrm_entity_altered_contact_id']);
+ $row['log_civicrm_entity_altered_contact_link'] = CRM_Utils_System::url('civicrm/contact/view',
+ 'reset=1&cid=' . $row['log_civicrm_entity_altered_contact_id']);
$row['log_civicrm_entity_altered_contact_hover'] = ts("Go to contact summary");
$entity = $this->getEntityValue($row['log_civicrm_entity_id'], $row['log_civicrm_entity_log_type'], $row['log_civicrm_entity_log_date']);
if ($entity) {
diff --git a/CRM/Upgrade/Incremental/php/ThreeFour.php b/CRM/Upgrade/Incremental/php/ThreeFour.php
index 9521d07f7d..d34f811c08 100644
--- a/CRM/Upgrade/Incremental/php/ThreeFour.php
+++ b/CRM/Upgrade/Incremental/php/ThreeFour.php
@@ -72,7 +72,7 @@ class CRM_Upgrade_Incremental_php_ThreeFour {
'contact/log',
'activitySummary',
'case/timespent',
- 'case/summary'
+ 'case/summary',
);
$instances = CRM_Core_DAO::executeQuery("SELECT id, form_values, report_id FROM civicrm_report_instance WHERE report_id IN ('" . implode("','", $modifiedReportIds) . "')");
@@ -149,7 +149,7 @@ class CRM_Upgrade_Incremental_php_ThreeFour {
*/
public function upgrade_3_4_beta3($rev) {
// do the regular upgrade
- $upgrade = new CRM_Upgrade_Form;
+ $upgrade = new CRM_Upgrade_Form();
$upgrade->processSQL($rev);
if ($upgrade->multilingual) {
@@ -185,7 +185,7 @@ class CRM_Upgrade_Incremental_php_ThreeFour {
'Contact',
'Individual',
'Organization',
- 'Household'
+ 'Household',
);
while ($ufGroups->fetch()) {
if (!in_array($ufGroups->group_type, $skipGroupTypes)) {
@@ -219,7 +219,7 @@ INSERT INTO civicrm_location_type ( name, description, is_reserved, is_active )
CRM_Core_DAO::executeQuery($query);
}
- $upgrade = new CRM_Upgrade_Form;
+ $upgrade = new CRM_Upgrade_Form();
$upgrade->processSQL($rev);
}
@@ -299,7 +299,7 @@ INSERT INTO civicrm_location_type ( name, description, is_reserved, is_active )
'event_start_date_from',
'event_start_date_to',
'event_end_date_from',
- 'event_end_date_to'
+ 'event_end_date_to',
);
foreach ($eventDates as $date) {
if (isset($formValues[$date]) && $formValues[$date] == ' ') {
@@ -353,7 +353,8 @@ FROM civicrm_option_value v,
WHERE v.option_group_id = g.id
AND g.name = %1
AND g.is_active = 1
- AND v.name = %2", array(
+ AND v.name = %2",
+ array(
1 => array('activity_type', 'String'),
2 => array('Bulk Email', 'String'),
));
diff --git a/CRM/Utils/OptionBag.php b/CRM/Utils/OptionBag.php
index 64b317ceda..e51baf5dd1 100644
--- a/CRM/Utils/OptionBag.php
+++ b/CRM/Utils/OptionBag.php
@@ -62,11 +62,11 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable {
*
- * The return value will be casted to boolean if non-boolean was returned. + *
+ *+ * The return value will be casted to boolean if non-boolean was returned. */ public function offsetExists($offset) { return array_key_exists($offset, $this->data); @@ -125,7 +125,7 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable { * @link http://php.net/manual/en/iteratoraggregate.getiterator.php * @return Traversable * An instance of an object implementing Iterator or - * Traversable + * Traversable */ public function getIterator() { return new ArrayIterator($this->data); @@ -137,9 +137,9 @@ class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable { * @link http://php.net/manual/en/countable.count.php * @return int * The custom count as an integer. - *
- *- * The return value is cast to an integer. + *
+ *+ * The return value is cast to an integer. */ public function count() { return count($this->data); diff --git a/CRM/Utils/Signer.php b/CRM/Utils/Signer.php index 5764519258..1116cfbad1 100644 --- a/CRM/Utils/Signer.php +++ b/CRM/Utils/Signer.php @@ -99,7 +99,7 @@ class CRM_Utils_Signer { $params[$paramName] = (string) $params[$paramName]; } } - else { // $paramName is not included or ===NULL + else {// $paramName is not included or ===NULL $params[$paramName] = ''; } $message['payload'][$paramName] = $params[$paramName]; diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index e03ff71448..bcc7630405 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -59,13 +59,13 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { } /** - * @param string dir base civicrm directory + * @param string $dir base civicrm directory * Return default Site Settings * @return array * array - * - $url, (Joomla - non admin url) - * - $siteName, - * - $siteRoot + * - $url, (Joomla - non admin url) + * - $siteName, + * - $siteRoot */ public function getDefaultSiteSettings($dir) { $config = CRM_Core_Config::singleton(); @@ -92,7 +92,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { /** * Check if a resource url is within the drupal directory and format appropriately * - * @param url (reference) + * @param $url (reference) * * @return bool * TRUE for internal paths, FALSE for external. The drupal_add_js fn is able to add js more @@ -166,7 +166,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { * @return string * an HTML string containing a link to the given path. */ - function url( + public function url( $path = NULL, $query = NULL, $absolute = FALSE, $fragment = NULL, $htmlize = TRUE, $frontend = FALSE, $forceBackend = FALSE @@ -278,7 +278,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { if (CRM_Core_Session::singleton() ->get('userID') == $contactID || CRM_Core_Permission::checkAnyPerm(array( 'cms:administer users', - 'cms:view user account' + 'cms:view user account', )) ) { return CRM_Utils_System::url('user/' . $uid); @@ -479,7 +479,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { * e.g. for drupal: records a watchdog message about the new session, saves the login timestamp, * calls hook_user op 'login' and generates a new session. * - * @param array params + * @param array $params * * FIXME: Document values accepted/required by $params */ diff --git a/Civi/CCase/Events.php b/Civi/CCase/Events.php index 13a42efe33..88b11c5ff9 100644 --- a/Civi/CCase/Events.php +++ b/Civi/CCase/Events.php @@ -87,7 +87,7 @@ class Events { /** * Find any extra listeners declared in XML and pass the event along to them * - * @param Event\CaseChangeEvent $event + * @param \Civi\CCase\Event\CaseChangeEvent $event */ public static function delegateToXmlListeners(\Civi\CCase\Event\CaseChangeEvent $event) { $p = new \CRM_Case_XMLProcessor_Process(); diff --git a/api/class.api.php b/api/class.api.php index f2350ccba0..2b378bc507 100644 --- a/api/class.api.php +++ b/api/class.api.php @@ -81,7 +81,7 @@ class civicrm_api3 { /** * @param array $config API configuration. */ - function __construct($config = NULL) { + public function __construct($config = NULL) { $this->local = TRUE; $this->input = array(); $this->lastResult = array(); @@ -165,7 +165,7 @@ class civicrm_api3 { * @param array $params * @return \stdClass */ - function remoteCall($entity, $action, $params = array()) { + public function remoteCall($entity, $action, $params = array()) { $fields = "key={$this->key}&api_key={$this->api_key}"; $query = $this->uri . "&entity=$entity&action=$action"; foreach ($params as $k => $v) { @@ -182,7 +182,7 @@ class civicrm_api3 { $result = curl_exec($ch); // CiviCRM expects to get back a CiviCRM error object. if (curl_errno($ch)) { - $res = new stdClass; + $res = new stdClass(); $res->is_error = 1; $res->error_message = curl_error($ch); $res->level = "cURL"; @@ -197,7 +197,7 @@ class civicrm_api3 { $result = file_get_contents($query . '&' . $fields); } if (!$res = json_decode($result)) { - $res = new stdClass; + $res = new stdClass(); $res->is_error = 1; $res->error_message = 'Unable to parse returned JSON'; $res->level = 'json_decode'; @@ -214,7 +214,7 @@ class civicrm_api3 { * * @return bool */ - function call($entity, $action = 'Get', $params = array()) { + public function call($entity, $action = 'Get', $params = array()) { if (is_int($params)) { $params = array('id' => $params); } @@ -248,7 +248,7 @@ class civicrm_api3 { /** * Helper method for long running programs (eg bots). */ - function ping() { + public function ping() { global $_DB_DATAOBJECT; foreach ($_DB_DATAOBJECT['CONNECTIONS'] as & $c) { if (!$c->connection->ping()) { @@ -264,14 +264,14 @@ class civicrm_api3 { * Return the last error message. * @return string */ - function errorMsg() { + public function errorMsg() { return $this->lastResult->error_message; } /** * Initialize */ - function init() { + public function init() { CRM_Core_DAO::init($this->cfg->dsn); } diff --git a/bin/ContributionProcessor.php b/bin/ContributionProcessor.php index 0e867e266a..10b4dbdc3f 100644 --- a/bin/ContributionProcessor.php +++ b/bin/ContributionProcessor.php @@ -142,8 +142,7 @@ class CiviContributeProcessor { * @param $start * @param $end */ - static - function paypal($paymentProcessor, $paymentMode, $start, $end) { + public static function paypal($paymentProcessor, $paymentMode, $start, $end) { $url = "{$paymentProcessor['url_api']}nvp"; $keyArgs = array( @@ -186,7 +185,7 @@ class CiviContributeProcessor { // details about a transaction, let's make sure that it doesn't // already exist in the database. require_once 'CRM/Contribute/DAO/Contribution.php'; - $dao = new CRM_Contribute_DAO_Contribution; + $dao = new CRM_Contribute_DAO_Contribution(); $dao->trxn_id = $value; if ($dao->find(TRUE)) { preg_match('/(\d+)$/', $name, $matches); @@ -248,8 +247,7 @@ class CiviContributeProcessor { * @param $start * @param $end */ - static - function google($paymentProcessor, $paymentMode, $start, $end) { + public static function google($paymentProcessor, $paymentMode, $start, $end) { require_once "CRM/Contribute/BAO/Contribution/Utils.php"; require_once 'CRM/Core/Payment/Google.php'; $nextPageToken = TRUE; @@ -282,9 +280,7 @@ class CiviContributeProcessor { $response[1][$response[0]]['notifications']['charge-amount-notification'][] = $chrgAmt; } - foreach ($response[1][$response[0]]['notifications']['charge-amount-notification'] - as $amtData - ) { + foreach ($response[1][$response[0]]['notifications']['charge-amount-notification'] as $amtData) { $searchParams = array( 'order-numbers' => array($amtData['google-order-number']['VALUE']), 'notification-types' => array('risk-information', 'new-order', 'charge-amount'), @@ -321,8 +317,7 @@ class CiviContributeProcessor { } } - static - function csv() { + public static function csv() { $csvFile = '/home/deepak/Desktop/crm-4247.csv'; $delimiter = ";"; $row = 1; @@ -364,8 +359,7 @@ class CiviContributeProcessor { fclose($handle); } - static - function process() { + public static function process() { require_once 'CRM/Utils/Request.php'; $type = CRM_Utils_Request::retrieve('type', 'String', CRM_Core_DAO::$_nullObject, FALSE, 'csv', 'REQUEST'); diff --git a/tests/extensions/test.extension.manager.paymenttest/main.php b/tests/extensions/test.extension.manager.paymenttest/main.php index 567beba884..a2cd9d787f 100644 --- a/tests/extensions/test.extension.manager.paymenttest/main.php +++ b/tests/extensions/test.extension.manager.paymenttest/main.php @@ -20,7 +20,7 @@ class test_extension_manager_paymenttest extends CRM_Core_Payment { * * @return object */ - static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) { + public static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) { $processorName = $paymentProcessor['name']; if (self::$_singleton[$processorName] === NULL) { self::$_singleton[$processorName] = new test_extension_manager_paymenttest(); @@ -30,19 +30,19 @@ class test_extension_manager_paymenttest extends CRM_Core_Payment { static $counts = array(); - function install() { + public function install() { self::$counts['install'] = 1 + (int) self::$counts['install']; } - function uninstall() { + public function uninstall() { self::$counts['uninstall'] = 1 + (int) self::$counts['uninstall']; } - function disable() { + public function disable() { self::$counts['disable'] = 1 + (int) self::$counts['disable']; } - function enable() { + public function enable() { self::$counts['enable'] = 1 + (int) self::$counts['enable']; } @@ -53,13 +53,10 @@ class test_extension_manager_paymenttest extends CRM_Core_Payment { * @param array $params * Assoc array of input parameters for this transaction. * - * @return array - * the result in an nice formatted array (or an error object) - * @abstract */ - function doDirectPayment(&$params) { + public function doDirectPayment(&$params) { } - function checkConfig() { + public function checkConfig() { } } diff --git a/tests/mailing_test/controllerTest.js b/tests/mailing_test/controllerTest.js index ded9788d66..e37529a21b 100644 --- a/tests/mailing_test/controllerTest.js +++ b/tests/mailing_test/controllerTest.js @@ -10,7 +10,6 @@ describe('Mailing Controllers', function() { ctrl = $controller('mailingCtrl', {$scope: scope}); })); - it('should check if 5 groups are there', function() { expect(scope.cool_api.length).toBe(3); diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 9b708b70dd..d11c924654 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -708,7 +708,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @param int $row * @param string $prefix */ - function webtestNewDialogContact( + public function webtestNewDialogContact( $fname = 'Anthony', $lname = 'Anderson', $email = 'anthony@anderson.biz', $type = 4, $selectId = 's2id_contact_id', $row = 1, $prefix = '') { // 4 - Individual profile @@ -809,7 +809,6 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @throws PHPUnit_Framework_AssertionFailedError * @return int */ - public function webtestAddPaymentProcessor($processorName = 'Test Processor', $processorType = 'Dummy', $processorSettings = NULL, $financialAccount = 'Deposit Bank Account') { if (!$processorName) { $this->fail("webTestAddPaymentProcessor requires $processorName."); @@ -936,7 +935,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { if (!$filePath) { $filePath = '/tmp/testfile_' . substr(sha1(rand()), 0, 7) . '.txt'; $fp = @fopen($filePath, 'w'); - fputs($fp, 'Test file created by selenium test.'); + fwrite($fp, 'Test file created by selenium test.'); @fclose($fp); } @@ -1067,7 +1066,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @return null * of newly created online contribution page. */ - function webtestAddContributionPage( + public function webtestAddContributionPage( $hash = NULL, $rand = NULL, $pageTitle = NULL, @@ -1627,8 +1626,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * @return bool */ - static - public function checkDoLocalDBTest() { + public static function checkDoLocalDBTest() { if (defined('CIVICRM_WEBTEST_LOCAL_DB') && CIVICRM_WEBTEST_LOCAL_DB ) { @@ -1649,7 +1647,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @param array $match * Associative array of field name => expected value. Empty if asserting * that a DELETE occurred - * @param boolean $delete + * @param bool $delete * are we checking that a DELETE action occurred? */ public function assertDBState($daoName, $id, $match, $delete = FALSE) { @@ -1732,7 +1730,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @param bool $taxRate * @param bool $isDefault */ - function _testAddFinancialAccount( + public function _testAddFinancialAccount( $financialAccountTitle, $financialAccountDescription = FALSE, $accountingCode = FALSE, @@ -1823,7 +1821,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @param bool $taxRate * @param bool $isDefault */ - function _testEditFinancialAccount( + public function _testEditFinancialAccount( $editfinancialAccount, $financialAccountTitle = FALSE, $financialAccountDescription = FALSE, diff --git a/tests/phpunit/CiviTest/Contact.php b/tests/phpunit/CiviTest/Contact.php index efcd1ec687..c3a4ce49b9 100644 --- a/tests/phpunit/CiviTest/Contact.php +++ b/tests/phpunit/CiviTest/Contact.php @@ -91,7 +91,7 @@ class Contact extends CiviUnitTestCase { * * @param int $contactID * Id of the contact to delete. - * @return boolean + * @return bool * true if contact deleted, false otherwise */ public static function delete($contactID) { diff --git a/tests/phpunit/CiviTest/Participant.php b/tests/phpunit/CiviTest/Participant.php index e9ab99183c..64d8023d96 100644 --- a/tests/phpunit/CiviTest/Participant.php +++ b/tests/phpunit/CiviTest/Participant.php @@ -35,7 +35,7 @@ class Participant extends PHPUnit_Framework_Testcase { * Helper function to delete a participant * * @param int $participantId - * @return boolean + * @return bool * true if participant deleted, false otherwise */ public static function delete($participantId) { diff --git a/tests/phpunit/WebTest/Case/CaseDashboardTest.php b/tests/phpunit/WebTest/Case/CaseDashboardTest.php index c8166af949..f8a5403564 100644 --- a/tests/phpunit/WebTest/Case/CaseDashboardTest.php +++ b/tests/phpunit/WebTest/Case/CaseDashboardTest.php @@ -47,7 +47,7 @@ class WebTest_Case_CaseDashboardTest extends CiviSeleniumTestCase { 'edit-2-access-all-cases-and-activities', 'edit-2-access-my-cases-and-activities', 'edit-2-administer-civicase', - 'edit-2-delete-in-civicase' + 'edit-2-delete-in-civicase', ); $this->changePermissions($permission);