Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nfc] Comment fixes, remove one unused var, declare visibility #9717

Merged
merged 3 commits into from
Jan 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CRM/ACL/Form/EntityRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CRM/Campaign/BAO/Survey.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions CRM/Contact/BAO/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
7 changes: 5 additions & 2 deletions CRM/Contact/Import/ImportJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/DAO/permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
19 changes: 11 additions & 8 deletions CRM/Core/Payment/AuthorizeNetIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CRM/Core/Payment/PayPalImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions CRM/Financial/BAO/FinancialType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
11 changes: 8 additions & 3 deletions CRM/Mailing/BAO/MailingJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions CRM/Mailing/Event/BAO/Reply.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 1 addition & 6 deletions CRM/UF/Form/AdvanceSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions CRM/UF/Page/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
* $Id$
*
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function links() {
*
* @return array
*/
static function &fields() {
public static function &fields() {
if (!(self::$_fields)) {
self::$_fields = array(
'id' => array(
Expand Down
2 changes: 1 addition & 1 deletion CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function links() {
*
* @return array
*/
static function &fields() {
public static function &fields() {
if (!(self::$_fields)) {
self::$_fields = array(
'id' => array(
Expand Down
2 changes: 1 addition & 1 deletion CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function links() {
*
* @return array
*/
static function &fields() {
public static function &fields() {
if (!(self::$_fields)) {
self::$_fields = array(
'id' => array(
Expand Down
2 changes: 1 addition & 1 deletion CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function links() {
*
* @return array
*/
static function &fields() {
public static function &fields() {
if (!(self::$_fields)) {
self::$_fields = array(
'id' => array(
Expand Down
2 changes: 1 addition & 1 deletion CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function links() {
*
* @return array
*/
static function &fields() {
pubic static function &fields() {
if (!(self::$_fields)) {
self::$_fields = array(
'id' => array(
Expand Down