Merge pull request #3602 from yashodha/CRM-14629
[civicrm-core.git] / CRM / Core / PseudoConstant.php
index febe9249c3880b0a2afa669ce20cb5464e448d39..a93e07f59e0265a9cbc897ee223c4f9e8ab9c925 100644 (file)
@@ -599,8 +599,7 @@ class CRM_Core_PseudoConstant {
    * @access public
    * @static
    *
-   * @param boolean $name pseudoconstant to be flushed
-   *
+   * @param bool|string $name pseudoconstant to be flushed
    */
   public static function flush($name = 'cache') {
     if (isset(self::$$name)) {
@@ -618,7 +617,7 @@ class CRM_Core_PseudoConstant {
    *
    * The static array activityType is returned
    *
-   * @param boolean $all - get All Activity  types - default is to get only active ones.
+   * @internal param bool $all - get All Activity  types - default is to get only active ones.
    *
    * @access public
    * @static
@@ -698,10 +697,11 @@ class CRM_Core_PseudoConstant {
    * @access public
    * @static
    *
-   * @param int $id -  Optional id to return
+   * @param bool|int $id -  Optional id to return
    *
-   * @return array - array reference of all State/Provinces.
+   * @param bool $limit
    *
+   * @return array - array reference of all State/Provinces.
    */
   public static function &stateProvince($id = FALSE, $limit = TRUE) {
     if (($id && !CRM_Utils_Array::value($id, self::$stateProvince)) || !self::$stateProvince || !$id) {
@@ -753,7 +753,9 @@ class CRM_Core_PseudoConstant {
    * @access public
    * @static
    *
-   * @param int $id  -     Optional id to return
+   * @param bool|int $id -     Optional id to return
+   *
+   * @param bool $limit
    *
    * @return array - array reference of all State/Province abbreviations.
    */
@@ -819,10 +821,11 @@ WHERE  id = %1";
    * @access public
    * @static
    *
-   * @param int $id - Optional id to return
+   * @param bool|int $id - Optional id to return
    *
-   * @return array - array reference of all countries.
+   * @param bool $applyLimit
    *
+   * @return array - array reference of all countries.
    */
   public static function country($id = FALSE, $applyLimit = TRUE) {
     if (($id && !CRM_Utils_Array::value($id, self::$country)) || !self::$country || !$id) {
@@ -896,8 +899,9 @@ WHERE  id = %1";
    * @access public
    * @static
    *
-   * @return array - array reference of all country ISO codes.
+   * @param bool $id
    *
+   * @return array - array reference of all country ISO codes.
    */
   public static function &countryIsoCode($id = FALSE) {
     if (!self::$countryIsoCode) {
@@ -925,14 +929,13 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @param string $groupType     type of group(Access/Mailing)
-   * @param boolen $excludeHidden exclude hidden groups.
+   * @param string $groupType type of group(Access/Mailing)
+   * @param bool|\boolen $excludeHidden exclude hidden groups.
    *
    * @access public
    * @static
    *
    * @return array - array reference of all groups.
-   *
    */
   public static function &allGroup($groupType = NULL, $excludeHidden = TRUE) {
     $condition = CRM_Contact_BAO_Group::groupTypeCondition($groupType, $excludeHidden);
@@ -961,8 +964,9 @@ WHERE  id = %1";
    * @access public
    * @static
    *
-   * @return mixed - instance of CRM_Contact_BAO_GroupNesting
+   * @param bool $styledLabels
    *
+   * @return mixed - instance of CRM_Contact_BAO_GroupNesting
    */
   public static function &groupIterator($styledLabels = FALSE) {
     if (!self::$groupIterator) {
@@ -986,14 +990,13 @@ WHERE  id = %1";
    *
    * Note: any database errors will be trapped by the DAO.
    *
-   * @param string $groupType     type of group(Access/Mailing)
-   * @param boolen $excludeHidden exclude hidden groups.
-
+   * @param string $groupType type of group(Access/Mailing)
+   * @param bool|\boolen $excludeHidden exclude hidden groups.
+   *
    * @access public
    * @static
    *
    * @return array - array reference of all groups.
-   *
    */
   public static function group($groupType = NULL, $excludeHidden = TRUE) {
     return CRM_Core_Permission::group($groupType, $excludeHidden);
@@ -1011,8 +1014,11 @@ WHERE  id = %1";
    * @access public
    * @static
    *
-   * @return array - array reference of all groups.
+   * @param bool $onlyPublic
+   * @param null $groupType
+   * @param bool $excludeHidden
    *
+   * @return array - array reference of all groups.
    */
   public static function &staticGroup($onlyPublic = FALSE, $groupType = NULL, $excludeHidden = TRUE) {
     if (!self::$staticGroup) {
@@ -1543,6 +1549,12 @@ WHERE  id = %1";
     return self::$visibility[$column];
   }
 
+  /**
+   * @param $countryID
+   * @param string $field
+   *
+   * @return array
+   */
   public static function &stateProvinceForCountry($countryID, $field = 'name') {
     static $_cache = NULL;
 
@@ -1592,6 +1604,11 @@ ORDER BY name";
     return $result;
   }
 
+  /**
+   * @param $stateID
+   *
+   * @return array
+   */
   public static function &countyForState($stateID) {
     if (is_array($stateID)) {
       $states = implode(", ", $stateID);