From f41911fdccfc2cde8e9d353444234bfb5814c739 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 11:41:08 -0800 Subject: [PATCH] INFRA-132 - CRM/Extension - Convert single-line @param to multi-line --- CRM/Extension/Downloader.php | 21 ++++++++++++------ CRM/Extension/Info.php | 3 ++- CRM/Extension/Manager.php | 15 ++++++++----- CRM/Extension/Manager/Base.php | 3 ++- CRM/Extension/Manager/Interface.php | 12 +++++++---- CRM/Extension/Manager/Payment.php | 6 ++++-- CRM/Extension/Mapper.php | 33 +++++++++++++++++++---------- 7 files changed, 62 insertions(+), 31 deletions(-) diff --git a/CRM/Extension/Downloader.php b/CRM/Extension/Downloader.php index 4a2c41ee50..054b6b6419 100644 --- a/CRM/Extension/Downloader.php +++ b/CRM/Extension/Downloader.php @@ -46,7 +46,8 @@ class CRM_Extension_Downloader { /** * @param CRM_Extension_Manager $manager - * @param string $containerDir the place to store downloaded & extracted extensions + * @param string $containerDir + * The place to store downloaded & extracted extensions. * @param string $tmpDir */ public function __construct(CRM_Extension_Manager $manager, $containerDir, $tmpDir) { @@ -96,8 +97,10 @@ class CRM_Extension_Downloader { /** * Install or upgrade an extension from a remote URL * - * @param string $key the name of the extension being installed - * @param string $downloadUrl URL of a .zip file + * @param string $key + * The name of the extension being installed. + * @param string $downloadUrl + * URL of a .zip file. * @return bool TRUE for success * @throws CRM_Extension_Exception */ @@ -130,8 +133,10 @@ class CRM_Extension_Downloader { /** * Download the remote zipfile. * - * @param string $remoteFile URL of a .zip file - * @param string $localFile path at which to store the .zip file + * @param string $remoteFile + * URL of a .zip file. + * @param string $localFile + * Path at which to store the .zip file. * @return boolean Whether the download was successful. */ public function fetch($remoteFile, $localFile) { @@ -147,8 +152,10 @@ class CRM_Extension_Downloader { /** * Extract an extension from a zip file * - * @param string $key the name of the extension being installed; this usually matches the basedir in the .zip - * @param string $zipFile the local path to a .zip file + * @param string $key + * The name of the extension being installed; this usually matches the basedir in the .zip. + * @param string $zipFile + * The local path to a .zip file. * @return string|FALSE zip file path */ public function extractFiles($key, $zipFile) { diff --git a/CRM/Extension/Info.php b/CRM/Extension/Info.php index 851e7f4604..8ae387d289 100644 --- a/CRM/Extension/Info.php +++ b/CRM/Extension/Info.php @@ -63,7 +63,8 @@ class CRM_Extension_Info { /** * Load extension info a string * - * @param string $string XML content + * @param string $string + * XML content. * * @throws CRM_Extension_Exception_ParseException * @return CRM_Extension_Info diff --git a/CRM/Extension/Manager.php b/CRM/Extension/Manager.php index 17af419eae..86a897d3e8 100644 --- a/CRM/Extension/Manager.php +++ b/CRM/Extension/Manager.php @@ -119,7 +119,8 @@ class CRM_Extension_Manager { * * This only works if the extension is stored in the default container. * - * @param string $tmpCodeDir path to a local directory containing a copy of the new (inert) code + * @param string $tmpCodeDir + * Path to a local directory containing a copy of the new (inert) code. * @return void * @throws CRM_Extension_Exception */ @@ -196,7 +197,8 @@ class CRM_Extension_Manager { /** * Add records of the extension to the database -- and enable it * - * @param array $keys list of extension keys + * @param array $keys + * List of extension keys. * @return void * @throws CRM_Extension_Exception */ @@ -261,7 +263,8 @@ class CRM_Extension_Manager { /** * Add records of the extension to the database -- and enable it * - * @param array $keys list of extension keys + * @param array $keys + * List of extension keys. * @return void * @throws CRM_Extension_Exception */ @@ -272,7 +275,8 @@ class CRM_Extension_Manager { /** * Add records of the extension to the database -- and enable it * - * @param array $keys list of extension keys + * @param array $keys + * List of extension keys. * @return void * @throws CRM_Extension_Exception */ @@ -317,7 +321,8 @@ class CRM_Extension_Manager { * * Add records of the extension to the database -- and enable it * - * @param array $keys list of extension keys + * @param array $keys + * List of extension keys. * @return void * @throws CRM_Extension_Exception */ diff --git a/CRM/Extension/Manager/Base.php b/CRM/Extension/Manager/Base.php index 226e3099b3..b584001f3f 100644 --- a/CRM/Extension/Manager/Base.php +++ b/CRM/Extension/Manager/Base.php @@ -42,7 +42,8 @@ class CRM_Extension_Manager_Base implements CRM_Extension_Manager_Interface { public $autoReplace; /** - * @param bool $autoReplace whether to automatically uninstall and install during 'replace' + * @param bool $autoReplace + * Whether to automatically uninstall and install during 'replace'. */ public function __construct($autoReplace = FALSE) { $this->autoReplace = $autoReplace; diff --git a/CRM/Extension/Manager/Interface.php b/CRM/Extension/Manager/Interface.php index aee4f7501b..df8a5cc569 100644 --- a/CRM/Extension/Manager/Interface.php +++ b/CRM/Extension/Manager/Interface.php @@ -77,7 +77,8 @@ interface CRM_Extension_Manager_Interface { * Perform type-specific removal logic (before updating the extension * row in the "civicrm_extension" table). * - * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy) + * @param CRM_Extension_Info $info + * May be generated from xml or DB (which is lossy). * @see CRM_Extension_Manager::createInfoFromDB */ public function onPreDisable(CRM_Extension_Info $info); @@ -86,7 +87,8 @@ interface CRM_Extension_Manager_Interface { * Perform type-specific removal logic (after updating the extension * row in the "civicrm_extension" table). * - * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy) + * @param CRM_Extension_Info $info + * May be generated from xml or DB (which is lossy). * @see CRM_Extension_Manager::createInfoFromDB */ public function onPostDisable(CRM_Extension_Info $info); @@ -95,7 +97,8 @@ interface CRM_Extension_Manager_Interface { * Perform type-specific removal logic (before removing the extension * row in the "civicrm_extension" table). * - * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy) + * @param CRM_Extension_Info $info + * May be generated from xml or DB (which is lossy). * @see CRM_Extension_Manager::createInfoFromDB */ public function onPreUninstall(CRM_Extension_Info $info); @@ -104,7 +107,8 @@ interface CRM_Extension_Manager_Interface { * Perform type-specific removal logic (after removing the extension * row in the "civicrm_extension" table). * - * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy) + * @param CRM_Extension_Info $info + * May be generated from xml or DB (which is lossy). * @see CRM_Extension_Manager::createInfoFromDB */ public function onPostUninstall(CRM_Extension_Info $info); diff --git a/CRM/Extension/Manager/Payment.php b/CRM/Extension/Manager/Payment.php index 13c10c73af..3dd9c27a2a 100644 --- a/CRM/Extension/Manager/Payment.php +++ b/CRM/Extension/Manager/Payment.php @@ -162,7 +162,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { } /** - * @param string $attr the attribute used to key the array + * @param string $attr + * The attribute used to key the array. * @return array ($$attr => $id) */ private function _getAllPaymentProcessorTypes($attr) { @@ -180,7 +181,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { * Load requested payment processor and call the method specified. * * @param CRM_Extension_Info $info - * @param string $method - the method to call in the payment processor class + * @param string $method + * The method to call in the payment processor class. */ private function _runPaymentHook(CRM_Extension_Info $info, $method) { // Not concerned about performance at this stage, as these are seldomly performed tasks diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php index 43a80d9f85..593429c873 100755 --- a/CRM/Extension/Mapper.php +++ b/CRM/Extension/Mapper.php @@ -113,7 +113,8 @@ class CRM_Extension_Mapper { * Given the class, provides extension's key. * * - * @param string $clazz extension class name + * @param string $clazz + * Extension class name. * * @return string name of extension key */ @@ -139,7 +140,8 @@ class CRM_Extension_Mapper { * Given the string, returns true or false if it's an extension key. * * - * @param string $key a string which might be an extension key + * @param string $key + * A string which might be an extension key. * * @return boolean true if given string is an extension name */ @@ -152,7 +154,8 @@ class CRM_Extension_Mapper { * Given the string, returns true or false if it's an extension class name. * * - * @param string $clazz a string which might be an extension class name + * @param string $clazz + * A string which might be an extension class name. * * @return boolean true if given string is an extension class name */ @@ -165,7 +168,8 @@ class CRM_Extension_Mapper { } /** - * @param string $key extension fully-qualified-name + * @param string $key + * Extension fully-qualified-name. * @param bool $fresh * * @throws CRM_Extension_Exception @@ -191,7 +195,8 @@ class CRM_Extension_Mapper { * Given the key, provides extension's class name. * * - * @param string $key extension key + * @param string $key + * Extension key. * * @return string name of extension's main class */ @@ -204,7 +209,8 @@ class CRM_Extension_Mapper { * extension's main class. * * - * @param string $key extension key + * @param string $key + * Extension key. * * @return string path to file containing extension's main class */ @@ -217,7 +223,8 @@ class CRM_Extension_Mapper { * Given the key, provides the path to file containing * extension's main class. * - * @param string $key extension key + * @param string $key + * Extension key. * @return string local path of the extension source tree */ public function keyToBasePath($key) { @@ -232,7 +239,8 @@ class CRM_Extension_Mapper { * extension's main class. * * - * @param string $key extension key + * @param string $key + * Extension key. * * @return string url for resources in this extension */ @@ -253,7 +261,8 @@ class CRM_Extension_Mapper { /** * Fetch the list of active extensions of type 'module' * - * @param $fresh bool whether to forcibly reload extensions list from canonical store + * @param $fresh + * Bool whether to forcibly reload extensions list from canonical store. * @return array - array(array('prefix' => $, 'file' => $)) */ public function getActiveModuleFiles($fresh = FALSE) { @@ -355,7 +364,8 @@ class CRM_Extension_Mapper { * Given the class, provides the template path. * * - * @param string $clazz extension class name + * @param string $clazz + * Extension class name. * * @return string path to extension's templates directory */ @@ -375,7 +385,8 @@ class CRM_Extension_Mapper { * @todo consider multiple templates, support for one template for now * * - * @param string $clazz extension class name + * @param string $clazz + * Extension class name. * * @return string extension's template name */ -- 2.25.1