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