X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FCommunityMessages.php;h=17f3e077ef8465598f4ff3c6ce56c9ffc202ea05;hb=172a3c1961127d07ce1c5d40a540272c16e6b2b4;hp=fb71592b1ed219c923b60e48c38ddea839a677d9;hpb=1024e1784fb68b8529a77143f5191a60d70837cf;p=civicrm-core.git diff --git a/CRM/Core/CommunityMessages.php b/CRM/Core/CommunityMessages.php index fb71592b1e..17f3e077ef 100644 --- a/CRM/Core/CommunityMessages.php +++ b/CRM/Core/CommunityMessages.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | 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 | +--------------------------------------------------------------------+ -*/ + */ /** * Manage the download, validation, and rendering of community messages @@ -34,7 +34,7 @@ class CRM_Core_CommunityMessages { const DEFAULT_PERMISSION = 'administer CiviCRM'; /** - * Default time to wait before retrying + * Default time to wait before retrying. */ const DEFAULT_RETRY = 7200; // 2 hours @@ -54,7 +54,7 @@ class CRM_Core_CommunityMessages { protected $messagesUrl; /** - * Create default instance + * Create default instance. * * @return CRM_Core_CommunityMessages */ @@ -127,9 +127,10 @@ class CRM_Core_CommunityMessages { } /** - * Download document from URL and parse as JSON + * 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()); @@ -160,7 +161,7 @@ class CRM_Core_CommunityMessages { } /** - * Pick a message to display + * Pick a message to display. * * @return NULL|array */ @@ -223,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'])) {