Civi\Angular - Docblock improvements.
[civicrm-core.git] / CRM / Utils / ReCAPTCHA.php
index 213f7e60bb9bd4442341f65d46d91d24eb4a4dab..2d48759f59c23d8cc3f0185ed9106b576f4c65a7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -47,20 +47,16 @@ class CRM_Utils_ReCAPTCHA {
    * pattern and cache the instance in this variable
    *
    * @var object
-   * @static
    */
   static private $_singleton = NULL;
 
   /**
    * Singleton function used to manage this object
    *
-   * @param string the key to permit session scope's
    *
    * @return object
-   * @static
-   *
    */
-  static function &singleton() {
+  public static function &singleton() {
     if (self::$_singleton === NULL) {
       self::$_singleton = new CRM_Utils_ReCAPTCHA();
     }
@@ -68,19 +64,18 @@ class CRM_Utils_ReCAPTCHA {
   }
 
   /**
-   *
    */
-  function __construct() {}
+  public function __construct() {
+  }
 
   /**
    * Add element to form
-   *
    */
-  static function add(&$form) {
-    $error  = NULL;
+  public static function add(&$form) {
+    $error = NULL;
     $config = CRM_Core_Config::singleton();
     $useSSL = FALSE;
-    if ( !function_exists( 'recaptcha_get_html' ) ) {
+    if (!function_exists('recaptcha_get_html')) {
       require_once 'packages/recaptcha/recaptchalib.php';
     }
 
@@ -120,7 +115,7 @@ class CRM_Utils_ReCAPTCHA {
    *
    * @return mixed
    */
-  static function validate($value, $form) {
+  public static function validate($value, $form) {
     $config = CRM_Core_Config::singleton();
 
     $resp = recaptcha_check_answer($config->recaptchaPrivateKey,
@@ -130,5 +125,5 @@ class CRM_Utils_ReCAPTCHA {
     );
     return $resp->is_valid;
   }
-}
 
+}