From dbb0d30bcdd004d012c44d8db2a1bde2ae14794a Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 24 Jan 2017 12:39:51 +1300 Subject: [PATCH] Comment fixes --- CRM/Campaign/BAO/Survey.php | 2 ++ CRM/Contact/BAO/Contact.php | 1 + CRM/Contact/Import/ImportJob.php | 7 +++++-- CRM/Core/DAO/permissions.php | 2 +- CRM/Core/Payment/AuthorizeNetIPN.php | 19 +++++++++++-------- CRM/Core/Payment/PayPalImpl.php | 1 + CRM/Financial/BAO/FinancialType.php | 1 + CRM/Mailing/BAO/MailingJob.php | 11 ++++++++--- CRM/Mailing/Event/BAO/Reply.php | 2 -- CRM/UF/Form/AdvanceSetting.php | 7 +------ CRM/UF/Page/Field.php | 2 -- 11 files changed, 31 insertions(+), 24 deletions(-) diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index b62f4f4949..5b09731f98 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -304,6 +304,8 @@ SELECT survey.id as id, * * @param string $returnColumn * @param bool $includePetitionActivityType + * + * @return string */ public static function getSurveyActivityType($returnColumn = 'label', $includePetitionActivityType = FALSE) { static $activityTypes; diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 83b806927a..e1f299cc63 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -785,6 +785,7 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer'); * Whether to actually restore, not delete. * @param bool $skipUndelete * Whether to force contact delete or not. + * @param bool $checkPermissions * * @return bool * Was contact deleted? diff --git a/CRM/Contact/Import/ImportJob.php b/CRM/Contact/Import/ImportJob.php index 570aa2d7bd..7c278e6380 100644 --- a/CRM/Contact/Import/ImportJob.php +++ b/CRM/Contact/Import/ImportJob.php @@ -342,9 +342,12 @@ class CRM_Contact_Import_ImportJob { } /** - * @param $contactIds + * Add imported contacts. + * + * @param array $contactIds * @param string $newGroupName - * @param $newGroupDesc + * @param string $newGroupDesc + * @param string $newGroupType * * @return array|bool */ diff --git a/CRM/Core/DAO/permissions.php b/CRM/Core/DAO/permissions.php index abfec760cd..d42f29c6d5 100644 --- a/CRM/Core/DAO/permissions.php +++ b/CRM/Core/DAO/permissions.php @@ -201,7 +201,7 @@ function _civicrm_api3_permissions($entity, $action, &$params) { 'get' => array('access CiviCRM'), 'default' => array( // nested array = OR - array('administer CiviCampaign', 'manage campaign') + array('administer CiviCampaign', 'manage campaign'), ), ); $permissions['survey'] = $permissions['campaign']; diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index 0db1ed5e28..5933ff9a6d 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -58,8 +58,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { $ids = $objects = $input = array(); if ($x_subscription_id) { - //Approved - + // Presence of the id means it is approved. $input['component'] = $component; // load post vars in $input @@ -213,8 +212,10 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { } /** - * @param $input - * @param $ids + * Get the input from passed in fields. + * + * @param array $input + * @param array $ids * * @return bool */ @@ -258,8 +259,12 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { } /** - * @param $ids - * @param $input + * Get ids from input. + * + * @param array $ids + * @param array $input + * + * @throws \CRM_Core_Exception */ public function getIDs(&$ids, &$input) { $ids['contact'] = $this->retrieve('x_cust_id', 'Integer', FALSE, 0); @@ -298,8 +303,6 @@ INNER JOIN civicrm_contribution co ON co.contribution_recur_id = cr.id // FIXME: figure out fields for event } else { - // get the optional ids - // Get membershipId. Join with membership payment table for additional checks $sql = " SELECT m.id diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index b2dcc108fc..7e34d17283 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -191,6 +191,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { * * @return array * the result in an nice formatted array (or an error object) + * @throws \Civi\Payment\Exception\PaymentProcessorException */ protected function setExpressCheckOut(&$params) { $args = array(); diff --git a/CRM/Financial/BAO/FinancialType.php b/CRM/Financial/BAO/FinancialType.php index c9b715d7cc..538b01ccd0 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -370,6 +370,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { * the mode of operation, can be add, view, edit, delete * @param bool $force * + * @return bool */ public static function checkPermissionedLineItems($id, $op, $force = TRUE) { if (!self::isACLFinancialTypeStatus()) { diff --git a/CRM/Mailing/BAO/MailingJob.php b/CRM/Mailing/BAO/MailingJob.php index 99c38a7411..49d3fc5989 100644 --- a/CRM/Mailing/BAO/MailingJob.php +++ b/CRM/Mailing/BAO/MailingJob.php @@ -55,9 +55,12 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { } /** + * Create mailing job. + * * @param array $params * - * @return CRM_Mailing_BAO_MailingJob + * @return \CRM_Mailing_BAO_MailingJob + * @throws \CRM_Core_Exception */ static public function create($params) { $job = new CRM_Mailing_BAO_MailingJob(); @@ -78,10 +81,12 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { } /** - * Initiate all pending/ready jobs + * Initiate all pending/ready jobs. * * @param array $testParams - * @param null $mode + * @param string $mode + * + * @return bool|null */ public static function runJobs($testParams = NULL, $mode = NULL) { $job = new CRM_Mailing_BAO_MailingJob(); diff --git a/CRM/Mailing/Event/BAO/Reply.php b/CRM/Mailing/Event/BAO/Reply.php index ed1cbc7ad5..4d6e874b52 100644 --- a/CRM/Mailing/Event/BAO/Reply.php +++ b/CRM/Mailing/Event/BAO/Reply.php @@ -62,7 +62,6 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply { */ public static function &reply($job_id, $queue_id, $hash, $replyto = NULL) { // First make sure there's a matching queue event. - $q = CRM_Mailing_Event_BAO_Queue::verify($job_id, $queue_id, $hash); $success = NULL; @@ -255,7 +254,6 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply { ); // TODO: do we need reply tokens? - $html = $component->body_html; if ($component->body_text) { $text = $component->body_text; diff --git a/CRM/UF/Form/AdvanceSetting.php b/CRM/UF/Form/AdvanceSetting.php index 07c127e464..28a6c62d30 100644 --- a/CRM/UF/Form/AdvanceSetting.php +++ b/CRM/UF/Form/AdvanceSetting.php @@ -29,18 +29,13 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2017 - * $Id$ - * */ class CRM_UF_Form_AdvanceSetting extends CRM_UF_Form_Group { /** - * Build the form object for Advance Settings. - * + * Build the form object for Advanced Settings. * * @param CRM_Core_Form $form - * - * @return void */ public static function buildAdvanceSetting(&$form) { // should mapping be enabled for this group diff --git a/CRM/UF/Page/Field.php b/CRM/UF/Page/Field.php index 9c77c3335e..e178e417cc 100644 --- a/CRM/UF/Page/Field.php +++ b/CRM/UF/Page/Field.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2017 - * $Id$ - * */ /** -- 2.25.1