From 4faa436bbf85d14929813fa913db29c50c6b098f Mon Sep 17 00:00:00 2001 From: Saurabh Batra Date: Sun, 25 Oct 2015 21:25:58 +0530 Subject: [PATCH] Minor comment fixes for CRM/Extensions directory. --- CRM/Extension/Browser.php | 3 -- CRM/Extension/Container/Basic.php | 5 ++- CRM/Extension/Container/Collection.php | 9 +++++- CRM/Extension/Container/Default.php | 32 +++++++++++++++++++ CRM/Extension/Container/Interface.php | 13 -------- CRM/Extension/Container/Static.php | 1 - CRM/Extension/Downloader.php | 4 --- CRM/Extension/Exception.php | 3 ++ .../Exception/DependencyException.php | 5 +++ CRM/Extension/Exception/MissingException.php | 6 ++++ CRM/Extension/Exception/ParseException.php | 5 +++ CRM/Extension/Info.php | 4 ++- CRM/Extension/Manager.php | 8 ----- CRM/Extension/Manager/Base.php | 26 +++++++++++++-- CRM/Extension/Manager/Interface.php | 10 ------ CRM/Extension/Manager/Module.php | 2 -- CRM/Extension/Manager/Payment.php | 16 ++++++++-- CRM/Extension/Manager/Report.php | 6 ---- CRM/Extension/Manager/Search.php | 6 ---- CRM/Extension/Mapper.php | 3 -- CRM/Extension/System.php | 4 +-- CRM/Extension/Upgrades.php | 2 -- 22 files changed, 104 insertions(+), 69 deletions(-) diff --git a/CRM/Extension/Browser.php b/CRM/Extension/Browser.php index 4e23ff2f6f..a5e40df1aa 100644 --- a/CRM/Extension/Browser.php +++ b/CRM/Extension/Browser.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Browser { @@ -165,7 +163,6 @@ class CRM_Extension_Browser { return $exts[$key]; } else { - // throw new CRM_Extension_Exception("Unknown remote extension: $key"); return NULL; } } diff --git a/CRM/Extension/Container/Basic.php b/CRM/Extension/Container/Basic.php index 4bc22533f5..d4941b8905 100644 --- a/CRM/Extension/Container/Basic.php +++ b/CRM/Extension/Container/Basic.php @@ -28,7 +28,6 @@ /** * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ */ /** @@ -102,6 +101,8 @@ class CRM_Extension_Container_Basic implements CRM_Extension_Container_Interface /** * @inheritDoc + * + * @return array */ public function checkRequirements() { $errors = array(); @@ -124,6 +125,8 @@ class CRM_Extension_Container_Basic implements CRM_Extension_Container_Interface /** * @inheritDoc + * + * @return array_keys */ public function getKeys() { return array_keys($this->getRelPaths()); diff --git a/CRM/Extension/Container/Collection.php b/CRM/Extension/Container/Collection.php index f71be82e05..d6460d8f80 100644 --- a/CRM/Extension/Container/Collection.php +++ b/CRM/Extension/Container/Collection.php @@ -28,7 +28,6 @@ /** * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ */ /** @@ -82,6 +81,8 @@ class CRM_Extension_Container_Collection implements CRM_Extension_Container_Inte /** * @inheritDoc + * + * @return array */ public function checkRequirements() { $errors = array(); @@ -93,6 +94,8 @@ class CRM_Extension_Container_Collection implements CRM_Extension_Container_Inte /** * @inheritDoc + * + * @return array_keys */ public function getKeys() { $k2c = $this->getKeysToContainer(); @@ -101,6 +104,8 @@ class CRM_Extension_Container_Collection implements CRM_Extension_Container_Inte /** * @inheritDoc + * + * @param string $key */ public function getPath($key) { return $this->getContainer($key)->getPath($key); @@ -108,6 +113,8 @@ class CRM_Extension_Container_Collection implements CRM_Extension_Container_Inte /** * @inheritDoc + * + * @param string $key */ public function getResUrl($key) { return $this->getContainer($key)->getResUrl($key); diff --git a/CRM/Extension/Container/Default.php b/CRM/Extension/Container/Default.php index 52c61f86fc..8003ac7503 100644 --- a/CRM/Extension/Container/Default.php +++ b/CRM/Extension/Container/Default.php @@ -1,4 +1,34 @@ ts('Directory Unwritable'), - //'message' => ts('Your extensions directory: %1 is not web server writable. Please go to the path setting page and correct it.
', 'message' => ts("Your extensions directory is not set or is not writable. Click here to set the extensions directory.", array( - //1 => $this->containerDir, 1 => $url, ) ), diff --git a/CRM/Extension/Exception.php b/CRM/Extension/Exception.php index 195f680005..5b8a0ccd2c 100644 --- a/CRM/Extension/Exception.php +++ b/CRM/Extension/Exception.php @@ -27,6 +27,9 @@ /** * Class CRM_Extension_Exception + * + * @package CRM + * @copyright CiviCRM LLC (c) 2004-2015 */ class CRM_Extension_Exception extends CRM_Core_Exception { } diff --git a/CRM/Extension/Exception/DependencyException.php b/CRM/Extension/Exception/DependencyException.php index 8c941fcfcf..fba49ac141 100644 --- a/CRM/Extension/Exception/DependencyException.php +++ b/CRM/Extension/Exception/DependencyException.php @@ -25,6 +25,11 @@ +--------------------------------------------------------------------+ */ +/** + * @package CRM + * @copyright CiviCRM LLC (c) 2004-2015 + */ + /** * An extension management operation failed because it would * break a dependency. diff --git a/CRM/Extension/Exception/MissingException.php b/CRM/Extension/Exception/MissingException.php index 5c41dba860..2383523f7d 100644 --- a/CRM/Extension/Exception/MissingException.php +++ b/CRM/Extension/Exception/MissingException.php @@ -25,6 +25,12 @@ +--------------------------------------------------------------------+ */ + +/** + * @package CRM + * @copyright CiviCRM LLC (c) 2004-2015 + */ + /** * An extension could not be located */ diff --git a/CRM/Extension/Exception/ParseException.php b/CRM/Extension/Exception/ParseException.php index 3b3b4d357e..425a8f04cb 100644 --- a/CRM/Extension/Exception/ParseException.php +++ b/CRM/Extension/Exception/ParseException.php @@ -25,6 +25,11 @@ +--------------------------------------------------------------------+ */ +/** + * @package CRM + * @copyright CiviCRM LLC (c) 2004-2015 + */ + /** * Error reading XML for an extension */ diff --git a/CRM/Extension/Info.php b/CRM/Extension/Info.php index 11e8e4384f..b5bf1049de 100644 --- a/CRM/Extension/Info.php +++ b/CRM/Extension/Info.php @@ -27,6 +27,9 @@ /** * Metadata for an extension (e.g. the extension's "info.xml" file) + * + * @package CRM + * @copyright CiviCRM LLC (c) 2004-2015 */ class CRM_Extension_Info { @@ -99,7 +102,6 @@ class CRM_Extension_Info { * Copy attributes from an XML document to $this * * @param SimpleXMLElement $info - * @return void */ public function parse($info) { $this->key = (string) $info->attributes()->key; diff --git a/CRM/Extension/Manager.php b/CRM/Extension/Manager.php index cdeb14eb04..bc7a518bce 100644 --- a/CRM/Extension/Manager.php +++ b/CRM/Extension/Manager.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Manager { /** @@ -121,7 +119,6 @@ class CRM_Extension_Manager { * * @param string $tmpCodeDir * Path to a local directory containing a copy of the new (inert) code. - * @return void * @throws CRM_Extension_Exception */ public function replace($tmpCodeDir) { @@ -204,7 +201,6 @@ class CRM_Extension_Manager { * * @param array $keys * List of extension keys. - * @return void * @throws CRM_Extension_Exception */ public function install($keys) { @@ -249,7 +245,6 @@ class CRM_Extension_Manager { foreach ($keys as $key) { list ($info, $typeManager) = $this->_getInfoTypeHandler($key); // throws Exception - //print_r(array('post post?', $info, 'k' => $key, 'os'=> $origStatuses[$key])); switch ($origStatuses[$key]) { case self::STATUS_INSTALLED: @@ -278,7 +273,6 @@ class CRM_Extension_Manager { * * @param array $keys * List of extension keys. - * @return void * @throws CRM_Extension_Exception */ public function enable($keys) { @@ -290,7 +284,6 @@ class CRM_Extension_Manager { * * @param array $keys * List of extension keys. - * @return void * @throws CRM_Extension_Exception */ public function disable($keys) { @@ -339,7 +332,6 @@ class CRM_Extension_Manager { * * @param array $keys * List of extension keys. - * @return void * @throws CRM_Extension_Exception */ public function uninstall($keys) { diff --git a/CRM/Extension/Manager/Base.php b/CRM/Extension/Manager/Base.php index 61b7779d69..97d9f37381 100644 --- a/CRM/Extension/Manager/Base.php +++ b/CRM/Extension/Manager/Base.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Manager_Base implements CRM_Extension_Manager_Interface { @@ -51,60 +49,81 @@ class CRM_Extension_Manager_Base implements CRM_Extension_Manager_Interface { /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreInstall(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPostInstall(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPostPostInstall(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreEnable(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPostEnable(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreDisable(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPostDisable(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreUninstall(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPostUninstall(CRM_Extension_Info $info) { } /** * @inheritDoc + * + * @param CRM_Extension_Info $oldInfo + * @param CRM_Extension_Info $newInfo */ public function onPreReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo) { if ($this->autoReplace) { @@ -115,6 +134,9 @@ class CRM_Extension_Manager_Base implements CRM_Extension_Manager_Interface { /** * @inheritDoc + * + * @param CRM_Extension_Info $oldInfo + * @param CRM_Extension_Info $newInfo */ public function onPostReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo) { if ($this->autoReplace) { diff --git a/CRM/Extension/Manager/Interface.php b/CRM/Extension/Manager/Interface.php index dd198f3e1a..882ad35922 100644 --- a/CRM/Extension/Manager/Interface.php +++ b/CRM/Extension/Manager/Interface.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ interface CRM_Extension_Manager_Interface { /** @@ -61,15 +59,11 @@ interface CRM_Extension_Manager_Interface { /** * @param CRM_Extension_Info $info - * - * @return mixed */ public function onPreEnable(CRM_Extension_Info $info); /** * @param CRM_Extension_Info $info - * - * @return mixed */ public function onPostEnable(CRM_Extension_Info $info); @@ -116,16 +110,12 @@ interface CRM_Extension_Manager_Interface { /** * @param CRM_Extension_Info $oldInfo * @param CRM_Extension_Info $newInfo - * - * @return mixed */ public function onPreReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo); /** * @param CRM_Extension_Info $oldInfo * @param CRM_Extension_Info $newInfo - * - * @return mixed */ public function onPostReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo); diff --git a/CRM/Extension/Manager/Module.php b/CRM/Extension/Manager/Module.php index 68b421abf2..dff26c2dc7 100644 --- a/CRM/Extension/Manager/Module.php +++ b/CRM/Extension/Manager/Module.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Manager_Module extends CRM_Extension_Manager_Base { diff --git a/CRM/Extension/Manager/Payment.php b/CRM/Extension/Manager/Payment.php index 3f89f6f55b..1758b3a806 100644 --- a/CRM/Extension/Manager/Payment.php +++ b/CRM/Extension/Manager/Payment.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { @@ -50,6 +48,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreInstall(CRM_Extension_Info $info) { $paymentProcessorTypes = $this->_getAllPaymentProcessorTypes('class_name'); @@ -109,6 +109,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPostInstall(CRM_Extension_Info $info) { $this->_runPaymentHook($info, 'install'); @@ -116,6 +118,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreUninstall(CRM_Extension_Info $info) { $paymentProcessorTypes = $this->_getAllPaymentProcessorTypes('class_name'); @@ -136,6 +140,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreDisable(CRM_Extension_Info $info) { // HMM? // if ($this->type == 'payment' && $this->status != 'missing') { @@ -147,6 +153,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPreEnable(CRM_Extension_Info $info) { $paymentProcessorTypes = $this->_getAllPaymentProcessorTypes('class_name'); @@ -155,6 +163,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { /** * @inheritDoc + * + * @param CRM_Extension_Info $info */ public function onPostEnable(CRM_Extension_Info $info) { // HMM? // if ($this->type == 'payment' && $this->status != 'missing') { @@ -165,7 +175,7 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { * @param string $attr * The attribute used to key the array. * @return array - * ($$attr => $id) + * ($attr => $id) */ private function _getAllPaymentProcessorTypes($attr) { $ppt = array(); diff --git a/CRM/Extension/Manager/Report.php b/CRM/Extension/Manager/Report.php index 7322413ee5..893ac40803 100644 --- a/CRM/Extension/Manager/Report.php +++ b/CRM/Extension/Manager/Report.php @@ -30,17 +30,11 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { - /** - */ const REPORT_GROUP_NAME = 'report_template'; - /** - */ public function __construct() { parent::__construct(TRUE); $this->groupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', diff --git a/CRM/Extension/Manager/Search.php b/CRM/Extension/Manager/Search.php index 46d74ffea2..3d3fa13ba6 100644 --- a/CRM/Extension/Manager/Search.php +++ b/CRM/Extension/Manager/Search.php @@ -30,17 +30,11 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base { - /** - */ const CUSTOM_SEARCH_GROUP_NAME = 'custom_search'; - /** - */ public function __construct() { parent::__construct(TRUE); $this->groupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php index 660900e079..9c99b8a762 100755 --- a/CRM/Extension/Mapper.php +++ b/CRM/Extension/Mapper.php @@ -43,15 +43,12 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Mapper { /** * An URL for public extensions repository. */ - //const DEFAULT_EXTENSIONS_REPOSITORY = 'http://civicrm.org/extdir/ver={ver}|cms={uf}'; /** * Extension info file name. diff --git a/CRM/Extension/System.php b/CRM/Extension/System.php index 6b4a07de85..32df05d4d7 100644 --- a/CRM/Extension/System.php +++ b/CRM/Extension/System.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_System { private static $singleton; @@ -262,7 +260,7 @@ class CRM_Extension_System { $url = CRM_Core_BAO_Setting::getItem('Extension Preferences', 'ext_repo_url', NULL, CRM_Extension_Browser::DEFAULT_EXTENSIONS_REPOSITORY); // boolean false means don't try to check extensions - // http://issues.civicrm.org/jira/browse/CRM-10575 + // CRM-10575 if ($url === FALSE) { $this->_repoUrl = FALSE; } diff --git a/CRM/Extension/Upgrades.php b/CRM/Extension/Upgrades.php index 398598dd04..7c2afb3248 100644 --- a/CRM/Extension/Upgrades.php +++ b/CRM/Extension/Upgrades.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Extension_Upgrades { -- 2.25.1