From 546b78fa6081abf7d1185636d38b278c11cc843a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 11 Jan 2015 22:38:03 -0500 Subject: [PATCH] INFRA-132 - Convert // comments to docblocks --- CRM/Contact/Form/Search/Custom/ActivitySearch.php | 7 +++++-- CRM/Contact/Form/Search/Custom/ContributionAggregate.php | 6 +++++- CRM/Contact/Form/Search/Custom/EmployerListing.php | 4 ++++ CRM/Contact/Form/Search/Custom/EventAggregate.php | 4 ++++ CRM/Contact/Form/Search/Custom/Group.php | 3 ++- CRM/Contact/Form/Search/Custom/TagContributions.php | 3 ++- CRM/Contact/Selector.php | 1 - CRM/Core/Config.php | 4 +++- CRM/Grant/Selector/Search.php | 2 +- CRM/Report/Form/Mailing/Summary.php | 4 +++- CRM/Utils/System.php | 4 +++- tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php | 4 +++- tests/phpunit/HelloTest.php | 4 +++- tests/phpunit/WebTest/Contact/AdvancedSearchTest.php | 8 ++++++-- tests/phpunit/WebTest/Contact/SearchTest.php | 4 +++- .../WebTest/Contribute/ContributionPageAddTest.php | 4 +++- tests/phpunit/WebTest/Event/AdditionalPaymentTest.php | 4 +++- .../WebTest/Event/MultipleEventRegistrationbyCartTest.php | 8 ++++++-- 18 files changed, 59 insertions(+), 19 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/ActivitySearch.php b/CRM/Contact/Form/Search/Custom/ActivitySearch.php index a11cfc0049..54ed4e595d 100644 --- a/CRM/Contact/Form/Search/Custom/ActivitySearch.php +++ b/CRM/Contact/Form/Search/Custom/ActivitySearch.php @@ -358,9 +358,12 @@ ORDER BY contact_a.sort_name'; return implode(' AND ', $clauses); } - /** + /* * Functions below generally don't need to be modified - * @return int + */ + + /** + * @inheritDoc */ public function count() { $sql = $this->all(); diff --git a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php index 7c8e246f16..244b4c6d8d 100644 --- a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php +++ b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php @@ -252,9 +252,13 @@ civicrm_contact AS contact_a return implode(' AND ', $clauses); } - /** + /* * Functions below generally don't need to be modified */ + + /** + * @inheritDoc + */ public function count() { $sql = $this->all(); diff --git a/CRM/Contact/Form/Search/Custom/EmployerListing.php b/CRM/Contact/Form/Search/Custom/EmployerListing.php index 88e51f7aab..e3545d2e4c 100644 --- a/CRM/Contact/Form/Search/Custom/EmployerListing.php +++ b/CRM/Contact/Form/Search/Custom/EmployerListing.php @@ -241,6 +241,10 @@ class CRM_Contact_Form_Search_Custom_EmployerListing implements CRM_Contact_Form /* * Functions below generally don't need to be modified */ + + /** + * @inheritDoc + */ public function count() { $sql = $this->all(); diff --git a/CRM/Contact/Form/Search/Custom/EventAggregate.php b/CRM/Contact/Form/Search/Custom/EventAggregate.php index 1c38c06f3d..1b6ee7ad28 100644 --- a/CRM/Contact/Form/Search/Custom/EventAggregate.php +++ b/CRM/Contact/Form/Search/Custom/EventAggregate.php @@ -303,6 +303,10 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea /* * Functions below generally don't need to be modified */ + + /** + * @inheritDoc + */ public function count() { $sql = $this->all(); diff --git a/CRM/Contact/Form/Search/Custom/Group.php b/CRM/Contact/Form/Search/Custom/Group.php index 4e55632257..e7dd79ec04 100644 --- a/CRM/Contact/Form/Search/Custom/Group.php +++ b/CRM/Contact/Form/Search/Custom/Group.php @@ -595,8 +595,9 @@ WHERE gcc.group_id = {$ssGroup->id} /* * Functions below generally don't need to be modified */ + /** - * @return mixed + * @inheritDoc */ public function count() { $sql = $this->all(); diff --git a/CRM/Contact/Form/Search/Custom/TagContributions.php b/CRM/Contact/Form/Search/Custom/TagContributions.php index e2172f16cf..a88ded69d8 100644 --- a/CRM/Contact/Form/Search/Custom/TagContributions.php +++ b/CRM/Contact/Form/Search/Custom/TagContributions.php @@ -209,8 +209,9 @@ WHERE $where /* * Functions below generally don't need to be modified */ + /** - * @return mixed + * @inheritDoc */ public function count() { $sql = $this->all(); diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index 1a739ebe3f..79136236e7 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -1120,7 +1120,6 @@ SELECT DISTINCT 'civicrm_contact', contact_a.id, contact_a.id, '$cacheKey', cont /** * Get colunmn headers for search selector * - * * @return array */ private static function &_getColumnHeaders() { diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 3060cc137e..c836083567 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -694,7 +694,9 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { CRM_Core_DAO::executeQuery($query); } - // This method should initialize auth sources + /** + * This method should initialize auth sources + */ public function initAuthSrc() { $session = CRM_Core_Session::singleton(); if ($session->get('userID') && !$session->get('authSrc')) { diff --git a/CRM/Grant/Selector/Search.php b/CRM/Grant/Selector/Search.php index 591b6625a0..2e62a1716c 100644 --- a/CRM/Grant/Selector/Search.php +++ b/CRM/Grant/Selector/Search.php @@ -181,7 +181,7 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co * - View * - Edit * - * @param null $key + * @param string|null $key * * @return array */ diff --git a/CRM/Report/Form/Mailing/Summary.php b/CRM/Report/Form/Mailing/Summary.php index 91246af8d8..fa81198290 100644 --- a/CRM/Report/Form/Mailing/Summary.php +++ b/CRM/Report/Form/Mailing/Summary.php @@ -277,7 +277,9 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { parent::preProcess(); } - // manipulate the select function to query count functions + /** + * manipulate the select function to query count functions + */ public function select() { $count_tables = array( diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index c252acecba..30d6c631b3 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -285,7 +285,9 @@ class CRM_Utils_System { return $config->userSystem->logout(); } - // this is a very drupal specific function for now + /** + * this is a very drupal specific function for now + */ public static function updateCategories() { $config = CRM_Core_Config::singleton(); if ($config->userSystem->is_drupal) { diff --git a/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php b/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php index abd5f28d6d..fcd44b520a 100644 --- a/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php +++ b/tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php @@ -166,7 +166,9 @@ class CRM_Event_BAO_AdditionalPaymentTest extends CiviUnitTestCase { return array($participant, $contribution); } - // CRM-13964 + /** + * CRM-13964 + */ public function testAddPartialPayment() { $feeAmt = 100; $amtPaid = 60; diff --git a/tests/phpunit/HelloTest.php b/tests/phpunit/HelloTest.php index 4f161d51b1..970722131e 100644 --- a/tests/phpunit/HelloTest.php +++ b/tests/phpunit/HelloTest.php @@ -70,7 +70,9 @@ class HelloTest extends PHPUnit_Framework_TestCase { unset($this->abc); } - // test the toString function + /** + * test the toString function + */ public function testHello() { $result = $this->abc; $expected = 'hello'; diff --git a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php index 4443d89b56..6dd8abadec 100644 --- a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php +++ b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php @@ -327,7 +327,9 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase { $this->click("xpath=//div[@id='activity']/table/tbody//tr/td[2]/label[text()='Activity Status']/../label[text()='Completed']"); } - // function to fill demographic search details + /** + * function to fill demographic search details + */ public function addDemographicSearchDetail() { // fill birth date range $this->select("birth_date_relative", "value=0"); @@ -367,7 +369,9 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase { $this->select("contribution_currency_type", "USD"); } - // function to fill participant search details + /** + * function to fill participant search details + */ public function addParticipantSearchDetail() { // fill event name $this->select2("event_id", "Fall Fundraiser Dinner"); diff --git a/tests/phpunit/WebTest/Contact/SearchTest.php b/tests/phpunit/WebTest/Contact/SearchTest.php index 7d62358848..083ad8bdb4 100644 --- a/tests/phpunit/WebTest/Contact/SearchTest.php +++ b/tests/phpunit/WebTest/Contact/SearchTest.php @@ -179,7 +179,9 @@ class WebTest_Contact_SearchTest extends CiviSeleniumTestCase { $self->assertTrue($self->isTextPresent("The tag '$tagName' has been saved.")); } - // CRM-6586 + /** + * CRM-6586 + */ public function testContactSearchExport() { $this->webtestLogin(); diff --git a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php index 09bd4a5879..362b31a3a4 100644 --- a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php +++ b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php @@ -85,7 +85,9 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { $this->isElementPresent("xpath=//div[@class='content other_amount-content']/input"); } - // CRM-12510 Test copy contribution page + /** + * CRM-12510 Test copy contribution page + */ public function testContributionPageCopy() { // open browser, login $this->webtestLogin(); diff --git a/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php b/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php index b67ae2370d..651be44951 100644 --- a/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php +++ b/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php @@ -34,7 +34,9 @@ class WebTest_Event_AdditionalPaymentTest extends CiviSeleniumTestCase { parent::setUp(); } - // CRM-13964 and CRM-13965 + /** + * CRM-13964 and CRM-13965 + */ public function testParticipantParitalPaymentInitiation() { // Log in using webtestLogin() method $this->webtestLogin(); diff --git a/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php b/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php index 6d2384e4a6..fe5c4c97d1 100755 --- a/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php +++ b/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php @@ -35,7 +35,9 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest parent::setUp(); } - // this functionality is broken hence skipping the test + /** + * this functionality is broken hence skipping the test + */ public function skiptestAuthenticatedMultipleEvent() { // Log in using webtestLogin() method @@ -128,7 +130,9 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest $this->_checkContributionsandEventRegistration($value[0], $value[1], $events); } - // this functionality is broken hence skipping the test + /** + * this functionality is broken hence skipping the test + */ public function skiptestAnonymousMultipleEvent() { // This is the path where our testing install resides. // The rest of URL is defined in CiviSeleniumTestCase base class, in -- 2.25.1