a few comment fixes
[civicrm-core.git] / CRM / Core / CommunityMessages.php
index 887f4c13f8619dc6b50be68bb8ed0c3aebd20688..3db82150985c3c7f48c2dab0bb60a21130697d19 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * Manage the download, validation, and rendering of community messages
@@ -71,6 +71,7 @@ class CRM_Core_CommunityMessages {
   /**
    * @param CRM_Utils_Cache_Interface $cache
    * @param CRM_Utils_HttpClient $client
+   * @param null $messagesUrl
    */
   public function __construct($cache, $client, $messagesUrl = NULL) {
     $this->cache = $cache;
@@ -128,7 +129,8 @@ class CRM_Core_CommunityMessages {
   /**
    * Download document from URL and parse as JSON
    *
-   * @return NULL|array parsed JSON
+   * @return NULL|array
+   *   parsed JSON
    */
   public function fetchDocument() {
     list($status, $json) = $this->client->get($this->getRenderedUrl());
@@ -222,10 +224,10 @@ class CRM_Core_CommunityMessages {
    * @return bool
    */
   public function validateDocument($document) {
-    if (!isset($document['ttl']) || !is_integer($document['ttl'])) {
+    if (!isset($document['ttl']) || !is_int($document['ttl'])) {
       return FALSE;
     }
-    if (!isset($document['retry']) || !is_integer($document['retry'])) {
+    if (!isset($document['retry']) || !is_int($document['retry'])) {
       return FALSE;
     }
     if (!isset($document['messages']) || !is_array($document['messages'])) {