INFRA-132 - Comment grammar cleanup
[civicrm-core.git] / CRM / Core / BAO / PdfFormat.php
index 9a4c003a30d413800255ddd08e8639cd7df03add..40e3ca82bc9b1aad05d76b4ac967d315896e6098 100644 (file)
@@ -55,7 +55,7 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
     ),
     'stationery' => array(
       'name' => 'stationery',
-      'type' =>CRM_Utils_Type::T_STRING,
+      'type' => CRM_Utils_Type::T_STRING,
       'default' => '',
     ),
     'orientation' => array(
@@ -100,7 +100,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
    * @param void
    *
    * @return array   array of page orientations
-   * @access public
    */
   public static function getPageOrientations() {
     return array(
@@ -115,7 +114,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
    * @param void
    *
    * @return array   array of measurement units
-   * @access public
    */
   public static function getUnits() {
     return array(
@@ -132,7 +130,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
    * @param void
    *
    * @return int  Group ID (null if Group ID doesn't exist)
-   * @access private
    */
   private static function _getGid() {
     if (!self::$_gid) {
@@ -147,14 +144,14 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Add ordering fields to Page Format list
    *
-   * @param array (reference)   $list         List of PDF Page Formats
-   * @param string              $returnURL    URL of page calling this function
+   * @param array (reference) $list List of PDF Page Formats
+   * @param string $returnURL
+   *   URL of page calling this function.
    *
    * @return void
    * @static
-   * @access public
    */
-  static function addOrder(&$list, $returnURL) {
+  public static function addOrder(&$list, $returnURL) {
     $filter = "option_group_id = " . self::_getGid();
     CRM_Utils_Weight::addOrder($list, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
   }
@@ -162,13 +159,13 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Get list of PDF Page Formats.
    *
-   * @param bool    $namesOnly    return simple list of names
+   * @param bool $namesOnly
+   *   Return simple list of names.
    *
    * @return array  (reference)   PDF Page Format list
    * @static
-   * @access public
    */
-  static function &getList($namesOnly = FALSE) {
+  public static function &getList($namesOnly = FALSE) {
     static $list = array();
     if (self::_getGid()) {
       // get saved PDF Page Formats from Option Value table
@@ -196,9 +193,8 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
    *
    * @return array   Name/value pairs containing the default PDF Page Format values.
    * @static
-   * @access public
    */
-  static function &getDefaultValues() {
+  public static function &getDefaultValues() {
     $params = array('is_active' => 1, 'is_default' => 1);
     $defaults = array();
     if (!self::retrieve($params, $defaults)) {
@@ -217,13 +213,14 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Get PDF Page Format from the DB
    *
-   * @param string $field   Field name to search by
-   * @param int    $val     Field value to search for
+   * @param string $field
+   *   Field name to search by.
+   * @param int $val
+   *   Field value to search for.
    *
    * @return array  $values (reference) associative array of name/value pairs
-   * @access public
    */
-  static function &getPdfFormat($field, $val) {
+  public static function &getPdfFormat($field, $val) {
     $params = array('is_active' => 1, $field => $val);
     $pdfFormat = array();
     if (self::retrieve($params, $pdfFormat)) {
@@ -237,41 +234,41 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Get PDF Page Format by Name
    *
-   * @param int    $name   PDF Page Format name. Empty = get default PDF Page Format
+   * @param int $name
+   *   PDF Page Format name. Empty = get default PDF Page Format.
    *
    * @return array  $values (reference) associative array of name/value pairs
-   * @access public
    */
-  static function &getByName($name) {
+  public static function &getByName($name) {
     return self::getPdfFormat('name', $name);
   }
 
   /**
    * Get PDF Page Format by ID
    *
-   * @param int    $id   PDF Page Format id. 0 = get default PDF Page Format
+   * @param int $id
+   *   PDF Page Format id. 0 = get default PDF Page Format.
    *
    * @return array  $values (reference) associative array of name/value pairs
-   * @access public
    */
-  static function &getById($id) {
+  public static function &getById($id) {
     return self::getPdfFormat('id', $id);
   }
 
   /**
    * Get PDF Page Format field from associative array
    *
-   * @param string $field name of a PDF Page Format field
+   * @param string $field
+   *   Name of a PDF Page Format field.
    * @param array (reference) $values associative array of name/value pairs containing
    *                                           PDF Page Format field selections
    *
    * @param null $default
    *
    * @return value
-   * @access public
    * @static
    */
-  static function getValue($field, &$values, $default = NULL) {
+  public static function getValue($field, &$values, $default = NULL) {
     if (array_key_exists($field, self::$optionValueFields)) {
       switch (self::$optionValueFields[$field]['type']) {
         case CRM_Utils_Type::T_INT:
@@ -295,14 +292,15 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
    * retrieves the relevant objects. Typically the valid params are only
    * format id. It also stores all the retrieved values in the default array.
    *
-   * @param array $params   (reference ) an assoc array of name/value pairs
-   * @param array $values   (reference ) an assoc array to hold the flattened values
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
+   * @param array $values
+   *   (reference ) an assoc array to hold the flattened values.
    *
    * @return CRM_Core_DAO_OptionValue object
-   * @access public
    * @static
    */
-  static function retrieve(&$params, &$values) {
+  public static function retrieve(&$params, &$values) {
     $optionValue = new CRM_Core_DAO_OptionValue();
     $optionValue->copyValues($params);
     $optionValue->option_group_id = self::_getGid();
@@ -331,13 +329,13 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Save the PDF Page Format in the DB
    *
-   * @param array (reference)   $values    associative array of name/value pairs
-   * @param int                 $id        id of the database record (null = new record)
+   * @param array (reference) $values associative array of name/value pairs
+   * @param int $id
+   *   Id of the database record (null = new record).
    *
    * @return void
-   * @access public
    */
-  function savePdfFormat(&$values, $id = NULL) {
+  public function savePdfFormat(&$values, $id = NULL) {
     // get the Option Group ID for PDF Page Formats (create one if it doesn't exist)
     $group_id = self::_getGid();
 
@@ -387,12 +385,12 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Delete a PDF Page Format
    *
-   * @param  int  $id     ID of the PDF Page Format to be deleted.
+   * @param int $id
+   *   ID of the PDF Page Format to be deleted.
    *
-   * @access public
    * @static
    */
-  static function del($id) {
+  public static function del($id) {
     if ($id) {
       $dao = new CRM_Core_DAO_OptionValue();
       $dao->id = $id;
@@ -408,4 +406,3 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
     CRM_Core_Error::fatal(ts('Invalid value passed to delete function.'));
   }
 }
-