From d7c8cf03e9d5e1c1ac93f7e4c6001b01a4e0c78d Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 13 Jan 2015 14:30:42 +1300 Subject: [PATCH] add a few more arguments --- install/civicrm.php | 2 +- install/index.php | 2 ++ tools/CRM/Auction/Controller/Item.php | 3 +++ tools/bin/scripts/ajax.php | 2 ++ .../org.civicrm.angularex/angularex.civix.php | 13 ++++++++++++- .../extensions/org.civicrm.angularex/angularex.php | 4 ++++ .../CRM/Demoqueue/Page/DemoQueue.php | 7 +++++++ .../org.civicrm.demoqueue/demoqueue.civix.php | 1 + .../extensions/org.civicrm.demoqueue/demoqueue.php | 1 + .../org.civicrm.multisite/multisite.civix.php | 4 ++++ .../extensions/org.civicrm.multisite/multisite.php | 3 +++ .../GoogleCheckout.php | 4 ++++ .../GoogleIPN.php | 12 +++++++----- .../org.civicrm.search.activity/ActivitySearch.php | 6 ++++++ tools/scripts/solr/createSolrJSON.php | 7 +++++++ tools/scripts/solr/createSolrXML.php | 7 +++++++ tools/scripts/solr/createSyncJSON.php | 7 +++++++ tools/scripts/tpl-lint | 4 ++++ 18 files changed, 82 insertions(+), 7 deletions(-) diff --git a/install/civicrm.php b/install/civicrm.php index f50538b360..bc2186f4f3 100644 --- a/install/civicrm.php +++ b/install/civicrm.php @@ -30,7 +30,7 @@ * @package CRM * @copyright CiviCRM LLC (c) 2004-2014 * $Id$ - * + * @param $filesDirectory */ function civicrm_setup($filesDirectory) { global $crmPath, $sqlPath, $pkgPath, $tplPath; diff --git a/install/index.php b/install/index.php index 4784ae1fdd..5bec5dc5d7 100644 --- a/install/index.php +++ b/install/index.php @@ -283,6 +283,8 @@ class InstallRequirements { /** * Just check that the database configuration is okay + * @param $databaseConfig + * @param $dbName */ function checkdatabase($databaseConfig, $dbName) { if ($this->requireFunction('mysql_connect', diff --git a/tools/CRM/Auction/Controller/Item.php b/tools/CRM/Auction/Controller/Item.php index 17fe7323fc..5b74373f5a 100644 --- a/tools/CRM/Auction/Controller/Item.php +++ b/tools/CRM/Auction/Controller/Item.php @@ -51,6 +51,9 @@ class CRM_Auction_Controller_Item extends CRM_Core_Controller { /** * class constructor + * @param null $title + * @param bool|int $action + * @param bool $modal */ function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { require_once 'CRM/Auction/StateMachine/Item.php'; diff --git a/tools/bin/scripts/ajax.php b/tools/bin/scripts/ajax.php index 952bb97d46..2827b09b20 100644 --- a/tools/bin/scripts/ajax.php +++ b/tools/bin/scripts/ajax.php @@ -64,6 +64,7 @@ function invoke() { /** * Test Function used for new hs-widget. + * @param $config */ function states(&$config) { $elements = array(); @@ -155,6 +156,7 @@ ORDER BY name"; /** * Test Function used for new hs-widget. + * @param $config */ function countries(&$config) { //get the country limit and restrict the combo select options diff --git a/tools/extensions/org.civicrm.angularex/angularex.civix.php b/tools/extensions/org.civicrm.angularex/angularex.civix.php index 27c25bbdff..79958c9e40 100644 --- a/tools/extensions/org.civicrm.angularex/angularex.civix.php +++ b/tools/extensions/org.civicrm.angularex/angularex.civix.php @@ -6,6 +6,7 @@ * (Delegated) Implementation of hook_civicrm_config * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config + * @param null $config */ function _angularex_civix_civicrm_config(&$config = NULL) { static $configured = FALSE; @@ -156,12 +157,14 @@ function _angularex_civix_find_files($dir, $pattern) { } return $result; } + /** * (Delegated) Implementation of hook_civicrm_managed * * Find any *.mgd.php files, merge their content, and return. * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_managed + * @param $entities */ function _angularex_civix_civicrm_managed(&$entities) { $mgdFiles = _angularex_civix_find_files(__DIR__, '*.mgd.php'); @@ -184,6 +187,8 @@ function _angularex_civix_civicrm_managed(&$entities) { * Note: This hook only runs in CiviCRM 4.4+. * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_caseTypes + * @param $caseTypes + * @throws \Exception */ function _angularex_civix_civicrm_caseTypes(&$caseTypes) { if (!is_dir(__DIR__ . '/xml/case')) { @@ -229,6 +234,11 @@ function _angularex_civix_glob($pattern) { * $path - path where insertion should happen (ie. Administer/System Settings) * $item - menu you need to insert (parent/child attributes will be filled for you) * $parentId - used internally to recurse in the menu structure + * @param $menu + * @param $path + * @param $item + * @param null $parentId + * @return bool */ function _angularex_civix_insert_navigation_menu(&$menu, $path, $item, $parentId = NULL) { static $navId; @@ -265,6 +275,7 @@ function _angularex_civix_insert_navigation_menu(&$menu, $path, $item, $parentId * (Delegated) Implementation of hook_civicrm_alterSettingsFolders * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_alterSettingsFolders + * @param null $metaDataFolders */ function _angularex_civix_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) { static $configured = FALSE; @@ -275,4 +286,4 @@ function _angularex_civix_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) if(is_dir($settingsDir) && !in_array($settingsDir, $metaDataFolders)) { $metaDataFolders[] = $settingsDir; } -} \ No newline at end of file +} diff --git a/tools/extensions/org.civicrm.angularex/angularex.php b/tools/extensions/org.civicrm.angularex/angularex.php index 216105f646..63c9d6119d 100644 --- a/tools/extensions/org.civicrm.angularex/angularex.php +++ b/tools/extensions/org.civicrm.angularex/angularex.php @@ -6,6 +6,7 @@ require_once 'angularex.civix.php'; * Implementation of hook_civicrm_config * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config + * @param $config */ function angularex_civicrm_config(&$config) { _angularex_civix_civicrm_config($config); @@ -80,6 +81,7 @@ function angularex_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { * is installed, disabled, uninstalled. * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_managed + * @param $entities */ function angularex_civicrm_managed(&$entities) { return _angularex_civix_civicrm_managed($entities); @@ -93,6 +95,7 @@ function angularex_civicrm_managed(&$entities) { * Note: This hook only runs in CiviCRM 4.4+. * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_caseTypes + * @param $caseTypes */ function angularex_civicrm_caseTypes(&$caseTypes) { _angularex_civix_civicrm_caseTypes($caseTypes); @@ -102,6 +105,7 @@ function angularex_civicrm_caseTypes(&$caseTypes) { * Implementation of hook_civicrm_alterSettingsFolders * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_alterSettingsFolders + * @param null $metaDataFolders */ function angularex_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) { _angularex_civix_civicrm_alterSettingsFolders($metaDataFolders); diff --git a/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueue.php b/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueue.php index 29e022a3f9..df73fb08ba 100644 --- a/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueue.php +++ b/tools/extensions/org.civicrm.demoqueue/CRM/Demoqueue/Page/DemoQueue.php @@ -41,6 +41,10 @@ class CRM_Demoqueue_Page_DemoQueue extends CRM_Core_Page { /** * Perform some business logic + * @param \CRM_Queue_TaskContext $ctx + * @param $delay + * @param $message + * @return bool */ static function doMyWork(CRM_Queue_TaskContext $ctx, $delay, $message) { sleep(1); @@ -54,6 +58,8 @@ class CRM_Demoqueue_Page_DemoQueue extends CRM_Core_Page { /** * Perform some business logic + * @param \CRM_Queue_TaskContext $ctx + * @return bool */ static function addMoreWork(CRM_Queue_TaskContext $ctx) { sleep(1); @@ -71,6 +77,7 @@ class CRM_Demoqueue_Page_DemoQueue extends CRM_Core_Page { /** * Handle the final step of the queue + * @param \CRM_Queue_TaskContext $ctx */ static function onEnd(CRM_Queue_TaskContext $ctx) { //CRM_Utils_System::redirect('civicrm/demo-queue/done'); diff --git a/tools/extensions/org.civicrm.demoqueue/demoqueue.civix.php b/tools/extensions/org.civicrm.demoqueue/demoqueue.civix.php index afc8b9fd67..cfc2973f96 100644 --- a/tools/extensions/org.civicrm.demoqueue/demoqueue.civix.php +++ b/tools/extensions/org.civicrm.demoqueue/demoqueue.civix.php @@ -4,6 +4,7 @@ /** * (Delegated) Implementation of hook_civicrm_config + * @param $config */ function _demoqueue_civix_civicrm_config(&$config) { $template =& CRM_Core_Smarty::singleton(); diff --git a/tools/extensions/org.civicrm.demoqueue/demoqueue.php b/tools/extensions/org.civicrm.demoqueue/demoqueue.php index 83b46a0be7..fbb2999a95 100644 --- a/tools/extensions/org.civicrm.demoqueue/demoqueue.php +++ b/tools/extensions/org.civicrm.demoqueue/demoqueue.php @@ -4,6 +4,7 @@ require_once 'demoqueue.civix.php'; /** * Implementation of hook_civicrm_config + * @param $config */ function demoqueue_civicrm_config(&$config) { _demoqueue_civix_civicrm_config($config); diff --git a/tools/extensions/org.civicrm.multisite/multisite.civix.php b/tools/extensions/org.civicrm.multisite/multisite.civix.php index f5150dfc95..48d7b895d8 100644 --- a/tools/extensions/org.civicrm.multisite/multisite.civix.php +++ b/tools/extensions/org.civicrm.multisite/multisite.civix.php @@ -4,6 +4,7 @@ /** * (Delegated) Implementation of hook_civicrm_config + * @param null $config */ function _multisite_civix_civicrm_config(&$config = NULL) { static $configured = FALSE; @@ -27,6 +28,7 @@ function _multisite_civix_civicrm_config(&$config = NULL) { /** * (Delegated) Implementation of hook_civicrm_alterSettingsMetaData + * @param null $metaDataFolders */ function _multisite_civix_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) { static $configured = FALSE; @@ -153,10 +155,12 @@ function _multisite_civix_find_files($dir, $pattern) { } return $result; } + /** * (Delegated) Implementation of hook_civicrm_managed * * Find any *.mgd.php files, merge their content, and return. + * @param $entities */ function _multisite_civix_civicrm_managed(&$entities) { $mgdFiles = _multisite_civix_find_files(__DIR__, '*.mgd.php'); diff --git a/tools/extensions/org.civicrm.multisite/multisite.php b/tools/extensions/org.civicrm.multisite/multisite.php index 1e2a7aa7a0..b232526ed5 100644 --- a/tools/extensions/org.civicrm.multisite/multisite.php +++ b/tools/extensions/org.civicrm.multisite/multisite.php @@ -4,6 +4,7 @@ require_once 'multisite.civix.php'; /** * Implementation of hook_civicrm_config + * @param $config */ function multisite_civicrm_config(&$config) { _multisite_civix_civicrm_config($config); @@ -64,6 +65,7 @@ function multisite_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { * * Generate a list of entities to create/deactivate/delete when this module * is installed, disabled, uninstalled. + * @param $entities */ function multisite_civicrm_managed(&$entities) { return _multisite_civix_civicrm_managed($entities); @@ -170,6 +172,7 @@ function multisite_civicrm_permissions(&$permissions){ /** * Implementation of hook_civicrm_config + * @param null $metaDataFolders */ function multisite_civicrm_alterSettingsFolders(&$metaDataFolders = NULL){ _multisite_civix_civicrm_alterSettingsFolders($metaDataFolders); diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php index a274bad6d1..9d7647ae09 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleCheckout.php @@ -232,6 +232,10 @@ class org_civicrm_payment_googlecheckout extends CRM_Core_Payment { * @paymentProcessor is the array of payment processor settings value. * @searchParamsnvpStr is the array of search params. * returns an associtive array containing the response from the server. + * @param $paymentProcessor + * @param $searchParams + * @return array|object + * @throws \Exception */ function invokeAPI($paymentProcessor, $searchParams) { $merchantID = $paymentProcessor['user_name']; diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php index 42b7ed5719..1d15bc0a88 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php @@ -407,7 +407,7 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base /** * This method is handles the response that will be invoked (from extern/googleNotify) every time * a notification or request is sent by the Google Server. - * + * @param $xml_response */ static function main($xml_response) { @@ -553,10 +553,12 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base return TRUE; } - /** - * Converts the comma separated name-value pairs in - * to an array of name-value pairs. - */ + /** + * Converts the comma separated name-value pairs in + * to an array of name-value pairs. + * @param $str + * @return array + */ static function stringToArray($str) { $vars = $labels = array(); diff --git a/tools/extensions/org.civicrm.search.activity/ActivitySearch.php b/tools/extensions/org.civicrm.search.activity/ActivitySearch.php index f199c5056d..08b85cec1d 100644 --- a/tools/extensions/org.civicrm.search.activity/ActivitySearch.php +++ b/tools/extensions/org.civicrm.search.activity/ActivitySearch.php @@ -157,6 +157,12 @@ class org_civicrm_search_activityimplementsCRM_Contact_Form_Search_Interface { /** * Construct the search query + * @param int $offset + * @param int $rowcount + * @param null $sort + * @param bool $includeContactIDs + * @param bool $onlyIDs + * @return string */ function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $onlyIDs = FALSE diff --git a/tools/scripts/solr/createSolrJSON.php b/tools/scripts/solr/createSolrJSON.php index 5f0b7ac8bc..c378338a4f 100644 --- a/tools/scripts/solr/createSolrJSON.php +++ b/tools/scripts/solr/createSolrJSON.php @@ -36,6 +36,8 @@ define('CHUNK_SIZE', 128); /** * Split a large array of contactIDs into more manageable smaller chunks + * @param $contactIDs + * @return array */ function &splitContactIDs(&$contactIDs) { // contactIDs could be a real large array, so we split it up into @@ -65,6 +67,8 @@ function &splitContactIDs(&$contactIDs) { /** * Given an array of values, generate the JSON in the Solr format + * @param $values + * @return string */ function &generateSolrJSON($values) { $result = "["; @@ -118,6 +122,9 @@ function escapeJsonString($value) { /** * Given a set of contact IDs get the values + * @param $contactIDs + * @param $values + * @return array */ function getValues(&$contactIDs, &$values) { $values = array(); diff --git a/tools/scripts/solr/createSolrXML.php b/tools/scripts/solr/createSolrXML.php index 28b89a9ac5..66b2fbcc12 100644 --- a/tools/scripts/solr/createSolrXML.php +++ b/tools/scripts/solr/createSolrXML.php @@ -36,6 +36,8 @@ define('CHUNK_SIZE', 128); /** * Split a large array of contactIDs into more manageable smaller chunks + * @param $contactIDs + * @return array */ function &splitContactIDs(&$contactIDs) { // contactIDs could be a real large array, so we split it up into @@ -65,6 +67,8 @@ function &splitContactIDs(&$contactIDs) { /** * Given an array of values, generate the XML in the Solr format + * @param $values + * @return string */ function &generateSolrXML($values) { $result = "\n"; @@ -94,6 +98,9 @@ EOT; /** * Given a set of contact IDs get the values + * @param $contactIDs + * @param $values + * @return array */ function getValues(&$contactIDs, &$values) { $values = array(); diff --git a/tools/scripts/solr/createSyncJSON.php b/tools/scripts/solr/createSyncJSON.php index 1e19b40817..99a3669cd3 100644 --- a/tools/scripts/solr/createSyncJSON.php +++ b/tools/scripts/solr/createSyncJSON.php @@ -36,6 +36,8 @@ define('CHUNK_SIZE', 128); /** * Split a large array of contactIDs into more manageable smaller chunks + * @param $contactIDs + * @return array */ function &splitContactIDs(&$contactIDs) { // contactIDs could be a real large array, so we split it up into @@ -65,6 +67,11 @@ function &splitContactIDs(&$contactIDs) { /** * Given a set of contact IDs get the values + * @param $contactIDs + * @param $values + * @param $allContactIDs + * @param $addditionalContactIDs + * @return array */ function getValues(&$contactIDs, &$values, &$allContactIDs, &$addditionalContactIDs) { $values = array(); diff --git a/tools/scripts/tpl-lint b/tools/scripts/tpl-lint index d2e8bcb19d..4fe5925e2c 100755 --- a/tools/scripts/tpl-lint +++ b/tools/scripts/tpl-lint @@ -74,6 +74,8 @@ function check_a($a, $reporter) { /** * Determine if snippet of JS returns strictly false + * @param $js + * @return bool */ function js_returns_false($js) { return @@ -86,6 +88,8 @@ function js_returns_false($js) { /** * Determine if snippet of JS returns a function call + * @param $js + * @return int */ function js_returns_func($js) { return preg_match('/^ *return +[a-zA-Z0-9\._$]+\(/', $js); -- 2.25.1