From 2da40d216d22a8f768c53921644d040667a1713e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 19 Jan 2015 19:15:33 -0800 Subject: [PATCH] INFRA-132 - Squiz.Scope.MethodScope.Missing --- CRM/Activity/Import/Parser.php | 2 +- CRM/Activity/Selector/Search.php | 2 +- CRM/Admin/Page/Persistent.php | 2 +- CRM/Contact/BAO/Group.php | 4 ++-- .../Search/Custom/ContributionAggregate.php | 2 +- .../Form/Search/Custom/TagContributions.php | 2 +- CRM/Contribute/Form/Contribution/Confirm.php | 2 +- CRM/Core/BAO/CustomField.php | 8 ++++---- CRM/Core/BAO/Setting.php | 18 +++++++++--------- CRM/Core/BAO/Tag.php | 2 +- CRM/Core/Form.php | 10 +++++----- CRM/Core/OptionGroup.php | 8 ++++---- CRM/Custom/Form/CustomData.php | 2 +- CRM/Event/BAO/Participant.php | 8 ++++---- CRM/Event/Selector/Search.php | 2 +- CRM/Mailing/BAO/Query.php | 2 +- CRM/Mailing/Selector/Search.php | 2 +- CRM/Price/Page/Option.php | 2 +- CRM/SMS/Provider.php | 2 +- CRM/Utils/Hook/DrupalBase.php | 2 +- .../CRM/Core/BAO/ActionScheduleTest.php | 2 +- .../WebTest/Event/MultiprofileEventTest.php | 2 +- tests/phpunit/api/v3/ContributionTest.php | 4 ++-- 23 files changed, 46 insertions(+), 46 deletions(-) diff --git a/CRM/Activity/Import/Parser.php b/CRM/Activity/Import/Parser.php index 1ee8ad5230..fa89d48ba4 100644 --- a/CRM/Activity/Import/Parser.php +++ b/CRM/Activity/Import/Parser.php @@ -73,7 +73,7 @@ abstract class CRM_Activity_Import_Parser extends CRM_Import_Parser { * @return mixed * @throws Exception */ - function run( + public function run( $fileName, $seperator = ',', &$mapper, diff --git a/CRM/Activity/Selector/Search.php b/CRM/Activity/Selector/Search.php index 4810718dbb..296c51f37e 100644 --- a/CRM/Activity/Selector/Search.php +++ b/CRM/Activity/Selector/Search.php @@ -153,7 +153,7 @@ class CRM_Activity_Selector_Search extends CRM_Core_Selector_Base implements CRM * * @return \CRM_Activity_Selector_Search */ - function __construct( + public function __construct( &$queryParams, $action = CRM_Core_Action::NONE, $activityClause = NULL, diff --git a/CRM/Admin/Page/Persistent.php b/CRM/Admin/Page/Persistent.php index c9081233c3..7df058b9de 100644 --- a/CRM/Admin/Page/Persistent.php +++ b/CRM/Admin/Page/Persistent.php @@ -52,7 +52,7 @@ class CRM_Admin_Page_Persistent extends CRM_Core_Page { * @return array * (reference) of action links */ - function &stringActionLinks() { + public function &stringActionLinks() { // check if variable _actionsLinks is populated if (!isset(self::$_stringActionLinks)) { diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index a62c2bd822..25549003ff 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -238,7 +238,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { * @todo other BAO functions that use returnProperties (e.g. Query Objects) receive the array flipped & filled with 1s and * add in essential fields (e.g. id). This should follow a regular pattern like the others */ - static function getGroups( + public static function getGroups( $params = NULL, $returnProperties = NULL, $sort = NULL, @@ -994,7 +994,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { * * @return array */ - static function getGroupsHierarchy( + public static function getGroupsHierarchy( $groupIDs, $parents = NULL, $spacer = '', diff --git a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php index 8a9545ca7e..3eb41d1179 100644 --- a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php +++ b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php @@ -115,7 +115,7 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate implements CRM_Contac * * @return string */ - function all( + public function all( $offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE ) { diff --git a/CRM/Contact/Form/Search/Custom/TagContributions.php b/CRM/Contact/Form/Search/Custom/TagContributions.php index f0347c084f..d580312bdf 100644 --- a/CRM/Contact/Form/Search/Custom/TagContributions.php +++ b/CRM/Contact/Form/Search/Custom/TagContributions.php @@ -93,7 +93,7 @@ class CRM_Contact_Form_Search_Custom_TagContributions implements CRM_Contact_For /** * Construct the search query */ - function all( + public function all( $offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $onlyIDs = FALSE ) { diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 62334a8103..78711ba826 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -1229,7 +1229,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr * @throws Exception * @return CRM_Contribute_DAO_Contribution */ - static function processContribution( + public static function processContribution( &$form, $params, $result, diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 2f94a658fd..2f5806ca5b 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1153,7 +1153,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { * * @return array|mixed|null|string */ - static function getDisplayValueCommon( + public static function getDisplayValueCommon( $value, &$option, $html_type, @@ -1366,7 +1366,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { * just format the given value * */ - static function setProfileDefaults( + public static function setProfileDefaults( $customFieldId, $elementName, &$defaults, @@ -1580,7 +1580,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { * @return array * formatted custom field array */ - static function formatCustomField( + public static function formatCustomField( $customFieldId, &$customFormatted, $value, $customFieldExtend, $customValueId = NULL, $entityId = NULL, @@ -2238,7 +2238,7 @@ ORDER BY html_type"; * * @return array */ - static function postProcess( + public static function postProcess( &$params, &$customFields, $entityID, diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index 46678a4ffb..250e1e1aaf 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -82,7 +82,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * @return boolean * true if item is already in cache */ - static function inCache( + public static function inCache( $group, $name, $componentID = NULL, @@ -133,7 +133,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * * @return string */ - static function setCache( + public static function setCache( $values, $group, $componentID = NULL, @@ -163,7 +163,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * * @return CRM_Core_DAO_Domain|CRM_Core_DAO_Setting */ - static function dao( + public static function dao( $group, $name = NULL, $componentID = NULL, @@ -219,7 +219,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * @return mixed * The data if present in the setting table, else null */ - static function getItem( + public static function getItem( $group, $name = NULL, $componentID = NULL, @@ -346,7 +346,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * * @return void */ - static function setItem( + public static function setItem( $value, $group, $name, @@ -380,7 +380,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * @param int $createdID * @param int $domainID */ - static function _setItem( + public static function _setItem( $metadata, $value, $group, @@ -646,7 +646,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * - description * - help_text */ - static function getSettingSpecification( + public static function getSettingSpecification( $componentID = NULL, $filters = array(), $domainID = NULL, @@ -832,7 +832,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * * @return array */ - static function valueOptions( + public static function valueOptions( $group, $name, $system = TRUE, @@ -891,7 +891,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * @param int $userID * @param string $keyField */ - static function setValueOption( + public static function setValueOption( $group, $name, $value, diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index 296aad1e35..68f3b316f2 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -197,7 +197,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { * * @return array */ - static function getTags( + public static function getTags( $usedFor = 'civicrm_contact', &$tags = array(), $parentId = NULL, diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 09f6c9299d..9aee8a8933 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -167,7 +167,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * * @return \CRM_Core_Form */ - function __construct( + public function __construct( $state = NULL, $action = CRM_Core_Action::NONE, $method = 'post', @@ -267,7 +267,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * * @return HTML_QuickForm_Element could be an error object */ - function &add( + public function &add( $type, $name, $label = '', $attributes = '', $required = FALSE, $extra = NULL ) { @@ -918,7 +918,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * @param string $separator * @param bool $flipValues */ - function addCheckBox( + public function addCheckBox( $id, $title, $values, $other = NULL, $attributes = NULL, $required = NULL, $javascriptMethod = NULL, @@ -1387,7 +1387,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * Add a currency and money element to the form */ - function addMoney( + public function addMoney( $name, $label, $required = FALSE, @@ -1410,7 +1410,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * Add currency element to the form */ - function addCurrency( + public function addCurrency( $name = 'currency', $label = NULL, $required = TRUE, diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php index 46d6ce541f..b43c2fe6a2 100644 --- a/CRM/Core/OptionGroup.php +++ b/CRM/Core/OptionGroup.php @@ -54,7 +54,7 @@ class CRM_Core_OptionGroup { * * @return array */ - static function &valuesCommon( + public static function &valuesCommon( $dao, $flip = FALSE, $grouping = FALSE, $localize = FALSE, $valueColumnName = 'label' ) { @@ -115,7 +115,7 @@ class CRM_Core_OptionGroup { * the values as specified by the above params * @void */ - static function &values( + public static function &values( $name, $flip = FALSE, $grouping = FALSE, $localize = FALSE, $condition = NULL, $labelColumnName = 'label', $onlyActive = TRUE, $fresh = FALSE, $keyColumnName = 'value' @@ -374,7 +374,7 @@ WHERE v.option_group_id = g.id * * @return null */ - static function getValue( + public static function getValue( $groupName, $label, $labelField = 'label', @@ -594,7 +594,7 @@ SELECT v.label * * @return array */ - static function getRowValues( + public static function getRowValues( $groupName, $fieldValue, $field = 'name', $fieldType = 'String', $active = TRUE ) { diff --git a/CRM/Custom/Form/CustomData.php b/CRM/Custom/Form/CustomData.php index 844229ac8b..da4e9661fc 100644 --- a/CRM/Custom/Form/CustomData.php +++ b/CRM/Custom/Form/CustomData.php @@ -49,7 +49,7 @@ class CRM_Custom_Form_CustomData { * * @return void */ - static function preProcess( + public static function preProcess( &$form, $subName = NULL, $subType = NULL, $groupCount = NULL, $type = NULL, $entityID = NULL, $onlySubType = NULL ) { diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 6a7097e4ed..c4464a21bf 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -352,7 +352,7 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant { * @return bool|int|null|string * 1. false => If event having some empty spaces. */ - static function eventFull( + public static function eventFull( $eventId, $returnEmptySeats = FALSE, $includeWaitingList = TRUE, @@ -496,7 +496,7 @@ SELECT event.event_full_text, * @return array * an array of each option id and total count */ - static function priceSetOptionsCount( + public static function priceSetOptionsCount( $eventId, $skipParticipantIds = array(), $considerCounted = TRUE, @@ -1225,7 +1225,7 @@ UPDATE civicrm_participant * * @return array */ - static function transitionParticipants( + public static function transitionParticipants( $participantIds, $toStatusId, $fromStatusId = NULL, $returnResult = FALSE, $skipCascadeRule = FALSE ) { @@ -1461,7 +1461,7 @@ UPDATE civicrm_participant * * @return bool */ - static function sendTransitionParticipantMail( + public static function sendTransitionParticipantMail( $participantId, $participantValues, $eventDetails, diff --git a/CRM/Event/Selector/Search.php b/CRM/Event/Selector/Search.php index 60552f1958..a983983642 100644 --- a/CRM/Event/Selector/Search.php +++ b/CRM/Event/Selector/Search.php @@ -157,7 +157,7 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co * * @return \CRM_Event_Selector_Search */ - function __construct( + public function __construct( &$queryParams, $action = CRM_Core_Action::NONE, $eventClause = NULL, diff --git a/CRM/Mailing/BAO/Query.php b/CRM/Mailing/BAO/Query.php index 0bb8498e2d..174a829ae6 100644 --- a/CRM/Mailing/BAO/Query.php +++ b/CRM/Mailing/BAO/Query.php @@ -197,7 +197,7 @@ class CRM_Mailing_BAO_Query { * * @return array|null */ - static function defaultReturnProperties( + public static function defaultReturnProperties( $mode, $includeCustomFields = TRUE ) { diff --git a/CRM/Mailing/Selector/Search.php b/CRM/Mailing/Selector/Search.php index 13d152ece0..f50f13c1ca 100644 --- a/CRM/Mailing/Selector/Search.php +++ b/CRM/Mailing/Selector/Search.php @@ -147,7 +147,7 @@ class CRM_Mailing_Selector_Search extends CRM_Core_Selector_Base implements CRM_ * * @return \CRM_Mailing_Selector_Search */ - function __construct( + public function __construct( &$queryParams, $action = CRM_Core_Action::NONE, $mailingClause = NULL, diff --git a/CRM/Price/Page/Option.php b/CRM/Price/Page/Option.php index 5a7ac0cdf0..ba38011383 100644 --- a/CRM/Price/Page/Option.php +++ b/CRM/Price/Page/Option.php @@ -81,7 +81,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { * @return array * array of action links that we need to display for the browse screen */ - function &actionLinks() { + public function &actionLinks() { if (!isset(self::$_actionLinks)) { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( diff --git a/CRM/SMS/Provider.php b/CRM/SMS/Provider.php index 34e41db57c..f374f904be 100644 --- a/CRM/SMS/Provider.php +++ b/CRM/SMS/Provider.php @@ -89,7 +89,7 @@ abstract class CRM_SMS_Provider { /** * Send an SMS Message via the API Server */ - abstract function send($recipients, $header, $message, $dncID = NULL); + abstract public function send($recipients, $header, $message, $dncID = NULL); /** * Return message text. Child class could override this function to have better control over the message being sent. diff --git a/CRM/Utils/Hook/DrupalBase.php b/CRM/Utils/Hook/DrupalBase.php index 21dca9dee6..02ef926108 100644 --- a/CRM/Utils/Hook/DrupalBase.php +++ b/CRM/Utils/Hook/DrupalBase.php @@ -75,7 +75,7 @@ class CRM_Utils_Hook_DrupalBase extends CRM_Utils_Hook { * * @return array|bool */ - function invoke( + public function invoke( $numParams, &$arg1, &$arg2, &$arg3, &$arg4, &$arg5, &$arg6, $fnSuffix) { diff --git a/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php b/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php index bcf4a5db81..1439e6f196 100644 --- a/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php +++ b/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php @@ -945,7 +945,7 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase { * * @return array|NULL|object */ - function createTestObject($daoName, $params = array(), $numObjects = 1, $createOnly = FALSE) { + public function createTestObject($daoName, $params = array(), $numObjects = 1, $createOnly = FALSE) { $objects = CRM_Core_DAO::createTestObject($daoName, $params, $numObjects, $createOnly); if (is_array($objects)) { $this->registerTestObjects($objects); diff --git a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php index c4563b09d7..191747681b 100644 --- a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php +++ b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php @@ -642,7 +642,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { * @param $email1 * @param $email2 */ - function _testEventRegistration( + public function _testEventRegistration( $eventPageId, $customId, $firstName, $lastName, $participantfname, $participantlname, $email1, $email2 ) { diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index b926430dde..b6dafb75b0 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -1620,7 +1620,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { * * @return null|string */ - function _getFinancialTrxnAmount($contId) { + public function _getFinancialTrxnAmount($contId) { $query = "SELECT SUM( ft.total_amount ) AS total FROM civicrm_financial_trxn AS ft @@ -1637,7 +1637,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { * * @return null|string */ - function _getFinancialItemAmount($contId) { + public function _getFinancialItemAmount($contId) { $lineItem = key(CRM_Price_BAO_LineItem::getLineItems($contId, 'contribution')); $query = "SELECT SUM(amount) -- 2.25.1