CRM-16737 code coments
[civicrm-core.git] / CRM / Extension / Info.php
index 2c69775f6dfa85d6cc270d0e80be329e5a55cf0e..a00227863994f6a12972c007061aaa26b70ff8fa 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * Metadata for an extension (e.g. the extension's "info.xml" file)
@@ -31,7 +31,7 @@
 class CRM_Extension_Info {
 
   /**
-   * Extension info file name
+   * Extension info file name.
    */
   const FILENAME = 'info.xml';
 
@@ -42,7 +42,7 @@ class CRM_Extension_Info {
   public $file = NULL;
 
   /**
-   * Load extension info an XML file
+   * Load extension info an XML file.
    *
    * @param $file
    *
@@ -61,9 +61,10 @@ class CRM_Extension_Info {
   }
 
   /**
-   * Load extension info a string
+   * Load extension info a string.
    *
-   * @param string $string XML content
+   * @param string $string
+   *   XML content.
    *
    * @throws CRM_Extension_Exception_ParseException
    * @return CRM_Extension_Info
@@ -86,12 +87,12 @@ class CRM_Extension_Info {
    * @param null $label
    * @param null $file
    */
-  function __construct($key = NULL, $type = NULL, $name = NULL, $label = NULL, $file = NULL) {
-    $this->key       = $key;
-    $this->type      = $type;
-    $this->name      = $name;
-    $this->label     = $label;
-    $this->file      = $file;
+  public function __construct($key = NULL, $type = NULL, $name = NULL, $label = NULL, $file = NULL) {
+    $this->key = $key;
+    $this->type = $type;
+    $this->name = $name;
+    $this->label = $label;
+    $this->file = $file;
   }
 
   /**
@@ -101,9 +102,9 @@ class CRM_Extension_Info {
    * @return void
    */
   public function parse($info) {
-    $this->key   = (string) $info->attributes()->key;
-    $this->type  = (string) $info->attributes()->type;
-    $this->file  = (string) $info->file;
+    $this->key = (string) $info->attributes()->key;
+    $this->type = (string) $info->attributes()->type;
+    $this->file = (string) $info->file;
     $this->label = (string) $info->name;
 
     // Convert first level variables to CRM_Core_Extension properties