From 317fceb45c357553effb3fca07c13ae53ada9e9d Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 16 Jan 2015 11:10:54 +0530 Subject: [PATCH] clean up changes for batch 18 --- CRM/Activity/Form/Task/PickOption.php | 2 +- CRM/Admin/Form/PdfFormats.php | 4 ++-- CRM/Admin/Form/Preferences/Display.php | 3 +-- CRM/Batch/Page/Batch.php | 2 -- CRM/Contact/Form/Search/Criteria.php | 4 +--- .../Form/Search/Custom/EmployerListing.php | 2 +- CRM/Contact/Form/Task/Batch.php | 5 ++--- CRM/Contact/Form/Task/LabelCommon.php | 4 +--- CRM/Contact/Form/Task/RemoveFromTag.php | 6 +++--- CRM/Contact/Import/Form/MapField.php | 6 +++--- CRM/Contact/Page/View/GroupContact.php | 5 +---- CRM/Contact/Page/View/Relationship.php | 3 --- CRM/Contribute/Form/Contribution/Main.php | 6 +++--- CRM/Contribute/Form/ManagePremiums.php | 6 +++--- CRM/Contribute/Form/UpdateSubscription.php | 7 ++++--- CRM/Contribute/Import/Parser.php | 4 ++-- CRM/Core/BAO/Block.php | 6 +++--- CRM/Core/BAO/CustomOption.php | 6 +++--- CRM/Core/BAO/Website.php | 2 +- CRM/Core/Component.php | 5 ++--- CRM/Core/Form/Renderer.php | 5 ++--- CRM/Core/I18n/SchemaStructure_3_3_beta1.php | 9 +++------ CRM/Core/Payment/IATS.php | 6 +++--- CRM/Core/Permission/Drupal6.php | 5 ++--- CRM/Core/QuickForm/GroupMultiSelect.php | 6 +++--- CRM/Core/Selector/Base.php | 6 +++--- CRM/Core/Selector/Controller.php | 12 ++++++------ CRM/Core/Session.php | 6 +++--- CRM/Custom/Form/DeleteField.php | 6 ------ CRM/Custom/Form/Preview.php | 6 ------ .../Form/ManageEvent/ScheduleReminders.php | 2 +- CRM/Event/Form/Registration/Confirm.php | 7 +++---- CRM/Event/Form/Task/Delete.php | 5 ++--- CRM/Export/BAO/Export.php | 7 +++---- CRM/Extension/Manager/Payment.php | 6 +++--- CRM/Financial/Form/FinancialBatch.php | 5 ++--- CRM/Friend/Form.php | 2 +- CRM/Grant/BAO/Query.php | 6 +++--- CRM/Mailing/Form/Test.php | 6 +++--- CRM/Mailing/Info.php | 6 +++--- CRM/Mailing/MailStore.php | 6 +++--- CRM/Mailing/MailStore/Localdir.php | 6 +++--- CRM/Member/BAO/MembershipPayment.php | 4 ++-- CRM/Member/Import/Form/MapField.php | 6 +++--- CRM/Member/Page/UserDashboard.php | 4 +--- CRM/Member/Selector/Search.php | 5 ++--- CRM/Pledge/BAO/Pledge.php | 6 +++--- CRM/Pledge/BAO/PledgePayment.php | 6 +++--- CRM/Pledge/Page/UserDashboard.php | 2 -- CRM/Profile/Form/Edit.php | 2 +- CRM/Report/Utils/Get.php | 2 +- CRM/Utils/OpenFlashChart.php | 17 ++++++++--------- CRM/Utils/SystemLogger.php | 7 ------- api/v3/MembershipStatus.php | 6 +++--- api/v3/OptionValue.php | 6 +++--- api/v3/Participant.php | 4 ++-- api/v3/ParticipantStatusType.php | 6 +++--- api/v3/PriceField.php | 6 +++--- api/v3/Website.php | 5 +---- bin/deprecated/ParticipantProcessor.php | 2 +- tests/phpunit/CiviTest/ContributionPage.php | 2 +- tests/phpunit/WebTest/AllTests.php | 2 +- .../WebTest/Contact/ProfileChecksumTest.php | 2 +- 63 files changed, 135 insertions(+), 186 deletions(-) diff --git a/CRM/Activity/Form/Task/PickOption.php b/CRM/Activity/Form/Task/PickOption.php index 7f138e90e6..c63c17493c 100644 --- a/CRM/Activity/Form/Task/PickOption.php +++ b/CRM/Activity/Form/Task/PickOption.php @@ -81,7 +81,7 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task { if (count($this->_activityHolderIds) > $this->_maxActivities) { CRM_Core_Session::setStatus(ts("The maximum number of Activities you can select to send an email is %1. You have selected %2. Please select fewer Activities from your search results and try again.", array( 1 => $this->_maxActivities, - 2 => count($this->_activityHolderIds) + 2 => count($this->_activityHolderIds), )), ts("Maximum Exceeded"), "error"); $validate = TRUE; } diff --git a/CRM/Admin/Form/PdfFormats.php b/CRM/Admin/Form/PdfFormats.php index 5daa96f03c..b22c7406c9 100644 --- a/CRM/Admin/Form/PdfFormats.php +++ b/CRM/Admin/Form/PdfFormats.php @@ -66,7 +66,7 @@ class CRM_Admin_Form_PdfFormats extends CRM_Admin_Form { $this->add('select', 'paper_size', ts('Paper Size'), array( - 0 => ts('- default -') + 0 => ts('- default -'), ) + CRM_Core_BAO_PaperSize::getList(TRUE), FALSE, array('onChange' => "selectPaper( this.value );") ); @@ -86,7 +86,7 @@ class CRM_Admin_Form_PdfFormats extends CRM_Admin_Form { $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array( 'CRM_Core_BAO_PdfFormat', - $this->_id + $this->_id, )); $this->addRule('margin_left', ts('Margin must be numeric'), 'numeric'); $this->addRule('margin_right', ts('Margin must be numeric'), 'numeric'); diff --git a/CRM/Admin/Form/Preferences/Display.php b/CRM/Admin/Form/Preferences/Display.php index fcfa3b6292..3ba0ddffd4 100644 --- a/CRM/Admin/Form/Preferences/Display.php +++ b/CRM/Admin/Form/Preferences/Display.php @@ -118,8 +118,7 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { $defaults['editor_id'] = $this->_config->editor_id; } if (empty($this->_config->display_name_format)) { - $defaults['display_name_format'] = - "{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}"; + $defaults['display_name_format'] = "{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}"; } else { $defaults['display_name_format'] = $this->_config->display_name_format; diff --git a/CRM/Batch/Page/Batch.php b/CRM/Batch/Page/Batch.php index 98580cd708..3e326a1cfa 100644 --- a/CRM/Batch/Page/Batch.php +++ b/CRM/Batch/Page/Batch.php @@ -58,8 +58,6 @@ class CRM_Batch_Page_Batch extends CRM_Core_Page_Basic { /** * Get action Links * - * @return array - * (reference) of action links */ public function &links() { } diff --git a/CRM/Contact/Form/Search/Criteria.php b/CRM/Contact/Form/Search/Criteria.php index 00d7caa030..bf0f9e74e4 100644 --- a/CRM/Contact/Form/Search/Criteria.php +++ b/CRM/Contact/Form/Search/Criteria.php @@ -116,7 +116,6 @@ class CRM_Contact_Form_Search_Criteria { //added job title $form->addElement('text', 'job_title', ts('Job Title'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'job_title')); - //added internal ID $form->addElement('text', 'contact_id', ts('Contact ID'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'id')); $form->addRule('contact_id', ts('Please enter valid Contact ID'), 'positiveInteger'); @@ -158,7 +157,7 @@ class CRM_Contact_Form_Search_Criteria { 'uf_group_id', ts('Search Views'), array( - '0' => ts('- default view -') + '0' => ts('- default view -'), ) + $searchProfiles ); @@ -488,7 +487,6 @@ class CRM_Contact_Form_Search_Criteria { CRM_Core_Form_Date::buildDateRange($form, 'deceased_date', 1, '_low', '_high', ts('From'), FALSE, FALSE, 'birth'); - // radio button for is_deceased $form->addYesNo('is_deceased', ts('Deceased'), TRUE); } diff --git a/CRM/Contact/Form/Search/Custom/EmployerListing.php b/CRM/Contact/Form/Search/Custom/EmployerListing.php index e3545d2e4c..bd6f4d7315 100644 --- a/CRM/Contact/Form/Search/Custom/EmployerListing.php +++ b/CRM/Contact/Form/Search/Custom/EmployerListing.php @@ -104,7 +104,7 @@ class CRM_Contact_Form_Search_Custom_EmployerListing implements CRM_Contact_Form /** * Construct the search query */ - function all( + public function all( $offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE ) { diff --git a/CRM/Contact/Form/Task/Batch.php b/CRM/Contact/Form/Task/Batch.php index 9b9dc78c9c..c768b4fc6a 100644 --- a/CRM/Contact/Form/Task/Batch.php +++ b/CRM/Contact/Form/Task/Batch.php @@ -121,7 +121,6 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { ) ); - $this->assign('profileTitle', $this->_title); $this->assign('componentIds', $this->_contactIds); @@ -170,7 +169,7 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { */ public function setDefaultValues() { if (empty($this->_fields)) { - return; + return NULL; } $defaults = $sortName = array(); @@ -258,7 +257,7 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { if ($inValidSubtypeCnt) { CRM_Core_Session::setStatus(ts('Contact Subtype field of 1 contact has not been updated.', array( 'plural' => 'Contact Subtype field of %count contacts has not been updated.', - 'count' => $inValidSubtypeCnt + 'count' => $inValidSubtypeCnt, )), ts('Invalid Subtype')); } } diff --git a/CRM/Contact/Form/Task/LabelCommon.php b/CRM/Contact/Form/Task/LabelCommon.php index 70d787e59d..6fc52e7510 100644 --- a/CRM/Contact/Form/Task/LabelCommon.php +++ b/CRM/Contact/Form/Task/LabelCommon.php @@ -50,7 +50,6 @@ class CRM_Contact_Form_Task_LabelCommon { * @param string $fileName * The name of the file to save the label in. * - * @return null */ public static function createLabel(&$contactRows, &$format, $fileName = 'MailingLabels_CiviCRM.pdf') { $pdf = new CRM_Utils_PDF_Label($format, 'mm'); @@ -84,7 +83,6 @@ class CRM_Contact_Form_Task_LabelCommon { * @return array * Array of rows for labels */ - public static function getRows($contactIDs, $locationTypeID, $respectDoNotMail, $mergeSameAddress, $mergeSameHousehold) { $locName = NULL; //get the address format sequence from the config file @@ -214,7 +212,7 @@ class CRM_Contact_Form_Task_LabelCommon { 'email', 'phone', 'im', - 'openid' + 'openid', ))) { if ($k == 'im') { $rows[$value][$k] = $v['1']['name']; diff --git a/CRM/Contact/Form/Task/RemoveFromTag.php b/CRM/Contact/Form/Task/RemoveFromTag.php index 0c19f2109d..95a2ec6d4a 100644 --- a/CRM/Contact/Form/Task/RemoveFromTag.php +++ b/CRM/Contact/Form/Task/RemoveFromTag.php @@ -137,13 +137,13 @@ class CRM_Contact_Form_Task_RemoveFromTag extends CRM_Contact_Form_Task { $status = array( ts('%count contact un-tagged', array( 'count' => $removed, - 'plural' => '%count contacts un-tagged' - )) + 'plural' => '%count contacts un-tagged', + )), ); if ($notRemoved) { $status[] = ts('1 contact already did not have this tag', array( 'count' => $notRemoved, - 'plural' => '%count contacts already did not have this tag' + 'plural' => '%count contacts already did not have this tag', )); } $status = ''; diff --git a/CRM/Contact/Import/Form/MapField.php b/CRM/Contact/Import/Form/MapField.php index 92535b3d26..2f4491e642 100644 --- a/CRM/Contact/Import/Form/MapField.php +++ b/CRM/Contact/Import/Form/MapField.php @@ -62,8 +62,8 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField { * Attempt to match header labels with our mapper fields * FIXME: This is essentially the same function as parent::defaultFromHeader * - * @param header - * @param mapperFields + * @param $columnName name of column header + * @param $patterns pattern to match for the column * * @return string */ @@ -135,7 +135,7 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField { foreach (array( 'Individual', 'Household', - 'Organization' + 'Organization', ) as $cType) { $ruleParams = array( 'contact_type' => $cType, diff --git a/CRM/Contact/Page/View/GroupContact.php b/CRM/Contact/Page/View/GroupContact.php index 10251a07e6..7df74a3ba9 100644 --- a/CRM/Contact/Page/View/GroupContact.php +++ b/CRM/Contact/Page/View/GroupContact.php @@ -37,7 +37,6 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page { /** * called when action is browse * - * @return null */ public function browse() { @@ -74,7 +73,6 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page { * * @param int $groupId * - * @return null */ public function edit($groupId = NULL) { $controller = new CRM_Core_Controller_Simple( @@ -176,8 +174,7 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page { break; } - $groupNum = - CRM_Contact_BAO_GroupContact::getContactGroup($contactID, 'Added', NULL, TRUE, TRUE); + $groupNum = CRM_Contact_BAO_GroupContact::getContactGroup($contactID, 'Added', NULL, TRUE, TRUE); if ($groupNum == 1 && $groupStatus == 'Removed' && CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME, diff --git a/CRM/Contact/Page/View/Relationship.php b/CRM/Contact/Page/View/Relationship.php index 0e20b552f5..97b8115490 100644 --- a/CRM/Contact/Page/View/Relationship.php +++ b/CRM/Contact/Page/View/Relationship.php @@ -135,7 +135,6 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page { /** * called when action is browse * - * @return null */ public function browse() { // do nothing :) we are using datatable for rendering relationship selectors @@ -144,7 +143,6 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page { /** * called when action is update or new * - * @return null */ public function edit() { $controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_Relationship', ts('Contact Relationships'), $this->_action); @@ -260,7 +258,6 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page { /** * called to delete the relationship of a contact * - * @return null */ public function delete() { // calls a function to delete relationship diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 4ddf9a9e58..9741a5e878 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -159,7 +159,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu foreach (array( 'Individual', 'Organization', - 'Household' + 'Household', ) as $contactType) { if (in_array($contactType, $onBehalfProfile) && (in_array('Membership', $onBehalfProfile) || @@ -176,7 +176,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu foreach (array( 'Individual', 'Organization', - 'Household' + 'Household', ) as $contactType) { if (in_array($contactType, $postProfile) && (in_array('Membership', $postProfile) || @@ -687,7 +687,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $unitVals = explode(CRM_Core_DAO::VALUE_SEPARATOR, $frUnits); // CRM 10860, display text instead of a dropdown if there's only 1 frequency unit - if (sizeof($unitVals) == 1) { + if (count($unitVals) == 1) { $form->assign('one_frequency_unit', TRUE); $unit = $unitVals[0]; $form->add('hidden', 'frequency_unit', $unit); diff --git a/CRM/Contribute/Form/ManagePremiums.php b/CRM/Contribute/Form/ManagePremiums.php index 7662738b93..4b32e02743 100644 --- a/CRM/Contribute/Form/ManagePremiums.php +++ b/CRM/Contribute/Form/ManagePremiums.php @@ -106,7 +106,7 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form { $this->add('text', 'name', ts('Name'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'name'), TRUE); $this->addRule('name', ts('A product with this name already exists. Please select another name.'), 'objectExists', array( 'CRM_Contribute_DAO_Product', - $this->_id + $this->_id, )); $this->add('text', 'sku', ts('SKU'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'sku')); @@ -139,7 +139,7 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form { $this->add('select', 'period_type', ts('Period Type'), array( '' => '- select -', 'rolling' => 'Rolling', - 'fixed' => 'Fixed' + 'fixed' => 'Fixed', )); $this->add('text', 'fixed_period_start_day', ts('Fixed Period Start Day'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'fixed_period_start_day')); @@ -344,7 +344,7 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form { foreach (array( 'cost', 'price', - 'min_contribution' + 'min_contribution', ) as $f) { $params[$f] = CRM_Utils_Rule::cleanMoney($params[$f]); } diff --git a/CRM/Contribute/Form/UpdateSubscription.php b/CRM/Contribute/Form/UpdateSubscription.php index 7f86dcd1cf..8ba973c2eb 100644 --- a/CRM/Contribute/Form/UpdateSubscription.php +++ b/CRM/Contribute/Form/UpdateSubscription.php @@ -149,7 +149,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form { // define the fields $this->addMoney('amount', ts('Recurring Contribution Amount'), TRUE, array( - 'size' => 20 + 'size' => 20, ), TRUE, 'currency', NULL, TRUE ); @@ -238,7 +238,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form { if ($this->_subscriptionDetails->installments != $params['installments']) { $message .= "
" . ts("Recurring contribution installments have been updated from %1 to %2 for this subscription.", array( 1 => $this->_subscriptionDetails->installments, - 2 => $params['installments'] + 2 => $params['installments'], )) . ' '; } @@ -315,8 +315,9 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form { CRM_Core_Session::setStatus($status, $msgTitle, $msgType); } elseif (!$userID) { - if ($status) + if ($status) { CRM_Utils_System::setUFMessage($status); + } // keep result as 1, since we not displaying anything on the redirected page anyway return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contribute/subscriptionstatus', "reset=1&task=update&result=1")); diff --git a/CRM/Contribute/Import/Parser.php b/CRM/Contribute/Import/Parser.php index cba249edf4..13c912e28c 100644 --- a/CRM/Contribute/Import/Parser.php +++ b/CRM/Contribute/Import/Parser.php @@ -120,7 +120,7 @@ abstract class CRM_Contribute_Import_Parser extends CRM_Import_Parser { * @return mixed * @throws Exception */ - function run( + public function run( $fileName, $seperator = ',', &$mapper, @@ -407,7 +407,7 @@ abstract class CRM_Contribute_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/Core/BAO/Block.php b/CRM/Core/BAO/Block.php index c3478a8be3..dc985d5049 100644 --- a/CRM/Core/BAO/Block.php +++ b/CRM/Core/BAO/Block.php @@ -133,7 +133,7 @@ class CRM_Core_BAO_Block { * @param array $params * Associated array of submitted fields. * - * @return boolean + * @return bool * true if the block has data, otherwise false */ public static function dataExists($blockFields, &$params) { @@ -153,7 +153,7 @@ class CRM_Core_BAO_Block { * @param array $params * Associated array of submitted fields. * - * @return boolean + * @return bool * true if the block exits, otherwise false */ public static function blockExists($blockName, &$params) { @@ -518,7 +518,7 @@ class CRM_Core_BAO_Block { * (sort function for sortPrimaryFirst) * @param array $location1 * @param array $location2 - * @return number + * @return int */ public static function primaryComparison($location1, $location2) { $l1 = CRM_Utils_Array::value('is_primary', $location1); diff --git a/CRM/Core/BAO/CustomOption.php b/CRM/Core/BAO/CustomOption.php index 54bcf9dc11..a8a000495f 100644 --- a/CRM/Core/BAO/CustomOption.php +++ b/CRM/Core/BAO/CustomOption.php @@ -64,13 +64,13 @@ class CRM_Core_BAO_CustomOption { * * @param int $fieldID * Field whose options are needed. - * @param bool $inactiveNeededDo we need inactive options ?. + * @param bool $inactiveNeeded Do we need inactive options ?. * Do we need inactive options ?. * * @return array * all active options for fieldId */ - static function getCustomOption( + public static function getCustomOption( $fieldID, $inactiveNeeded = FALSE ) { @@ -153,7 +153,7 @@ WHERE id = %1 case 'Autocomplete-Select': if (!in_array($dataType, array( 'Boolean', - 'ContactReference' + 'ContactReference', )) ) { $options = self::valuesByID($fieldId); diff --git a/CRM/Core/BAO/Website.php b/CRM/Core/BAO/Website.php index c47b4aa3ef..28a93932e4 100644 --- a/CRM/Core/BAO/Website.php +++ b/CRM/Core/BAO/Website.php @@ -131,7 +131,7 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website { * @param array $params * @param $values * - * @return boolean + * @return bool */ public static function &getValues(&$params, &$values) { $websites = array(); diff --git a/CRM/Core/Component.php b/CRM/Core/Component.php index aab1d99894..149b1f13d0 100644 --- a/CRM/Core/Component.php +++ b/CRM/Core/Component.php @@ -230,7 +230,7 @@ class CRM_Core_Component { $cfg = $comp->getConfigObject(); $cfg->add($config, $oldMode); } - return; + return NULL; } /** @@ -327,7 +327,7 @@ class CRM_Core_Component { * * @return null */ - static function &defaultReturnProperties( + public static function &defaultReturnProperties( $mode, $includeCustomFields = TRUE ) { @@ -423,7 +423,6 @@ class CRM_Core_Component { * @param array $tables * Array of tables. * - * @return null */ public static function tableNames(&$tables) { $info = self::_info(); diff --git a/CRM/Core/Form/Renderer.php b/CRM/Core/Form/Renderer.php index 992a03e5b3..1b4d6f86fb 100644 --- a/CRM/Core/Form/Renderer.php +++ b/CRM/Core/Form/Renderer.php @@ -67,7 +67,7 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty { /** * Constructor */ - function __construct() { + public function __construct() { $template = CRM_Core_Smarty::singleton(); parent::__construct($template); } @@ -147,7 +147,6 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty { * @param string $error * Error associated with the element. * - * @return array */ public static function updateAttributes(&$element, $required, $error) { // lets create an id for all input elements, so we can generate nice label tags @@ -289,7 +288,7 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty { } $field->setAttribute('data-entity-value', json_encode(array( 'id' => $contact['id'], - 'text' => implode(' :: ', $view) + 'text' => implode(' :: ', $view), ))); } } diff --git a/CRM/Core/I18n/SchemaStructure_3_3_beta1.php b/CRM/Core/I18n/SchemaStructure_3_3_beta1.php index 106d00efa6..02b88a9b20 100644 --- a/CRM/Core/I18n/SchemaStructure_3_3_beta1.php +++ b/CRM/Core/I18n/SchemaStructure_3_3_beta1.php @@ -36,8 +36,7 @@ class CRM_Core_I18n_SchemaStructure_3_3_beta1 { /** * @return array */ - static - public function &columns() { + static public function &columns() { static $result = NULL; if (!$result) { $result = array( @@ -205,8 +204,7 @@ class CRM_Core_I18n_SchemaStructure_3_3_beta1 { /** * @return array */ - static - public function &indices() { + static public function &indices() { static $result = NULL; if (!$result) { $result = array( @@ -287,8 +285,7 @@ class CRM_Core_I18n_SchemaStructure_3_3_beta1 { /** * @return array */ - static - public function &tables() { + static public function &tables() { static $result = NULL; if (!$result) { $result = array_keys(self::columns()); diff --git a/CRM/Core/Payment/IATS.php b/CRM/Core/Payment/IATS.php index 88fa623cc5..3336c2035c 100644 --- a/CRM/Core/Payment/IATS.php +++ b/CRM/Core/Payment/IATS.php @@ -106,11 +106,11 @@ class CRM_Core_Payment_IATS extends CRM_Core_Payment { if ($isRecur) { include_once 'Services/IATS/iats_reoccur.php'; - $iatslink1 = new iatslinkReoccur; + $iatslink1 = new iatslinkReoccur(); } else { include_once 'Services/IATS/iatslink.php'; - $iatslink1 = new iatslink; + $iatslink1 = new iatslink(); } $iatslink1->setTestMode($this->_profile['mode'] != 'live'); @@ -204,7 +204,7 @@ class CRM_Core_Payment_IATS extends CRM_Core_Payment { default: die('Invalid frequency unit!'); - break; + break; } $endDate = date('Y-m-d', $endTime); $startDate = date('Y-m-d', $startTime); diff --git a/CRM/Core/Permission/Drupal6.php b/CRM/Core/Permission/Drupal6.php index c9569fc5a0..6e8760f04b 100644 --- a/CRM/Core/Permission/Drupal6.php +++ b/CRM/Core/Permission/Drupal6.php @@ -69,7 +69,7 @@ class CRM_Core_Permission_Drupal6 extends CRM_Core_Permission_DrupalBase { * * @param int $contactID * - * @return boolean + * @return bool * true if yes, else false */ public function check($str, $contactID = NULL) { @@ -95,10 +95,9 @@ class CRM_Core_Permission_Drupal6 extends CRM_Core_Permission_DrupalBase { * @param array $array * The roles to check. * - * @return boolean + * @return bool * true if yes, else false */ - public function checkGroupRole($array) { if (function_exists('user_load') && isset($array)) { $user = user_load(array('uid' => $GLOBALS['user']->uid)); diff --git a/CRM/Core/QuickForm/GroupMultiSelect.php b/CRM/Core/QuickForm/GroupMultiSelect.php index c2e7193063..7365321b91 100644 --- a/CRM/Core/QuickForm/GroupMultiSelect.php +++ b/CRM/Core/QuickForm/GroupMultiSelect.php @@ -118,7 +118,7 @@ class CRM_Core_QuickForm_GroupMultiSelect extends CRM_Core_QuickForm_NestedAdvMu // set name of Select From Box $this->_attributesUnselected = array( 'name' => '__' . $selectName, - 'ondblclick' => "{$this->_jsPrefix}{$this->_jsPostfix}(this.form.elements['__" . $selectName . "'], this.form.elements['_" . $selectName . "'], this.form.elements['" . $selectName . "'], 'add')" + 'ondblclick' => "{$this->_jsPrefix}{$this->_jsPostfix}(this.form.elements['__" . $selectName . "'], this.form.elements['_" . $selectName . "'], this.form.elements['" . $selectName . "'], 'add')", ); $this->_attributesUnselected = array_merge($this->_attributes, $this->_attributesUnselected); $attrUnselected = $this->_getAttrString($this->_attributesUnselected); @@ -126,7 +126,7 @@ class CRM_Core_QuickForm_GroupMultiSelect extends CRM_Core_QuickForm_NestedAdvMu // set name of Select To Box $this->_attributesSelected = array( 'name' => '_' . $selectName, - 'ondblclick' => "{$this->_jsPrefix}{$this->_jsPostfix}(this.form.elements['__" . $selectName . "'], this.form.elements['_" . $selectName . "'], this.form.elements['" . $selectName . "'], 'remove')" + 'ondblclick' => "{$this->_jsPrefix}{$this->_jsPostfix}(this.form.elements['__" . $selectName . "'], this.form.elements['_" . $selectName . "'], this.form.elements['" . $selectName . "'], 'remove')", ); $this->_attributesSelected = array_merge($this->_attributes, $this->_attributesSelected); $attrSelected = $this->_getAttrString($this->_attributesSelected); @@ -134,7 +134,7 @@ class CRM_Core_QuickForm_GroupMultiSelect extends CRM_Core_QuickForm_NestedAdvMu // set name of Select hidden Box $this->_attributesHidden = array( 'name' => $selectName, - 'style' => 'overflow: hidden; visibility: hidden; width: 1px; height: 0;' + 'style' => 'overflow: hidden; visibility: hidden; width: 1px; height: 0;', ); $this->_attributesHidden = array_merge($this->_attributes, $this->_attributesHidden); $attrHidden = $this->_getAttrString($this->_attributesHidden); diff --git a/CRM/Core/Selector/Base.php b/CRM/Core/Selector/Base.php index 1674ec5873..f9c6162d2c 100644 --- a/CRM/Core/Selector/Base.php +++ b/CRM/Core/Selector/Base.php @@ -63,8 +63,8 @@ class CRM_Core_Selector_Base { * This function gets the attribute for the action that * it matches. * - * @param string match the action to match against - * @param string attribute the attribute to return ( name, link, title ) + * @param string $match the action to match against + * @param string $attribute the attribute to return ( name, link, title ) * * @return string * the attribute that matches the action if any @@ -112,7 +112,7 @@ class CRM_Core_Selector_Base { /** * Getter for the sorting direction for the fields which will be displayed on the form. * - * @param string action the action being performed + * @param string $action the action being performed * * @return array * the elements that can be sorted along with their properties diff --git a/CRM/Core/Selector/Controller.php b/CRM/Core/Selector/Controller.php index 157a25d763..046eb4eb2b 100644 --- a/CRM/Core/Selector/Controller.php +++ b/CRM/Core/Selector/Controller.php @@ -119,7 +119,7 @@ class CRM_Core_Selector_Controller { * so the display routine needs to not do any work. (The * parent object takes care of the display) * - * @var boolean + * @var bool */ protected $_embedded = FALSE; @@ -127,7 +127,7 @@ class CRM_Core_Selector_Controller { * Are we in print mode? if so we need to modify the display * functionality to do a minimal display :) * - * @var boolean + * @var bool */ protected $_print = FALSE; @@ -169,7 +169,7 @@ class CRM_Core_Selector_Controller { /** * Should we compute actions dynamically (since they are quite verbose) * - * @var boolean + * @var bool */ protected $_dynamicAction = FALSE; @@ -258,7 +258,7 @@ class CRM_Core_Selector_Controller { * @param int $reset * Are we being reset. * - * @return boolean + * @return bool * if the GET params are different from the session params */ public function hasChanged($reset) { @@ -496,7 +496,7 @@ class CRM_Core_Selector_Controller { /** * Getter for embedded * - * @return boolean + * @return bool * return the embedded value */ public function getEmbedded() { @@ -517,7 +517,7 @@ class CRM_Core_Selector_Controller { /** * Getter for print * - * @return boolean + * @return bool * return the print value */ public function getPrint() { diff --git a/CRM/Core/Session.php b/CRM/Core/Session.php index df162f25ad..88e539c5b7 100644 --- a/CRM/Core/Session.php +++ b/CRM/Core/Session.php @@ -95,7 +95,7 @@ class CRM_Core_Session { */ public static function &singleton() { if (self::$_singleton === NULL) { - self::$_singleton = new CRM_Core_Session; + self::$_singleton = new CRM_Core_Session(); } return self::$_singleton; } @@ -144,7 +144,7 @@ class CRM_Core_Session { ) { $this->_session[$this->_key] = array(); } - return; + return NULL; } /** @@ -167,7 +167,7 @@ class CRM_Core_Session { $this->_session = array(); } - return; + return NULL; } /** diff --git a/CRM/Custom/Form/DeleteField.php b/CRM/Custom/Form/DeleteField.php index b531dc0dda..7b82e0b170 100644 --- a/CRM/Custom/Form/DeleteField.php +++ b/CRM/Custom/Form/DeleteField.php @@ -55,8 +55,6 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form { /** * Set up variables to build the form * - * @param null - * * @return void * @acess protected */ @@ -75,8 +73,6 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form { /** * Build the form object * - * @param null - * * @return void */ public function buildQuickForm() { @@ -98,8 +94,6 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form { /** * Process the form when submitted * - * @param null - * * @return void */ public function postProcess() { diff --git a/CRM/Custom/Form/Preview.php b/CRM/Custom/Form/Preview.php index d5347b3b4a..92c867b7b5 100644 --- a/CRM/Custom/Form/Preview.php +++ b/CRM/Custom/Form/Preview.php @@ -55,8 +55,6 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form { * * gets session variables for group or field id * - * @param null - * * @return void */ public function preProcess() { @@ -94,8 +92,6 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form { /** * Set the default form values * - * @param null - * * @return array * the default array reference */ @@ -110,8 +106,6 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form { /** * Build the form object * - * @param null - * * @return void */ public function buildQuickForm() { diff --git a/CRM/Event/Form/ManageEvent/ScheduleReminders.php b/CRM/Event/Form/ManageEvent/ScheduleReminders.php index c8ada7f0a6..45d2f7199c 100644 --- a/CRM/Event/Form/ManageEvent/ScheduleReminders.php +++ b/CRM/Event/Form/ManageEvent/ScheduleReminders.php @@ -64,7 +64,7 @@ class CRM_Event_Form_ManageEvent_ScheduleReminders extends CRM_Event_Form_Manage else { $action += CRM_Core_Action::ENABLE; } - $scheduleReminder = new CRM_Admin_Page_ScheduleReminders; + $scheduleReminder = new CRM_Admin_Page_ScheduleReminders(); $links = $scheduleReminder->links(); $links[CRM_Core_Action::DELETE]['qs'] .= "&context=event&compId={$this->_id}"; $links[CRM_Core_Action::UPDATE]['qs'] .= "&context=event&compId={$this->_id}"; diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index b901947c09..4fdd2cd163 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -239,7 +239,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { if (is_array($v)) { foreach (array( 'first_name', - 'last_name' + 'last_name', ) as $name) { if (isset($v['billing_' . $name]) && !isset($v[$name]) @@ -640,8 +640,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { } //passing contribution id is already registered. - $contribution = - self::processContribution($this, $value, $result, $contactID, $pending, $isAdditionalAmount); + $contribution = self::processContribution($this, $value, $result, $contactID, $pending, $isAdditionalAmount); $value['contributionID'] = $contribution->id; $value['contributionTypeID'] = $contribution->financial_type_id; $value['receive_date'] = $contribution->receive_date; @@ -958,7 +957,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { * * @return void */ - static function processContribution( + public static function processContribution( &$form, $params, $result, $contactID, $pending = FALSE, $isAdditionalAmount = FALSE ) { diff --git a/CRM/Event/Form/Task/Delete.php b/CRM/Event/Form/Task/Delete.php index 7269f6665f..6f23ff5ab5 100644 --- a/CRM/Event/Form/Task/Delete.php +++ b/CRM/Event/Form/Task/Delete.php @@ -79,7 +79,6 @@ class CRM_Event_Form_Task_Delete extends CRM_Event_Form_Task { 2 => ts('Delete only this participant record.'), ); - $this->addRadio('delete_participant', NULL, $deleteParticipants, NULL, '
'); $this->setDefaults(array('delete_participant' => 1)); @@ -127,8 +126,8 @@ class CRM_Event_Form_Task_Delete extends CRM_Event_Form_Task { $status = array( ts('Participant(s) Deleted: %1 (Total Selected: %2)', array( 1 => $deletedParticipants, - 2 => count($this->_participantIds) - )) + 2 => count($this->_participantIds), + )), ); if (!empty($participantLinks)) { $status[] = ts('The following participants no longer have an event fee recorded. You can edit their registration and record a replacement contribution by clicking the links below:') . '
' . $participantLinks; diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 152fc2bd2e..1227a184ea 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -73,7 +73,7 @@ class CRM_Export_BAO_Export { * @param string $queryOperator * */ - static function exportComponents( + public static function exportComponents( $selectAll, $ids, $params, @@ -322,8 +322,7 @@ class CRM_Export_BAO_Export { $componentReturnProperties = CRM_Contact_BAO_Query::defaultReturnProperties($queryMode); if ($queryMode == CRM_Contact_BAO_Query::MODE_CONTRIBUTE) { // soft credit columns are not automatically populated, because contribution search doesn't require them by default - $componentReturnProperties = - array_merge( + $componentReturnProperties = array_merge( $componentReturnProperties, CRM_Contribute_BAO_Query::softCreditReturnProperties(TRUE)); } @@ -1692,7 +1691,7 @@ WHERE id IN ( $deleteIDString ) * Example: 'Hello {contact.first_name}' => converted to => '{contact.first_name}' * i.e 'Hello Alan' => converted to => 'Alan' */ - static function _trimNonTokens( + public static function _trimNonTokens( &$parsedString, $defaultGreeting, $addressMergeGreetings, $greetingType = 'postal_greeting' ) { diff --git a/CRM/Extension/Manager/Payment.php b/CRM/Extension/Manager/Payment.php index e48267dd10..8e031c0df2 100644 --- a/CRM/Extension/Manager/Payment.php +++ b/CRM/Extension/Manager/Payment.php @@ -197,7 +197,7 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { CRM_Core_Session::setStatus(ts('Failed to load file (%3) for payment processor (%1) while running "%2"', array( 1 => $info->key, 2 => $method, - 3 => $file + 3 => $file, )), '', 'error'); return; } @@ -208,7 +208,7 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { catch (CRM_Extension_Exception $e) { CRM_Core_Session::setStatus(ts('Failed to determine file path for payment processor (%1) while running "%2"', array( 1 => $info->key, - 2 => $method + 2 => $method, )), '', 'error'); return; } @@ -288,7 +288,7 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { // Does PP implement this method, and can we call it? if (method_exists($processorInstance, $method) && is_callable(array( $processorInstance, - $method + $method, )) ) { // If so, call it ... diff --git a/CRM/Financial/Form/FinancialBatch.php b/CRM/Financial/Form/FinancialBatch.php index 406e862534..eeea303108 100644 --- a/CRM/Financial/Form/FinancialBatch.php +++ b/CRM/Financial/Form/FinancialBatch.php @@ -64,14 +64,14 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { 'edit own manual batches', 'edit all manual batches', ), - 'actionName' => 'edit' + 'actionName' => 'edit', ), CRM_Core_Action::DELETE => array( 'permission' => array( 'delete own manual batches', 'delete all manual batches', ), - 'actionName' => 'delete' + 'actionName' => 'delete', ), ); @@ -296,7 +296,6 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { * @param int $userContactID * @param string $actionName * - * @return array * list of errors to be posted back to the form */ public function checkPermissions($action, $permissions, $createdID, $userContactID, $actionName) { diff --git a/CRM/Friend/Form.php b/CRM/Friend/Form.php index 9607a3f046..950d87bd67 100644 --- a/CRM/Friend/Form.php +++ b/CRM/Friend/Form.php @@ -75,7 +75,7 @@ class CRM_Friend_Form extends CRM_Core_Form { if (in_array($pcomponent, array( 'contribute', - 'event' + 'event', ))) { $values = array(); $params = array('id' => $this->_entityId); diff --git a/CRM/Grant/BAO/Query.php b/CRM/Grant/BAO/Query.php index 66f358afeb..b7a9d6bb2f 100644 --- a/CRM/Grant/BAO/Query.php +++ b/CRM/Grant/BAO/Query.php @@ -212,7 +212,7 @@ class CRM_Grant_BAO_Query { $query->_qill[$grouping][] = ts('Grant Type %2 %1', array( 1 => implode(' ' . ts('or') . ' ', $names), - 2 => $op + 2 => $op, )); $query->_tables['civicrm_grant'] = $query->_whereTables['civicrm_grant'] = 1; @@ -248,7 +248,7 @@ class CRM_Grant_BAO_Query { $query->_qill[$grouping][] = ts('Grant Status %2 %1', array( 1 => implode(' ' . ts('or') . ' ', $names), - 2 => $op + 2 => $op, )); $query->_tables['civicrm_grant'] = $query->_whereTables['civicrm_grant'] = 1; @@ -331,7 +331,7 @@ class CRM_Grant_BAO_Query { * * @return array|null */ - static function defaultReturnProperties( + public static function defaultReturnProperties( $mode, $includeCustomFields = TRUE ) { diff --git a/CRM/Mailing/Form/Test.php b/CRM/Mailing/Form/Test.php index c1282d9a0f..bcdb26f9d5 100644 --- a/CRM/Mailing/Form/Test.php +++ b/CRM/Mailing/Form/Test.php @@ -177,7 +177,7 @@ class CRM_Mailing_Form_Test extends CRM_Core_Form { * @param array $self * An current this object. * - * @return boolean + * @return bool * true on successful SMTP handoff */ public static function testMail($testParams, $files, $self) { @@ -266,7 +266,7 @@ class CRM_Mailing_Form_Test extends CRM_Core_Form { ) { return array( '_qf_default' => - ts("You can not schedule or send this mailing because there are currently no recipients selected. Click 'Previous' to return to the Select Recipients step, OR click 'Save & Continue Later'."), + ts("You can not schedule or send this mailing because there are currently no recipients selected. Click 'Previous' to return to the Select Recipients step, OR click 'Save & Continue Later'."), ); } @@ -326,7 +326,7 @@ ORDER BY e.is_bulkmail DESC, e.is_primary DESC 'email' => $email, 'is_primary' => 1, 'location_type_id' => 1, - ) + ), ), ); $contact = CRM_Contact_BAO_Contact::create($params); diff --git a/CRM/Mailing/Info.php b/CRM/Mailing/Info.php index 2c3384e309..38e64683bd 100644 --- a/CRM/Mailing/Info.php +++ b/CRM/Mailing/Info.php @@ -64,7 +64,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { 'js' => array( 'js/angular-crmMailing.js', 'js/angular-crmMailing/services.js', - 'js/angular-crmMailing/directives.js' + 'js/angular-crmMailing/directives.js', ), 'css' => array('css/angular-crmMailing.css'), ); @@ -73,7 +73,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { 'js' => array( 'js/angular-crmMailingAB.js', 'js/angular-crmMailingAB/services.js', - 'js/angular-crmMailingAB/directives.js' + 'js/angular-crmMailingAB/directives.js', ), 'css' => array('css/angular-crmMailingAB.css'), ); @@ -139,7 +139,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { 'fromAddress' => array_values($fromAddress['values'][0]['api.OptionValue.get']['values']), 'defaultTestEmail' => civicrm_api3('Contact', 'getvalue', array( 'id' => 'user_contact_id', - 'return' => 'email' + 'return' => 'email', )), 'visibility' => array( array('value' => 'Public Pages', 'label' => ts('Public Pages')), diff --git a/CRM/Mailing/MailStore.php b/CRM/Mailing/MailStore.php index f11c413f22..51259f7e36 100644 --- a/CRM/Mailing/MailStore.php +++ b/CRM/Mailing/MailStore.php @@ -47,7 +47,7 @@ class CRM_Mailing_MailStore { * mail store implementation for processing CiviMail-bound emails */ public static function getStore($name = NULL) { - $dao = new CRM_Core_DAO_MailSettings; + $dao = new CRM_Core_DAO_MailSettings(); $dao->domain_id = CRM_Core_Config::domainID(); $name ? $dao->name = $name : $dao->is_default = 1; if (!$dao->find(TRUE)) { @@ -128,7 +128,7 @@ class CRM_Mailing_MailStore { return array(); } $mails = array(); - $parser = new ezcMailParser; + $parser = new ezcMailParser(); //set property text attachment as file CRM-5408 $parser->options->parseTextAttachmentsAsFiles = TRUE; @@ -158,7 +158,7 @@ class CRM_Mailing_MailStore { foreach (array( 'cur', 'new', - 'tmp' + 'tmp', ) as $sub) { if (!file_exists($dir . DIRECTORY_SEPARATOR . $sub)) { if ($this->_debug) { diff --git a/CRM/Mailing/MailStore/Localdir.php b/CRM/Mailing/MailStore/Localdir.php index 27487fd1a8..4c8cfdd9b9 100644 --- a/CRM/Mailing/MailStore/Localdir.php +++ b/CRM/Mailing/MailStore/Localdir.php @@ -56,13 +56,13 @@ class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore { 'CiviMail.ignored', date('Y'), date('m'), - date('d') + date('d'), ))); $this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, array( 'CiviMail.processed', date('Y'), date('m'), - date('d') + date('d'), ))); } @@ -101,7 +101,7 @@ class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore { } $set = new ezcMailFileSet(array($file)); - $parser = new ezcMailParser; + $parser = new ezcMailParser(); //set property text attachment as file CRM-5408 $parser->options->parseTextAttachmentsAsFiles = TRUE; diff --git a/CRM/Member/BAO/MembershipPayment.php b/CRM/Member/BAO/MembershipPayment.php index 1e7e31c7fd..aeef774c4a 100644 --- a/CRM/Member/BAO/MembershipPayment.php +++ b/CRM/Member/BAO/MembershipPayment.php @@ -69,7 +69,7 @@ class CRM_Member_BAO_MembershipPayment extends CRM_Member_DAO_MembershipPayment // OR the caller will have taken responsibility for updating the line items themselves so we will update using SQL here $membershipTypeID = civicrm_api3('membership', 'getvalue', array( 'id' => $dao->membership_id, - 'return' => 'membership_type_id' + 'return' => 'membership_type_id', )); $sql = "UPDATE civicrm_line_item li LEFT JOIN civicrm_price_field_value pv ON pv.id = li.price_field_value_id @@ -79,7 +79,7 @@ class CRM_Member_BAO_MembershipPayment extends CRM_Member_DAO_MembershipPayment CRM_Core_DAO::executeQuery($sql, array( 1 => array($dao->membership_id, 'Integer'), 2 => array($membershipTypeID, 'Integer'), - 3 => array($dao->contribution_id, 'Integer') + 3 => array($dao->contribution_id, 'Integer'), )); return $dao; } diff --git a/CRM/Member/Import/Form/MapField.php b/CRM/Member/Import/Form/MapField.php index c4818fb97b..6f830f517e 100644 --- a/CRM/Member/Import/Form/MapField.php +++ b/CRM/Member/Import/Form/MapField.php @@ -95,7 +95,7 @@ class CRM_Member_Import_Form_MapField extends CRM_Import_Form_MapField { 'email', 'external_identifier', 'membership_start_date', - 'membership_type_id' + 'membership_type_id', ); foreach ($highlightedFieldsArray as $name) { $highlightedFields[] = $name; @@ -362,7 +362,7 @@ class CRM_Member_Import_Form_MapField extends CRM_Import_Form_MapField { $errors['_qf_default'] = ''; } $errors['_qf_default'] .= ts('Missing required contact matching fields.') . " $fieldMessage " . ts('(Sum of all weights should be greater than or equal to threshold: %1).', array( - 1 => $threshold + 1 => $threshold, )) . ' ' . ts('(OR Membership ID if update mode.)') . '
'; } } @@ -371,7 +371,7 @@ class CRM_Member_Import_Form_MapField extends CRM_Import_Form_MapField { $errors['_qf_default'] = ''; } $errors['_qf_default'] .= ts('Missing required field: %1', array( - 1 => $title + 1 => $title, )) . '
'; } } diff --git a/CRM/Member/Page/UserDashboard.php b/CRM/Member/Page/UserDashboard.php index a53740f994..3d73bc8041 100644 --- a/CRM/Member/Page/UserDashboard.php +++ b/CRM/Member/Page/UserDashboard.php @@ -41,7 +41,6 @@ class CRM_Member_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard /** * List memberships for the UF user * - * @return null */ public function listMemberships() { $membership = array(); @@ -58,7 +57,7 @@ class CRM_Member_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard $statusANDType = CRM_Member_BAO_Membership::getStatusANDTypeValues($dao->id); foreach (array( 'status', - 'membership_type' + 'membership_type', ) as $fld) { $membership[$dao->id][$fld] = CRM_Utils_Array::value($fld, $statusANDType[$dao->id]); } @@ -96,7 +95,6 @@ class CRM_Member_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/Member/Selector/Search.php b/CRM/Member/Selector/Search.php index e7c9a1e4d3..e7cb069028 100644 --- a/CRM/Member/Selector/Search.php +++ b/CRM/Member/Selector/Search.php @@ -143,7 +143,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C * * @return \CRM_Member_Selector_Search */ - function __construct( + public function __construct( &$queryParams, $action = CRM_Core_Action::NONE, $memberClause = NULL, @@ -190,8 +190,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C * * @return array */ - static - function &links( + public static function &links( $status = 'all', $isPaymentProcessor = NULL, $accessContribution = NULL, diff --git a/CRM/Pledge/BAO/Pledge.php b/CRM/Pledge/BAO/Pledge.php index c60fa7fc91..95f110ed6e 100644 --- a/CRM/Pledge/BAO/Pledge.php +++ b/CRM/Pledge/BAO/Pledge.php @@ -780,7 +780,7 @@ GROUP BY currency foreach (array( 'Pending', 'In Progress', - 'Overdue' + 'Overdue', ) as $name) { if ($statusId = array_search($name, $pledgeStatuses)) { $status[] = $statusId; @@ -839,7 +839,7 @@ GROUP BY currency foreach (array( 'Completed', 'Cancelled', - 'Failed' + 'Failed', ) as $statusKey) { if ($key = CRM_Utils_Array::key($statusKey, $allStatus)) { unset($allStatus[$key]); @@ -1125,7 +1125,7 @@ SELECT pledge.contact_id as contact_id, return civicrm_api3('pledge_payment', 'getcount', array( 'pledge_id' => $pledgeID, - 'status_id' => array('IN' => self::getTransactionalStatus()) + 'status_id' => array('IN' => self::getTransactionalStatus()), )); } diff --git a/CRM/Pledge/BAO/PledgePayment.php b/CRM/Pledge/BAO/PledgePayment.php index 7deb2ac27b..2de607bd63 100644 --- a/CRM/Pledge/BAO/PledgePayment.php +++ b/CRM/Pledge/BAO/PledgePayment.php @@ -213,7 +213,7 @@ WHERE pledge_id = %1 * @return CRM_Pledge_BAO_PledgePayment */ public static function retrieve(&$params, &$defaults) { - $payment = new CRM_Pledge_BAO_PledgePayment; + $payment = new CRM_Pledge_BAO_PledgePayment(); $payment->copyValues($params); if ($payment->find(TRUE)) { CRM_Core_DAO::storeValues($payment, $defaults); @@ -339,7 +339,7 @@ WHERE pledge_id = %1 * @return int * $newStatus, updated status id (or 0) */ - static function updatePledgePaymentStatus( + public static function updatePledgePaymentStatus( $pledgeID, $paymentIDs = NULL, $paymentStatusID = NULL, @@ -631,7 +631,7 @@ WHERE civicrm_pledge.id = %2 * , is function being called from bin script?. * */ - static function updatePledgePayments( + public static function updatePledgePayments( $pledgeId, $paymentStatusId, $paymentIds = NULL, diff --git a/CRM/Pledge/Page/UserDashboard.php b/CRM/Pledge/Page/UserDashboard.php index e26b2ad9d7..98eb57866e 100644 --- a/CRM/Pledge/Page/UserDashboard.php +++ b/CRM/Pledge/Page/UserDashboard.php @@ -37,7 +37,6 @@ class CRM_Pledge_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard /** * called when action is browse * - * @return null */ public function listPledges() { $controller = new CRM_Core_Controller_Simple( @@ -72,7 +71,6 @@ class CRM_Pledge_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/Profile/Form/Edit.php b/CRM/Profile/Form/Edit.php index a570ff68b7..23bd609dba 100644 --- a/CRM/Profile/Form/Edit.php +++ b/CRM/Profile/Form/Edit.php @@ -311,7 +311,7 @@ SELECT module,is_reserved * This is a first version and will be tweaked over a period of time * * - * @return boolean + * @return bool * true if no error found */ public function validate() { diff --git a/CRM/Report/Utils/Get.php b/CRM/Report/Utils/Get.php index 4a7fbba404..9ce1496e31 100644 --- a/CRM/Report/Utils/Get.php +++ b/CRM/Report/Utils/Get.php @@ -196,7 +196,7 @@ class CRM_Report_Utils_Get { $chartType = CRM_Utils_Array::value("charts", $_GET); if (in_array($chartType, array( 'barChart', - 'pieChart' + 'pieChart', ))) { $defaults["charts"] = $chartType; } diff --git a/CRM/Utils/OpenFlashChart.php b/CRM/Utils/OpenFlashChart.php index 5ca9f9f3af..21f140d9ab 100644 --- a/CRM/Utils/OpenFlashChart.php +++ b/CRM/Utils/OpenFlashChart.php @@ -452,13 +452,12 @@ class CRM_Utils_OpenFlashChart { foreach ($rows['multiValue'] as $key => $val) { $graph[$key] = array_combine($dateKeys, $rows['multiValue'][$key]); } - $chartData = - array( - 'legend' => "$legend " . CRM_Utils_Array::value('legend', $rows, ts('Contribution')) . ' ' . ts('Summary'), - 'values' => $graph[0], - 'multiValues' => $graph, - 'barKeys' => CRM_Utils_Array::value('barKeys', $rows, array()), - ); + $chartData = array( + 'legend' => "$legend " . CRM_Utils_Array::value('legend', $rows, ts('Contribution')) . ' ' . ts('Summary'), + 'values' => $graph[0], + 'multiValues' => $graph, + 'barKeys' => CRM_Utils_Array::value('barKeys', $rows, array()), + ); } // rotate the x labels. @@ -475,7 +474,7 @@ class CRM_Utils_OpenFlashChart { foreach (array( 'xSize', 'ySize', - 'divName' + 'divName', ) as $f) { if (!empty($rows[$f])) { $chartData[$f] = $rows[$f]; @@ -515,7 +514,7 @@ class CRM_Utils_OpenFlashChart { foreach (array( 'xSize', 'ySize', - 'divName' + 'divName', ) as $f) { if (!empty($rows[$f])) { $chartData[$f] = $rows[$f]; diff --git a/CRM/Utils/SystemLogger.php b/CRM/Utils/SystemLogger.php index 6b1222ced9..ee18da9ea1 100644 --- a/CRM/Utils/SystemLogger.php +++ b/CRM/Utils/SystemLogger.php @@ -36,17 +36,10 @@ class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\ /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string $message - * @param array $context - * @return null - */ - /** * @param mixed $level * @param string $message * @param array $context * - * @return null */ public function log($level, $message, array $context = array()) { if (!isset($context['hostname'])) { diff --git a/api/v3/MembershipStatus.php b/api/v3/MembershipStatus.php index da355eef6c..9be467237d 100644 --- a/api/v3/MembershipStatus.php +++ b/api/v3/MembershipStatus.php @@ -46,7 +46,7 @@ * * @return array * Array of newly created membership status property values. - * {@getfields MembershipStatus_create} + * {@getfields MembershipStatus_create} */ function civicrm_api3_membership_status_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -62,7 +62,7 @@ function civicrm_api3_membership_status_create($params) { * * @return array * Array of all found membership status property values. - * {@getfields MembershipStatus_get} + * {@getfields MembershipStatus_get} */ function civicrm_api3_membership_status_get($params) { return _civicrm_api3_basic_get('CRM_Member_BAO_MembershipStatus', $params); @@ -135,7 +135,7 @@ function civicrm_api3_membership_status_delete($params) { * * @throws API_Exception * - * @return Array + * @return array * Array of status id and status name * @public */ diff --git a/api/v3/OptionValue.php b/api/v3/OptionValue.php index b552e30314..f693c9c0e8 100644 --- a/api/v3/OptionValue.php +++ b/api/v3/OptionValue.php @@ -10,7 +10,7 @@ * * @return array * details of found Option Values - * {@getfields OptionValue_get} + * {@getfields OptionValue_get} */ function civicrm_api3_option_value_get($params) { @@ -38,7 +38,7 @@ function civicrm_api3_option_value_get($params) { * @throws API_Exception * @return array * Array of newly created option_value property values. - * {@getfields OptionValue_create} + * {@getfields OptionValue_create} */ function civicrm_api3_option_value_create($params) { $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -79,7 +79,7 @@ function _civicrm_api3_option_value_create_spec(&$params) { * * @return array * Api result - * {@getfields OptionValue_create} + * {@getfields OptionValue_create} */ function civicrm_api3_option_value_delete($params) { // we will get the option group id before deleting so we can flush pseudoconstants diff --git a/api/v3/Participant.php b/api/v3/Participant.php index 9ce240473d..2d4742bdde 100644 --- a/api/v3/Participant.php +++ b/api/v3/Participant.php @@ -48,7 +48,7 @@ * * @return array * apiresult - * {@getfields participant_create} + * {@getfields participant_create} */ function civicrm_api3_participant_create($params) { //check that event id is not an template - should be done @ BAO layer @@ -163,7 +163,7 @@ function _civicrm_api3_participant_create_spec(&$params) { * * @return array * (reference ) array of properties, if error an array with an error id and error message - * {@getfields participant_get} + * {@getfields participant_get} */ function civicrm_api3_participant_get($params) { $mode = CRM_Contact_BAO_Query::MODE_EVENT; diff --git a/api/v3/ParticipantStatusType.php b/api/v3/ParticipantStatusType.php index e789623e0f..9b8870f876 100644 --- a/api/v3/ParticipantStatusType.php +++ b/api/v3/ParticipantStatusType.php @@ -46,7 +46,7 @@ * * @return array * participant_status array - * {@getfields ParticipantStatusType_create} + * {@getfields ParticipantStatusType_create} * @example ParticipantStatusTypeCreate.php */ function civicrm_api3_participant_status_type_create($params) { @@ -63,7 +63,7 @@ function civicrm_api3_participant_status_type_create($params) { * * @return array * Array of matching participant_statuses - * {@getfields ParticipantStatusType_get} + * {@getfields ParticipantStatusType_get} * @example ParticipantStatusTypeGet.php */ function civicrm_api3_participant_status_type_get($params) { @@ -82,7 +82,7 @@ function civicrm_api3_participant_status_type_get($params) { * * @return array * api result array - * {@getfields ParticipantStatusType_delete} + * {@getfields ParticipantStatusType_delete} * @example ParticipantStatusTypeDelete.php */ function civicrm_api3_participant_status_type_delete($params) { diff --git a/api/v3/PriceField.php b/api/v3/PriceField.php index bfe932940d..0fcc744ddc 100644 --- a/api/v3/PriceField.php +++ b/api/v3/PriceField.php @@ -44,7 +44,7 @@ * * @return array * api result array - * {@getfields price_field_create} + * {@getfields price_field_create} */ function civicrm_api3_price_field_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -70,7 +70,7 @@ function _civicrm_api3_price_field_create_spec(&$params) { * * @return array * Array of matching price_fields - * {@getfields price_field_get} + * {@getfields price_field_get} */ function civicrm_api3_price_field_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -88,7 +88,7 @@ function civicrm_api3_price_field_get($params) { * * @return array * API result array - * {@getfields price_field_delete} + * {@getfields price_field_delete} */ function civicrm_api3_price_field_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); diff --git a/api/v3/Website.php b/api/v3/Website.php index c8df00738f..6811f0874f 100644 --- a/api/v3/Website.php +++ b/api/v3/Website.php @@ -98,12 +98,9 @@ function civicrm_api3_website_delete($params) { /** * Retrieve one or more websites * - * @param mixed[] (reference ) input parameters - * {@getfields website_get} + * @param array $params * {@example WebsiteGet.php 0} * @example WebsiteGet.php - * @param array $params - * An associative array of name/value pairs. * * @return array * details of found websites diff --git a/bin/deprecated/ParticipantProcessor.php b/bin/deprecated/ParticipantProcessor.php index 518ea881b2..63999e25bb 100644 --- a/bin/deprecated/ParticipantProcessor.php +++ b/bin/deprecated/ParticipantProcessor.php @@ -41,7 +41,7 @@ require_once 'CRM/Core/Config.php'; class CRM_ParticipantProcessor { /** */ - function __construct() { + public function __construct() { $config = CRM_Core_Config::singleton(); //this does not return on failure diff --git a/tests/phpunit/CiviTest/ContributionPage.php b/tests/phpunit/CiviTest/ContributionPage.php index a9b1f81a95..4c2154331a 100644 --- a/tests/phpunit/CiviTest/ContributionPage.php +++ b/tests/phpunit/CiviTest/ContributionPage.php @@ -45,7 +45,7 @@ class ContributionPage extends PHPUnit_Framework_Testcase { * @param int $contributionPageId * Id of the Contribution Page. * to be deleted - * @return boolean + * @return bool * true if Contribution Page deleted, false otherwise */ public static function delete($contributionPageId) { diff --git a/tests/phpunit/WebTest/AllTests.php b/tests/phpunit/WebTest/AllTests.php index b9942504eb..1f9287e9d7 100644 --- a/tests/phpunit/WebTest/AllTests.php +++ b/tests/phpunit/WebTest/AllTests.php @@ -42,7 +42,7 @@ class WebTest_AllTests extends CiviTestSuite { */ private static function getInstance() { if (is_null(self::$instance)) { - self::$instance = new self; + self::$instance = new self(); } return self::$instance; } diff --git a/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php b/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php index ed9d249428..673991e1c6 100644 --- a/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php +++ b/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php @@ -107,7 +107,7 @@ class WebTest_Contact_ProfileChecksumTest extends CiviSeleniumTestCase { 'edit-1-profile-edit', 'edit-1-profile-create', 'edit-1-access-all-custom-data', - 'edit-1-edit-all-contacts' + 'edit-1-edit-all-contacts', ); $this->changePermissions($permission); -- 2.25.1