Permalink
Browse files

Fix coding conventions (line length)

  • Loading branch information...
1 parent 227f9d6 commit 8bc8ee15322f66e7973d190b548a5e2b22a322d8 @chillu committed Oct 16, 2012
Showing with 16 additions and 6 deletions.
  1. +13 −5 code/RecaptchaField.php
  2. +3 −1 code/RecaptchaProtector.php
@@ -16,7 +16,8 @@
* i18n::set_locale('de_DE');
* </example>
*
- * @todo Does NOT work when the form is submitted via ajax, see http://recaptcha.net/apidocs/captcha/client.html for details on implementation.
+ * @todo Does NOT work when the form is submitted via ajax,
+ * see http://recaptcha.net/apidocs/captcha/client.html for details on implementation.
*
* @see http://recaptcha.net
* @see http://recaptcha.net/api/getkey
@@ -251,7 +252,8 @@ public function validate($validator) {
_t(
'RecaptchaField.EMPTY',
"Please answer the captcha question",
- "Recaptcha (http://recaptcha.net) provides two words in an image, and expects a user to type them in a textfield"
+ "Recaptcha (http://recaptcha.net) provides two words in an image, "
+ . "and expects a user to type them in a textfield"
),
"validation",
false
@@ -260,14 +262,19 @@ public function validate($validator) {
return false;
}
- $response = $this->recaptchaHTTPPost($_REQUEST['recaptcha_challenge_field'], $_REQUEST['recaptcha_response_field']);
+ $response = $this->recaptchaHTTPPost(
+ $_REQUEST['recaptcha_challenge_field'],
+ $_REQUEST['recaptcha_response_field']
+ );
+
if(!$response) {
$validator->validationError(
$this->name,
_t(
'RecaptchaField.NORESPONSE',
"The recaptcha service gave no response. Please try again later.",
- "Recaptcha (http://recaptcha.net) provides two words in an image, and expects a user to type them in a textfield"
+ "Recaptcha (http://recaptcha.net) provides two words in an image, "
+ . "and expects a user to type them in a textfield"
),
"validation",
false
@@ -293,7 +300,8 @@ public function validate($validator) {
_t(
'RecaptchaField.VALIDSOLUTION',
"Your answer didn't match the captcha words, please try again",
- "Recaptcha (http://recaptcha.net) provides two words in an image, and expects a user to type them in a textfield"
+ "Recaptcha (http://recaptcha.net) provides two words in an image, "
+ . "and expects a user to type them in a textfield"
),
"validation",
false
@@ -13,7 +13,9 @@ class RecaptchaProtector implements SpamProtector {
*
* @return string
*/
- function getFormField($name = "RecaptchaField", $title = "Captcha", $value = null, $form = null, $rightTitle = null) {
+ function getFormField($name = "RecaptchaField", $title = "Captcha",
+ $value = null, $form = null, $rightTitle = null
+ ) {
return new RecaptchaField($name, $title, $value, $form, $rightTitle);
}

0 comments on commit 8bc8ee1

Please sign in to comment.