Test fixes for All kind of Custom Values
[civicrm-core.git] / CRM / Core / BAO / Extension.php
index a4620d547b81b6d5a9f0b5baaf91d748f386ab0c..434c9e492f65341498dce6618392b6252d9265f2 100644 (file)
@@ -3,8 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright (C) 2011 Marty Wright                                    |
- | Licensed to CiviCRM under the Academic Free License version 3.0.   |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | 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-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Core_BAO_Extension extends CRM_Core_DAO_Extension {
 
   /**
-   * Fetch object based on array of properties
+   * Fetch object based on array of properties.
    *
-   * @param array $params   (reference ) an assoc array of name/value pairs
-   * @param array $defaults (reference ) an assoc array to hold the flattened values
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
+   * @param array $defaults
+   *   (reference ) an assoc array to hold the flattened values.
    *
-   * @return CRM_Core_BAO_LocationType object on success, null otherwise
-   * @access public
-   * @static
+   * @return CRM_Core_BAO_LocationType|null
+   *   object on success, null otherwise
    */
-  static function retrieve(&$params, &$defaults) {
+  public static function retrieve(&$params, &$defaults) {
     $extension = new CRM_Core_DAO_Extension();
     $extension->copyValues($params);
     if ($extension->find(TRUE)) {
@@ -60,29 +60,29 @@ class CRM_Core_BAO_Extension extends CRM_Core_DAO_Extension {
   }
 
   /**
-   * Delete an extension
+   * Delete an extension.
    *
-   * @param  int  $id     Id of the extension to be deleted.
+   * @param int $id
+   *   Id of the extension to be deleted.
    *
    * @return void
    *
-   * @access public
-   * @static
    */
-  static function del($id) {
+  public static function del($id) {
     $extension = new CRM_Core_DAO_Extension();
     $extension->id = $id;
     return $extension->delete();
   }
 
   /**
-   * Change the schema version of an extension
+   * Change the schema version of an extension.
    *
-   * @param $fullName string, the fully-qualified name (eg "com.example.myextension")
-   * @param $schemaVersion string
+   * @param string $fullName
+   *   the fully-qualified name (eg "com.example.myextension").
+   * @param string $schemaVersion
    * @return void
    */
-  static function setSchemaVersion($fullName, $schemaVersion) {
+  public static function setSchemaVersion($fullName, $schemaVersion) {
     $sql = 'UPDATE civicrm_extension SET schema_version = %1 WHERE full_name = %2';
     $params = array(
       1 => array($schemaVersion, 'String'),
@@ -92,12 +92,13 @@ class CRM_Core_BAO_Extension extends CRM_Core_DAO_Extension {
   }
 
   /**
-   * Determine the schema version of an extension
+   * Determine the schema version of an extension.
    *
-   * @param $fullName string, the fully-qualified name (eg "com.example.myextension")
+   * @param string $fullName
+   *   the fully-qualified name (eg "com.example.myextension").
    * @return string
    */
-  static function getSchemaVersion($fullName) {
+  public static function getSchemaVersion($fullName) {
     $sql = 'SELECT schema_version FROM civicrm_extension WHERE full_name = %1';
     $params = array(
       1 => array($fullName, 'String'),