Commit 00be9182 authored by totten's avatar totten

phpcs - Fix error, "Visibility must be declared on method"

parent 7da04cde

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -56,7 +56,7 @@ class CRM_ACL_API {
* @static
* @access public
*/
static function check($str, $contactID = NULL) {
public static function check($str, $contactID = NULL) {
if ($contactID == NULL) {
$session = CRM_Core_Session::singleton();
$contactID = $session->get('userID');
......
......@@ -46,7 +46,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
/**
* @return array|null
*/
static function entityTable() {
public static function entityTable() {
if (!self::$_entityTable) {
self::$_entityTable = array(
'civicrm_contact' => ts('Contact'),
......@@ -59,7 +59,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
/**
* @return array|null
*/
static function objectTable() {
public static function objectTable() {
if (!self::$_objectTable) {
self::$_objectTable = array(
'civicrm_contact' => ts('Contact'),
......@@ -75,7 +75,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
/**
* @return array|null
*/
static function operation() {
public static function operation() {
if (!self::$_operation) {
self::$_operation = array(
'View' => ts('View'),
......@@ -365,7 +365,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @return array - Assoc. array of the ACL rule's properties
* @access public
*/
function toArray($format = '%s', $hideEmpty = false) {
public function toArray($format = '%s', $hideEmpty = false) {
$result = array();
if (!self::$_fieldKeys) {
......@@ -658,7 +658,7 @@ SELECT $acl.*
*
* @return CRM_ACL_DAO_ACL
*/
static function create(&$params) {
public static function create(&$params) {
$dao = new CRM_ACL_DAO_ACL();
$dao->copyValues($params);
$dao->save();
......@@ -669,7 +669,7 @@ SELECT $acl.*
* @param array $params
* @param $defaults
*/
static function retrieve(&$params, &$defaults) {
public static function retrieve(&$params, &$defaults) {
CRM_Core_DAO::commonRetrieve('CRM_ACL_DAO_ACL', $params, $defaults);
}
......@@ -682,7 +682,7 @@ SELECT $acl.*
* @return Object DAO object on sucess, null otherwise
* @static
*/
static function setIsActive($id, $is_active) {
public static function setIsActive($id, $is_active) {
// note this also resets any ACL cache
CRM_Core_BAO_Cache::deleteGroup('contact fields');
......@@ -695,7 +695,7 @@ SELECT $acl.*
*
* @return bool
*/
static function check($str, $contactID) {
public static function check($str, $contactID) {
$acls = CRM_ACL_BAO_Cache::build($contactID);
......@@ -922,7 +922,7 @@ ORDER BY a.object_id
*
* @return bool
*/
static function matchType($type, $operation) {
public static function matchType($type, $operation) {
$typeCheck = FALSE;
switch ($operation) {
case 'All':
......@@ -970,7 +970,7 @@ ORDER BY a.object_id
* @access public
* @static
*/
static function del($aclId) {
public static function del($aclId) {
// delete all entries from the acl cache
CRM_ACL_BAO_Cache::resetCache();
......
......@@ -45,7 +45,7 @@ class CRM_ACL_BAO_Cache extends CRM_ACL_DAO_Cache {
*
* @return mixed
*/
static function &build($id) {
public static function &build($id) {
if (!self::$_cache) {
self::$_cache = array();
}
......@@ -71,7 +71,7 @@ class CRM_ACL_BAO_Cache extends CRM_ACL_DAO_Cache {
*
* @return array
*/
static function retrieve($id) {
public static function retrieve($id) {
$query = "
SELECT acl_id
FROM civicrm_acl_cache
......@@ -96,7 +96,7 @@ SELECT acl_id
* @param int $id
* @param array $cache
*/
static function store($id, &$cache) {
public static function store($id, &$cache) {
foreach ($cache as $aclID => $data) {
$dao = new CRM_ACL_DAO_Cache();
if ($id) {
......@@ -113,7 +113,7 @@ SELECT acl_id
/**
* @param int $id
*/
static function deleteEntry($id) {
public static function deleteEntry($id) {
if (self::$_cache &&
array_key_exists($id, self::$_cache)
) {
......@@ -131,7 +131,7 @@ WHERE contact_id = %1
/**
* @param int $id
*/
static function updateEntry($id) {
public static function updateEntry($id) {
// rebuilds civicrm_acl_cache
self::deleteEntry($id);
self::build($id);
......@@ -141,7 +141,7 @@ WHERE contact_id = %1
}
// deletes all the cache entries
static function resetCache() {
public static function resetCache() {
// reset any static caching
self::$_cache = NULL;
......
......@@ -42,7 +42,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
/**
* @return array|null
*/
static function entityTable() {
public static function entityTable() {
if (!self::$_entityTable) {
self::$_entityTable = array(
'civicrm_contact' => ts('Contact'),
......@@ -57,7 +57,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
*
* @return CRM_ACL_DAO_EntityRole
*/
static function create(&$params) {
public static function create(&$params) {
$dao = new CRM_ACL_DAO_EntityRole();
$dao->copyValues($params);
$dao->save();
......@@ -68,7 +68,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
* @param array $params
* @param $defaults
*/
static function retrieve(&$params, &$defaults) {
public static function retrieve(&$params, &$defaults) {
CRM_Core_DAO::commonRetrieve('CRM_ACL_DAO_EntityRole', $params, $defaults);
}
......@@ -81,7 +81,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
* @return Object DAO object on sucess, null otherwise
* @static
*/
static function setIsActive($id, $is_active) {
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_ACL_DAO_EntityRole', $id, 'is_active', $is_active);
}
......@@ -93,7 +93,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
* @access public
* @static
*/
static function del($entityRoleId) {
public static function del($entityRoleId) {
$entityDAO = new CRM_ACL_DAO_EntityRole();
$entityDAO->id = $entityRoleId;
$entityDAO->find(TRUE);
......
......@@ -49,7 +49,7 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
*
* @return void
*/
function setDefaultValues() {
public function setDefaultValues() {
$defaults = parent::setDefaultValues();
if ($this->_action & CRM_Core_Action::ADD) {
......@@ -199,7 +199,7 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
*
* @return bool
*/
static function formRule($params) {
public static function formRule($params) {
$showHide = new CRM_Core_ShowHideBlocks();
// Make sure role is not -1
......
......@@ -49,7 +49,7 @@ class CRM_ACL_Form_ACLBasic extends CRM_Admin_Form {
*
* @return void
*/
function setDefaultValues() {
public function setDefaultValues() {
$defaults = array();
if ($this->_id ||
......@@ -115,7 +115,7 @@ SELECT object_table
*
* @return array|bool
*/
static function formRule($params) {
public static function formRule($params) {
if ($params['entity_id'] == -1) {
$errors = array('entity_id' => ts('Role is a required field'));
return $errors;
......
......@@ -45,7 +45,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
* @access public
* @return void
*/
function buildQuickForm( ) {
public function buildQuickForm( ) {
CRM_Utils_System::setTitle( 'Wordpress Access Control' );
......@@ -175,7 +175,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
* @access public
* @return array civicrm permissions
*/
static function getPermissionArray(){
public static function getPermissionArray(){
global $civicrm_root;
$permissions = CRM_Core_Permission::basicPermissions();
......
......@@ -57,7 +57,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
*
* @return string Classname of BAO.
*/
function getBAOName() {
public function getBAOName() {
return 'CRM_ACL_BAO_ACL';
}
......@@ -66,7 +66,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
*
* @return array (reference) of action links
*/
function &links() {
public function &links() {
if (!(self::$_links)) {
self::$_links = array(
CRM_Core_Action::UPDATE => array(
......@@ -107,7 +107,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
* @access public
*
*/
function run() {
public function run() {
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String',
// default to 'browse'
......@@ -157,7 +157,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
* @access public
* @static
*/
function browse() {
public function browse() {
// get all acl's sorted by weight
$acl = array();
$query = "
......@@ -255,7 +255,7 @@ ORDER BY entity_id
*
* @return string Classname of edit form.
*/
function editForm() {
public function editForm() {
return 'CRM_ACL_Form_ACL';
}
......@@ -264,7 +264,7 @@ ORDER BY entity_id
*
* @return string name of this page.
*/
function editName() {
public function editName() {
return 'ACL';
}
......@@ -275,7 +275,7 @@ ORDER BY entity_id
*
* @return string user context.
*/
function userContext($mode = NULL) {
public function userContext($mode = NULL) {
return 'civicrm/acl';
}
}
......
......@@ -55,7 +55,7 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
*
* @return string Classname of BAO.
*/
function getBAOName() {
public function getBAOName() {
return 'CRM_ACL_BAO_ACL';
}
......@@ -64,7 +64,7 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
*
* @return array (reference) of action links
*/
function &links() {
public function &links() {
if (!(self::$_links)) {
self::$_links = array(
CRM_Core_Action::UPDATE => array(
......@@ -95,7 +95,7 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
* @access public
*
*/
function run() {
public function run() {
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String',
// default to 'browse'
......@@ -133,7 +133,7 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
* @access public
* @static
*/
function browse() {
public function browse() {
// get all acl's sorted by weight
$acl = array();
......@@ -192,7 +192,7 @@ ORDER BY entity_id
*
* @return string Classname of edit form.
*/
function editForm() {
public function editForm() {
return 'CRM_ACL_Form_ACLBasic';
}
......@@ -201,7 +201,7 @@ ORDER BY entity_id
*
* @return string name of this page.
*/
function editName() {
public function editName() {
return 'Core ACLs';
}
......@@ -212,7 +212,7 @@ ORDER BY entity_id
*
* @return string user context.
*/
function userContext($mode = NULL) {
public function userContext($mode = NULL) {
return 'civicrm/acl/basic';
}
}
......
......@@ -57,7 +57,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
*
* @return string Classname of BAO.
*/
function getBAOName() {
public function getBAOName() {
return 'CRM_ACL_BAO_EntityRole';
}
......@@ -66,7 +66,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
*
* @return array (reference) of action links
*/
function &links() {
public function &links() {
if (!(self::$_links)) {
self::$_links = array(
CRM_Core_Action::UPDATE => array(
......@@ -107,7 +107,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
* @access public
*
*/
function run() {
public function run() {
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String',
// default to 'browse'
......@@ -154,7 +154,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
* @access public
* @static
*/
function browse() {
public function browse() {
// get all acl's sorted by weight
$entityRoles = array();
......@@ -199,7 +199,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
*
* @return string Classname of edit form.
*/
function editForm() {
public function editForm() {
return 'CRM_ACL_Form_EntityRole';
}
......@@ -208,7 +208,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
*
* @return string name of this page.
*/
function editName() {
public function editName() {
return 'ACL EntityRole';
}
......@@ -219,7 +219,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
*
* @return string user context.
*/
function userContext($mode = NULL) {
public function userContext($mode = NULL) {
return 'civicrm/acl/entityrole';
}
}
......
......@@ -661,7 +661,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* @access public
* @static
*/
static function &getActivities($input) {
public static function &getActivities($input) {
//step 1: Get the basic activity data
$bulkActivityTypeID = CRM_Core_OptionGroup::getValue(
'activity_type',
......@@ -909,7 +909,7 @@ ORDER BY fixed_sort_order
* @return array of component id and name.
* @static
**/
static function activityComponents() {
public static function activityComponents() {
$components = array();
$compInfo = CRM_Core_Component::getEnabledComponents();
foreach ($compInfo as $compObj) {
......@@ -950,7 +950,7 @@ ORDER BY fixed_sort_order
* @access public
* @static
*/
static function &getActivitiesCount($input) {
public static function &getActivitiesCount($input) {
$input['count'] = TRUE;
list($sqlClause, $params) = self::getActivitySQLClause($input);
......@@ -987,7 +987,7 @@ LEFT JOIN civicrm_case_activity ON ( civicrm_case_activity.activity_id = tbl.a
* @access public
* @static
*/
static function getActivitySQLClause($input) {
public static function getActivitySQLClause($input) {
$params = array();
$sourceWhere = $targetWhere = $assigneeWhere = $caseWhere = 1;
......@@ -1647,7 +1647,7 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @access public
* @static
*/
static function &importableFields($status = FALSE) {
public static function &importableFields($status = FALSE) {
if (!self::$_importableFields) {
if (!self::$_importableFields) {
self::$_importableFields = array();
......@@ -1700,7 +1700,7 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @return array array of activity fields
* @access public
*/
static function getContactActivity($contactId) {
public static function getContactActivity($contactId) {
$activities = array();
$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
$sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
......@@ -1891,7 +1891,7 @@ SELECT display_name
* @return int $parentId Id of parent activity otherwise false.
* @access public
*/
static function getParentActivity($activityId) {
public static function getParentActivity($activityId) {
static $parentActivities = array();
$activityId = CRM_Utils_Type::escape($activityId, 'Integer');
......@@ -1918,7 +1918,7 @@ SELECT display_name
* @return int $params count of prior activities otherwise false.
* @access public
*/
static function getPriorCount($activityID) {
public static function getPriorCount($activityID) {
static $priorCounts = array();
$activityID = CRM_Utils_Type::escape($activityID, 'Integer');
......@@ -1956,7 +1956,7 @@ AND id < {$activityID}
* @return array $result prior activities info.
* @access public
*/
static function getPriorAcitivities($activityID, $onlyPriorRevisions = FALSE) {
public static function getPriorAcitivities($activityID, $onlyPriorRevisions = FALSE) {
static $priorActivities = array();
$activityID = CRM_Utils_Type::escape($activityID, 'Integer');
......@@ -2005,7 +2005,7 @@ AND cl.modified_id = c.id
* @return int current activity id.
* @access public
*/
static function getLatestActivityId($activityID) {
public static function getLatestActivityId($activityID) {
static $latestActivityIds = array();
$activityID = CRM_Utils_Type::escape($activityID, 'Integer');
......@@ -2039,7 +2039,7 @@ AND cl.modified_id = c.id
*
* @access public
*/
static function createFollowupActivity($activityId, $params) {
public static function createFollowupActivity($activityId, $params) {
if (!$activityId) {
return;
}
......@@ -2079,7 +2079,7 @@ AND cl.modified_id = c.id
*
* @static
*/
static function getFileForActivityTypeId($activityTypeId, $crmDir = 'Activity') {
public static function getFileForActivityTypeId($activityTypeId, $crmDir = 'Activity') {
$activityTypes = CRM_Case_PseudoConstant::caseActivityType(FALSE, TRUE);
if ($activityTypes[$activityTypeId]['name']) {
......@@ -2131,7 +2131,7 @@ AND cl.modified_id = c.id
* @access public
* @static
*/
static function &exportableFields($name = 'Activity') {
public static function &exportableFields($name = 'Activity') {
if (!isset(self::$_exportableFields[$name])) {
self::$_exportableFields[$name] = array();
......@@ -2185,7 +2185,7 @@ AND cl.modified_id = c.id
* @return array array of activity profile Fields
* @access public
*/
static function getProfileFields() {
public static function getProfileFields() {
$exportableFields = self::exportableFields('Activity');
$skipFields = array(
'activity_id',
......@@ -2567,7 +2567,7 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n
*
* @param array $params
*/
static function copyExtendedActivityData($params) {
public static function copyExtendedActivityData($params) {
// attach custom data to the new activity
$customParams = $htmlType = array();
$customValues = CRM_Core_BAO_CustomValueTable::getEntityValues($params['activityID'], 'Activity');
......@@ -2641,7 +2641,7 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n
/**
* @param array $params
*/
function setApiFilter(&$params) {
public function setApiFilter(&$params) {
if (CRM_Utils_Array::value('target_contact_id', $params)) {
$this->selectAdd();
$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
......
......@@ -42,7 +42,7 @@ class CRM_Activity_BAO_ActivityAssignment extends CRM_Activity_DAO_ActivityConta
/**
* Class constructor
*/
function __construct() {
public function __construct() {
parent::__construct();
}
......@@ -74,7 +74,7 @@ class CRM_Activity_BAO_ActivityAssignment extends CRM_Activity_DAO_ActivityConta
*
* @access public
*/
static function retrieveAssigneeIdsByActivityId($activity_id) {
public static function retrieveAssigneeIdsByActivityId($activity_id) {
$assigneeArray = array();
if (!CRM_Utils_Rule::positiveInteger($activity_id)) {
return $assigneeArray;
......@@ -111,7 +111,7 @@ AND civicrm_contact.is_deleted = 0
* @access public
*
*/
static function getAssigneeNames($activityIDs, $isDisplayName = FALSE, $skipDetails = TRUE) {
public static function getAssigneeNames($activityIDs, $isDisplayName = FALSE, $skipDetails = TRUE) {
$assigneeNames = array();
if (empty($activityIDs)) {
return $assigneeNames;
......
......@@ -42,7 +42,7 @@ class CRM_Activity_BAO_ActivityContact extends CRM_Activity_DAO_ActivityContact
/**
* Class constructor
*/
function __construct() {
public function __construct() {
parent::__construct();
}
......@@ -76,7 +76,7 @@ class CRM_Activity_BAO_ActivityContact extends CRM_Activity_DAO_ActivityContact
*
* @access public
*/
static function getNames($activityID, $recordTypeID, $alsoIDs = FALSE) {
public static function getNames($activityID, $recordTypeID, $alsoIDs = FALSE) {
$names = array();
$ids = array();
......@@ -116,7 +116,7 @@ AND contact_a.is_deleted = 0
*
* @access public
*/