From 45fab110fab69f69e9f0e50afc76bb8cfe548fa6 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 24 Jan 2017 12:38:46 +1300 Subject: [PATCH 1/3] Remove unused variable --- CRM/ACL/Form/EntityRole.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/CRM/ACL/Form/EntityRole.php b/CRM/ACL/Form/EntityRole.php index c16d3644e451..7d3798d72dbd 100644 --- a/CRM/ACL/Form/EntityRole.php +++ b/CRM/ACL/Form/EntityRole.php @@ -42,8 +42,6 @@ public function buildQuickForm() { return; } - $attributes = CRM_Core_DAO::getAttribute('CRM_ACL_DAO_EntityRole'); - $aclRoles = array('' => ts('- select -')) + CRM_Core_OptionGroup::values('acl_role'); $this->add('select', 'acl_role_id', ts('ACL Role'), $aclRoles, TRUE From 1e1ed556e29f820a3834d8b1d45e979bca8c720f Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 24 Jan 2017 12:39:10 +1300 Subject: [PATCH 2/3] Fix visibility on legacy functions --- CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php | 2 +- CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php | 2 +- CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php | 2 +- CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php | 2 +- CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php index 97b4d71668bc..2296225e888a 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php @@ -208,7 +208,7 @@ public function links() { * * @return array */ - static function &fields() { + public static function &fields() { if (!(self::$_fields)) { self::$_fields = array( 'id' => array( diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php index 7fb4d7a4269e..22b3fa669187 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php @@ -180,7 +180,7 @@ public function links() { * * @return array */ - static function &fields() { + public static function &fields() { if (!(self::$_fields)) { self::$_fields = array( 'id' => array( diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php index d907461ccce5..a73956f06768 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php @@ -168,7 +168,7 @@ public function links() { * * @return array */ - static function &fields() { + public static function &fields() { if (!(self::$_fields)) { self::$_fields = array( 'id' => array( diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php index bc99b2614b8c..4cac29ac9e15 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php @@ -180,7 +180,7 @@ public function links() { * * @return array */ - static function &fields() { + public static function &fields() { if (!(self::$_fields)) { self::$_fields = array( 'id' => array( diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php index 9307764d2f36..5ab117a985c9 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php @@ -131,7 +131,7 @@ public function links() { * * @return array */ - static function &fields() { + pubic static function &fields() { if (!(self::$_fields)) { self::$_fields = array( 'id' => array( From dbb0d30bcdd004d012c44d8db2a1bde2ae14794a Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 24 Jan 2017 12:39:51 +1300 Subject: [PATCH 3/3] 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 b62f4f4949c0..5b09731f9853 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -304,6 +304,8 @@ public static function getSurveys($onlyActive = TRUE, $onlyDefault = FALSE, $for * * @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 83b806927a63..e1f299cc6301 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -785,6 +785,7 @@ public static function displayName($id) { * 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 570aa2d7bd6c..7c278e6380c6 100644 --- a/CRM/Contact/Import/ImportJob.php +++ b/CRM/Contact/Import/ImportJob.php @@ -342,9 +342,12 @@ public function setFormVariables($form) { } /** - * @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 abfec760cde6..d42f29c6d5ae 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 0db1ed5e28a0..5933ff9a6d65 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -58,8 +58,7 @@ public function main($component = 'contribute') { $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 @@ public function recur(&$input, &$ids, &$objects, $first) { } /** - * @param $input - * @param $ids + * Get the input from passed in fields. + * + * @param array $input + * @param array $ids * * @return bool */ @@ -258,8 +259,12 @@ public function getInput(&$input, &$ids) { } /** - * @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 @@ public function getIDs(&$ids, &$input) { // 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 b2dcc108fccb..7e34d17283db 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -191,6 +191,7 @@ public function validatePaymentInstrument($values, &$errors) { * * @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 c9b715d7cc07..538b01ccd072 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -370,6 +370,7 @@ public static function buildPermissionedClause(&$whereClauses, $component = NULL * 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 99c38a741182..49d3fc5989d6 100644 --- a/CRM/Mailing/BAO/MailingJob.php +++ b/CRM/Mailing/BAO/MailingJob.php @@ -55,9 +55,12 @@ public function __construct() { } /** + * 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 @@ static public function create($params) { } /** - * 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 ed1cbc7ad5d6..4d6e874b5251 100644 --- a/CRM/Mailing/Event/BAO/Reply.php +++ b/CRM/Mailing/Event/BAO/Reply.php @@ -62,7 +62,6 @@ public function __construct() { */ 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 @@ private static function autoRespond(&$mailing, $queue_id, $replyto) { ); // 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 07c127e46445..28a6c62d30e5 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 9c77c3335e5d..e178e417cc2f 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$ - * */ /**