Commit 681aa547 authored by totten's avatar totten

Style - Remove @access

1. These annotations are useful in PHP4-style code.
2. These annotations are useless in PHP5-style code. Either they're redundant with the code, or they contradict the code.
3. In cases where there are contradictions, I don't think there's anyway for us to generally resolve the contradiction except to say, "The code is right."
4. As a developer reading .php files, I look at the code and *never* look at @access.
parent 4e385d6c
......@@ -54,7 +54,6 @@ class CRM_ACL_API {
*
* @return boolean true if yes, else false
* @static
* @access public
*/
public static function check($str, $contactID = NULL) {
if ($contactID == NULL) {
......@@ -82,7 +81,6 @@ class CRM_ACL_API {
* this means it is handled by generating query
*
* @return string the group where clause for this user
* @access public
*/
public static function whereClause($type,
&$tables,
......@@ -145,7 +143,6 @@ class CRM_ACL_API {
* @param null $includedGroups
*
* @return array the ids of the groups for which the user has permissions
* @access public
*/
public static function group(
$type,
......@@ -180,7 +177,6 @@ class CRM_ACL_API {
* @param bool $flush
*
* @return array the ids of the groups for which the user has permissions
* @access public
*/
public static function groupPermission(
$type,
......
......@@ -100,7 +100,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @param boolean $acl_role - For grant operations, this flag determines if we're granting a single acl (false) or an entire group.
*
* @return string - The WHERE clause, or 0 on failure
* @access public
* @static
*/
public static function permissionClause(&$tables, $operation,
......@@ -333,7 +332,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
*
* @return string|null - WHERE-style clause to filter results,
* or null if $table or $id is null
* @access public
* @static
*/
public static function getClause($table, $id, &$tables) {
......@@ -363,7 +361,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @param bool $hideEmpty only return elements that have a value set.
*
* @return array - Assoc. array of the ACL rule's properties
* @access public
*/
public function toArray($format = '%s', $hideEmpty = false) {
$result = array();
......@@ -390,7 +387,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @param boolean $aclRoles - Should we include ACL Roles
*
* @return array - Array of assoc. arrays of ACL rules
* @access public
* @static
*/
public static function &getACLs($contact_id = NULL, $group_id = NULL, $aclRoles = FALSE) {
......@@ -455,7 +451,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @param int $group_id - ID of a group to search for
*
* @return array - Array of assoc. arrays of ACL rules
* @access public
* @static
*/
public static function &getACLRoles($contact_id = NULL, $group_id = NULL) {
......@@ -520,7 +515,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @param boolean $aclRoles - Include ACL Roles?
*
* @return array - Assoc array of ACL rules
* @access public
* @static
*/
public static function &getGroupACLs($contact_id, $aclRoles = FALSE) {
......@@ -565,7 +559,6 @@ SELECT $acl.*
* @param int $contact_id - ID of a contact to search for
*
* @return array - Array of assoc. arrays of ACL rules
* @access public
* @static
*/
public static function &getGroupACLRoles($contact_id) {
......@@ -638,7 +631,6 @@ SELECT $acl.*
* @param int $contact_id - The contact ID
*
* @return array - Assoc array of ACL rules
* @access public
* @static
*/
public static function &getAllByContact($contact_id) {
......@@ -967,7 +959,6 @@ ORDER BY a.object_id
*
* @param int $aclId ID of the ACL record to be deleted.
*
* @access public
* @static
*/
public static function del($aclId) {
......
......@@ -90,7 +90,6 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
*
* @param int $entityRoleId ID of the EntityRole record to be deleted.
*
* @access public
* @static
*/
public static function del($entityRoleId) {
......
......@@ -45,7 +45,6 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
/**
* Set default values for the form.
*
* @access public
*
* @return void
*/
......@@ -116,7 +115,6 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
* Build the form object
*
* @return void
* @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
......@@ -270,7 +268,6 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
/**
* Process the form submission
*
* @access public
*
* @return void
*/
......
......@@ -45,7 +45,6 @@ class CRM_ACL_Form_ACLBasic extends CRM_Admin_Form {
/**
* Set default values for the form.
*
* @access public
*
* @return void
*/
......@@ -78,7 +77,6 @@ SELECT object_table
* Build the form object
*
* @return void
* @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
......@@ -127,7 +125,6 @@ SELECT object_table
/**
* Process the form submission
*
* @access public
*
* @return void
*/
......
......@@ -46,7 +46,6 @@ class CRM_ACL_Form_EntityRole extends CRM_Admin_Form {
* Build the form object
*
* @return void
* @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
......@@ -74,7 +73,6 @@ class CRM_ACL_Form_EntityRole extends CRM_Admin_Form {
/**
* Process the form submission
*
* @access public
*
* @return void
*/
......
......@@ -42,7 +42,6 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
/**
* Build the form object
*
* @access public
* @return void
*/
public function buildQuickForm( ) {
......@@ -101,7 +100,6 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
/**
* Process the form submission
*
* @access public
* @return void
*/
public function postProcess() {
......@@ -172,7 +170,6 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
* This function should be shared from a similar one in
* distmaker/utils/joomlaxml.php
*
* @access public
* @return array civicrm permissions
*/
public static function getPermissionArray(){
......
......@@ -104,7 +104,6 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
public function run() {
......@@ -154,7 +153,6 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
* Browse all acls
*
* @return void
* @access public
* @static
*/
public function browse() {
......
......@@ -92,7 +92,6 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
public function run() {
......@@ -130,7 +129,6 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
* Browse all acls
*
* @return void
* @access public
* @static
*/
public function browse() {
......
......@@ -104,7 +104,6 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
public function run() {
......@@ -151,7 +150,6 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
* Browse all acls
*
* @return void
* @access public
* @static
*/
public function browse() {
......
......@@ -61,7 +61,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
* @access public
*/
public static function dataExists(&$params) {
if (!empty($params['source_contact_id']) || !empty($params['id'])) {
......@@ -77,7 +76,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Activity_DAO_Activity object
* @access public
*/
public static function retrieve(&$params, &$defaults) {
$activity = new CRM_Activity_DAO_Activity();
......@@ -146,7 +144,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* @param bool $moveToTrash
*
* @return void
* @access public
*/
public static function deleteActivity(&$params, $moveToTrash = FALSE) {
// CRM-9137
......@@ -253,7 +250,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* @param int $recordTypeID
*
* @return null
* @access public
*/
public static function deleteActivityContact($activityId, $recordTypeID = NULL) {
$activityContact = new CRM_Activity_BAO_ActivityContact();
......@@ -270,7 +266,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* @param array $params associated array of the submitted values
*
* @throws CRM_Core_Exception
* @access public
*
* @return $this|null|object
*/
......@@ -658,7 +653,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
*
* @return array (reference) $values the relevant data object values of open activities
*
* @access public
* @static
*/
public static function &getActivities($input) {
......@@ -947,7 +941,6 @@ ORDER BY fixed_sort_order
*
* @return int count of activities
*
* @access public
* @static
*/
public static function &getActivitiesCount($input) {
......@@ -984,7 +977,6 @@ LEFT JOIN civicrm_case_activity ON ( civicrm_case_activity.activity_id = tbl.a
*
* @return int count of activities
*
* @access public
* @static
*/
public static function getActivitySQLClause($input) {
......@@ -1168,7 +1160,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @param string $additionalDetails the additional information of CC and BCC appended to the activity Details
*
* @return array ( sent, activityId) if any email is sent and activityId
* @access public
* @static
*/
static function sendEmail(
......@@ -1494,7 +1485,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @param int $userID
*
* @return mixed true on success or PEAR_Error object
* @access public
* @static
*/
static function sendSMSMessage($toID,
......@@ -1572,7 +1562,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @param null $bcc
*
* @return boolean true if successfull else false.
* @access public
* @static
*/
static function sendMessage($from,
......@@ -1644,7 +1633,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @param bool $status
*
* @return array array of importable Fields
* @access public
* @static
*/
public static function &importableFields($status = FALSE) {
......@@ -1698,7 +1686,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @param int $contactId Id of the contact whose activities need to find
*
* @return array array of activity fields
* @access public
*/
public static function getContactActivity($contactId) {
$activities = array();
......@@ -1774,7 +1761,6 @@ WHERE activity.id IN ($activityIds)";
*
* @return bool
* @static
* @access public
*/
static function addActivity(&$activity,
$activityType = 'Membership Signup',
......@@ -1889,7 +1875,6 @@ SELECT display_name
* @param int $activityId current activity id
*
* @return int $parentId Id of parent activity otherwise false.
* @access public
*/
public static function getParentActivity($activityId) {
static $parentActivities = array();
......@@ -1916,7 +1901,6 @@ SELECT display_name
* @param $activityID current activity id
*
* @return int $params count of prior activities otherwise false.
* @access public
*/
public static function getPriorCount($activityID) {
static $priorCounts = array();
......@@ -1954,7 +1938,6 @@ AND id < {$activityID}
* @param bool $onlyPriorRevisions
*
* @return array $result prior activities info.
* @access public
*/
public static function getPriorAcitivities($activityID, $onlyPriorRevisions = FALSE) {
static $priorActivities = array();
......@@ -2003,7 +1986,6 @@ AND cl.modified_id = c.id
* @param int $activityID prior activity id
*
* @return int current activity id.
* @access public
*/
public static function getLatestActivityId($activityID) {
static $latestActivityIds = array();
......@@ -2037,7 +2019,6 @@ AND cl.modified_id = c.id
*
* @return $this|null|object
*
* @access public
*/
public static function createFollowupActivity($activityId, $params) {
if (!$activityId) {
......@@ -2109,7 +2090,6 @@ AND cl.modified_id = c.id
* @param array $params associated array
*
* @return void
* @access public
*
*/
public static function restoreActivity(&$params) {
......@@ -2128,7 +2108,6 @@ AND cl.modified_id = c.id
* @param string $name if it is called by case $name = Case else $name = Activity
*
* @return array array of exportable Fields
* @access public
* @static
*/
public static function &exportableFields($name = 'Activity') {
......@@ -2183,7 +2162,6 @@ AND cl.modified_id = c.id
* Get the allowed profile fields for Activities
*
* @return array array of activity profile Fields
* @access public
*/
public static function getProfileFields() {
$exportableFields = self::exportableFields('Activity');
......@@ -2222,7 +2200,6 @@ AND cl.modified_id = c.id
* @param int $contactId contactId
*
* @return true/null
* @access public
*/
public static function cleanupActivity($contactId) {
$result = NULL;
......@@ -2270,7 +2247,6 @@ AND cl.modified_id = c.id
* @param int $action edit/view
*
* @return boolean $allow true/false
* @access public
*/
public static function checkPermission($activityId, $action) {
$allow = FALSE;
......@@ -2418,7 +2394,6 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n
* @param array $params associated array for params record id.
*
* @return array $contactActivities associated array of contact activities
* @access public
*/
public static function getContactActivitySelector(&$params) {
// format the params
......
......@@ -52,7 +52,6 @@ class CRM_Activity_BAO_ActivityAssignment extends CRM_Activity_DAO_ActivityConta
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object activity type of object that is added
* @access public
*/
public static function create(&$params) {
$assignment = new CRM_Activity_BAO_ActivityContact();
......@@ -72,7 +71,6 @@ class CRM_Activity_BAO_ActivityAssignment extends CRM_Activity_DAO_ActivityConta
*
* @return array
*
* @access public
*/
public static function retrieveAssigneeIdsByActivityId($activity_id) {
$assigneeArray = array();
......@@ -108,7 +106,6 @@ AND civicrm_contact.is_deleted = 0
*
* @return array
*
* @access public
*
*/
public static function getAssigneeNames($activityIDs, $isDisplayName = FALSE, $skipDetails = TRUE) {
......
......@@ -52,7 +52,6 @@ class CRM_Activity_BAO_ActivityContact extends CRM_Activity_DAO_ActivityContact
* @param array $params the values for this table: activity id, contact id, record type
*
* @return object activity_contact object
* @access public
*
*/
public static function create(&$params) {
......@@ -74,7 +73,6 @@ class CRM_Activity_BAO_ActivityContact extends CRM_Activity_DAO_ActivityContact
*
* @return array
*
* @access public
*/
public static function getNames($activityID, $recordTypeID, $alsoIDs = FALSE) {
$names = array();
......@@ -114,7 +112,6 @@ AND contact_a.is_deleted = 0
*
* @return mixed
*
* @access public
*/
public static function retrieveContactIdsByActivityId($activityID, $recordTypeID) {
$activityContact = array();
......@@ -155,7 +152,6 @@ AND civicrm_contact.is_deleted = 0
* array = if there are links defined for this table.
* empty array - if there is a links.ini file, but no links on this table
* null - if no links.ini exists for this database (hence try auto_links).
* @access public
* @see DB_DataObject::getLinks(), DB_DataObject::getLink()
*/
/**
......
......@@ -52,7 +52,6 @@ class CRM_Activity_BAO_ActivityTarget extends CRM_Activity_DAO_ActivityContact {
* @param array $params
*
* @return object activity type of object that is added
* @access public
*/
public static function create(&$params) {
$target = new CRM_Activity_BAO_ActivityContact();
......@@ -71,7 +70,6 @@ class CRM_Activity_BAO_ActivityTarget extends CRM_Activity_DAO_ActivityContact {
*
* @return mixed
*
* @access public
*/
public static function retrieveTargetIdsByActivityId($activity_id) {
$targetArray = array();
......@@ -104,7 +102,6 @@ AND civicrm_contact.is_deleted = 0
*
* @return array
*
* @access public
*/
public static function getTargetNames($activityID) {
$targetNames = array();
......
......@@ -63,7 +63,6 @@ class CRM_Activity_BAO_ICalendar {
* @param array $contacts Array of contacts (attendees)
*
* @return string Array index of the added attachment in the $attachments array, or else null.
* @access public
*/
public function addAttachment( &$attachments, $contacts ) {
// Check preferences setting
......
......@@ -41,7 +41,6 @@ class CRM_Activity_BAO_Query {
* @param $query
*
* @return void
* @access public
*/
public static function select(&$query) {
if (!empty($query->_returnProperties['activity_id'])) {
......@@ -167,7 +166,6 @@ class CRM_Activity_BAO_Query {
* @param $query
*
* @return void
* @access public
*/
public static function where(&$query) {
$grouping = NULL;
......@@ -188,7 +186,6 @@ class CRM_Activity_BAO_Query {
* @param $values
* @param $query
* @return void
* @access public
*/
public static function whereClauseSingle(&$values, &$query) {
list($name, $op, $value, $grouping, $wildcard) = $values;
......@@ -455,7 +452,6 @@ class CRM_Activity_BAO_Query {
* Getter for the qill object
*
* @return string
* @access public
*/
public function qill() {
return (isset($this->_qill)) ? $this->_qill : "";
......@@ -464,7 +460,6 @@ class CRM_Activity_BAO_Query {
/**
* Add all the elements shared between case activity search and advanced search
*
* @access public
*
* @param CRM_Core_Form $form
* @return void
......
......@@ -210,7 +210,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
* Build the form object
*
* @return void
* @access public
*/
public function preProcess() {
$this->_cdType = CRM_Utils_Array::value('type', $_GET);
......@@ -510,7 +509,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
*
* @return void
*/
......@@ -821,7 +819,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
* @param $self
*
* @return true if no errors, else array of errors
* @access public
* @static
*/
public static function formRule($fields, $files, $self) {
......@@ -863,7 +860,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
/**
* Process the form submission
*
* @access public
*
* @param array $params
* @return array|null
......@@ -1002,7 +998,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
* @param array $params associated array of submitted values
*
* @return $this|null|object
* @access protected
*/
protected function processActivity(&$params) {
$activityAssigned = array();
......@@ -1141,7 +1136,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
/**
* Shorthand for getting id by display name (makes code more readable)
*
* @access protected
*/
protected function _getIdByDisplayName($displayName) {
return CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
......@@ -1154,7 +1148,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
/**
* Shorthand for getting display name by id (makes code more readable)
*
* @access protected
*/
protected function _getDisplayNameById($id) {
return CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
......
......@@ -43,7 +43,6 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
* Set variables up before form is built
*
* @return void
* @access public
*/
public function preProcess() {
//get the activity values
......@@ -116,7 +115,6 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
* Build the form object
*
* @return void
* @access public
*/
public function buildQuickForm() {