Minor comment fixes for CRM/Extensions directory.
authorSaurabh Batra <saurabh.batra96@gmail.com>
Sun, 25 Oct 2015 15:55:58 +0000 (21:25 +0530)
committerSaurabh Batra <saurabh.batra96@gmail.com>
Mon, 26 Oct 2015 12:29:24 +0000 (17:59 +0530)
22 files changed:
CRM/Extension/Browser.php
CRM/Extension/Container/Basic.php
CRM/Extension/Container/Collection.php
CRM/Extension/Container/Default.php
CRM/Extension/Container/Interface.php
CRM/Extension/Container/Static.php
CRM/Extension/Downloader.php
CRM/Extension/Exception.php
CRM/Extension/Exception/DependencyException.php
CRM/Extension/Exception/MissingException.php
CRM/Extension/Exception/ParseException.php
CRM/Extension/Info.php
CRM/Extension/Manager.php
CRM/Extension/Manager/Base.php
CRM/Extension/Manager/Interface.php
CRM/Extension/Manager/Module.php
CRM/Extension/Manager/Payment.php
CRM/Extension/Manager/Report.php
CRM/Extension/Manager/Search.php
CRM/Extension/Mapper.php
CRM/Extension/System.php
CRM/Extension/Upgrades.php

index 4e23ff2f6ff50ca4f336ee6286ca854f9b22b069..a5e40df1aa2002f2342509694d49e6a52ab7ce2b 100644 (file)
@@ -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;
     }
   }
index 4bc22533f5b3301b589e16b35d83fd766081f8ca..d4941b89058a5f70898f9af95c8e7b56477fd25c 100644 (file)
@@ -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());
index f71be82e05b96e9d7f962eb7aaf35da3fa8b9435..d6460d8f8070c187765b2e87a13d52e5526e35cc 100644 (file)
@@ -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);
index 52c61f86fcdac0a161ada95ddd2a123000fa7a3d..8003ac75036f3c0dab3a28d0919ed1229dc248a7 100644 (file)
@@ -1,4 +1,34 @@
 <?php
+/*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.7                                                |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License and the CiviCRM Licensing Exception along                  |
+ | with this program; if not, contact CiviCRM LLC                     |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2015
+ */
 
 /**
  * The default container is just a basic container which can be configured via
@@ -8,6 +38,8 @@ class CRM_Extension_Container_Default extends CRM_Extension_Container_Basic {
 
   /**
    * @inheritDoc
+   *
+   * @return array
    */
   public function checkRequirements() {
     $errors = array();
index 62edbd46c8457298c49331be18e18e103ac62942..ec64df3d55b136fa43491824169c0cce006c4e05 100644 (file)
@@ -28,7 +28,6 @@
 /**
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
  */
 
 /**
@@ -39,17 +38,11 @@ interface CRM_Extension_Container_Interface {
 
   /**
    * Determine if any unmet requirements prevent use of this container.
-   *
-   * @return array
-   *   List of error messages; empty if OK.
    */
   public function checkRequirements();
 
   /**
    * Get a list of extensions available in this container.
-   *
-   * @return array
-   *   List of keys (strings).
    */
   public function getKeys();
 
@@ -58,9 +51,6 @@ interface CRM_Extension_Container_Interface {
    *
    * @param string $key
    *   Fully-qualified extension name.
-   * @return string
-   *   Local path to the extension's main .php file.
-   * @throws Exception
    */
   public function getPath($key);
 
@@ -69,9 +59,6 @@ interface CRM_Extension_Container_Interface {
    *
    * @param string $key
    *   Fully-qualified extension name.
-   * @return string
-   *   Public URL.
-   * @throws Exception
    */
   public function getResUrl($key);
 
index 6980c48db1bdd4823837fff2416451bc3e3b0dd0..b27c0a4d75110ff9538f22cca365f162d12a2483 100644 (file)
@@ -28,7 +28,6 @@
 /**
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
  */
 
 /**
index a1861d79d7d36d907349d12649cfef57f1c20624..2d361ad772ed007f1443a5fd1e0b11516b6294c6 100644 (file)
@@ -30,8 +30,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Extension_Downloader {
   /**
@@ -70,10 +68,8 @@ class CRM_Extension_Downloader {
       $url = CRM_Utils_System::url('civicrm/admin/setting/path', "reset=1&civicrmDestination=${civicrmDestination}");
       $errors[] = array(
         'title' => ts('Directory Unwritable'),
-        //'message' => ts('Your extensions directory: %1 is not web server writable. Please go to the <a href="%2">path setting page</a> and correct it.<br/>',
         'message' => ts("Your extensions directory is not set or is not writable. Click <a href='%1'>here</a> to set the extensions directory.",
           array(
-            //1 => $this->containerDir,
             1 => $url,
           )
         ),
index 195f680005a452147e19895e6a10d8d92ddf76ef..5b8a0ccd2c6f007a88ba24c0012a7059de9e60b4 100644 (file)
@@ -27,6 +27,9 @@
 
 /**
  * Class CRM_Extension_Exception
+ *
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2015
  */
 class CRM_Extension_Exception extends CRM_Core_Exception {
 }
index 8c941fcfcfdc3fd1765c83520867b2ac90e67d19..fba49ac14176964fb3cbe8907c2e899949b43da5 100644 (file)
  +--------------------------------------------------------------------+
  */
 
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2015
+ */
+
 /**
  * An extension management operation failed because it would
  * break a dependency.
index 5c41dba8601b6f51719d4de38a462fb4f59b61ee..2383523f7dbf8ad7589f56181869e08bc563bea8 100644 (file)
  +--------------------------------------------------------------------+
  */
 
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2015
+ */
+
 /**
  * An extension could not be located
  */
index 3b3b4d357edaa6f73b50aeadddfe8fbff9a1e96e..425a8f04cb8b40fee2b46ec71795c60d7dbaaa0f 100644 (file)
  +--------------------------------------------------------------------+
  */
 
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2015
+ */
+
 /**
  * Error reading XML for an extension
  */
index 11e8e4384fcd4c52c2eccf9bd822fe3e7145701b..b5bf1049decda3c3edb56ad43662622cd696af6e 100644 (file)
@@ -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;
index cdeb14eb048fa2cd058482ad294ed78e6d87c845..bc7a518bce9771449a6057159e794f0bff92ed57 100644 (file)
@@ -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) {
index 61b7779d69ca427cb93c4b79d1b2a53c46e6455a..97d9f37381109f54a853cd9f68c33e114213a390 100644 (file)
@@ -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) {
index dd198f3e1a18cad035e6609fa3e62ed30c7b4eb6..882ad35922995492ee8a6e8b8892f6402e078413 100644 (file)
@@ -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);
 
index 68b421abf20efc213fb53a4cabeee30ea25e80e6..dff26c2dc71024f3bd833f895bd6124411832ce4 100644 (file)
@@ -30,8 +30,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Extension_Manager_Module extends CRM_Extension_Manager_Base {
 
index 3f89f6f55bb57b5958d7e38e5e80db588428b559..1758b3a80666ecade98afe31781d4d47c3e69bab 100644 (file)
@@ -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();
index 7322413ee5e1c2ef077e9eea714a5c1388a2d49f..893ac40803a11dd28d5448d821b6217179291a94 100644 (file)
  *
  * @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',
index 46d74ffea2e8c424308e63db70fb02d0fc96f6a9..3d3fa13ba64b7dbe64b7292896c8a96751487763 100644 (file)
  *
  * @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',
index 660900e079e15b8e5323fd5dbb371ea278861c67..9c99b8a7627a89db415b83d1349e297292f1f165 100755 (executable)
  *
  * @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.
index 6b4a07de85f3167974646dd79f3778b183d3871b..32df05d4d7f5fbbea7fb67b2e33fc5ae8766a73d 100644 (file)
@@ -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;
       }
index 398598dd04037f01822849edb7a973e7701ed78b..7c2afb32483de6780f5eb71c1fea5e012a697597 100644 (file)
@@ -30,8 +30,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Extension_Upgrades {