Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit 96f6391

Browse files
committed
Fix code style
1 parent 0fe1176 commit 96f6391

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/Form/Type/EWZRecaptchaType.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class EWZRecaptchaType extends AbstractType
1919
*
2020
* @var string
2121
*/
22-
protected $RECAPTCHA_API_SERVER;
22+
protected $recaptchaApiServer;
2323

2424
/**
2525
* The reCAPTCHA JS server URL.
2626
*
2727
* @var string
2828
*/
29-
protected $RECAPTCHA_API_JS_SERVER;
29+
protected $recaptchaApiJsServer;
3030

3131
/**
3232
* The public key.
@@ -67,15 +67,15 @@ class EWZRecaptchaType extends AbstractType
6767
* @param bool $ajax Ajax status
6868
* @param LocaleResolver $localeResolver
6969
*/
70-
public function __construct($publicKey, $enabled, $ajax, LocaleResolver $localeResolver, $apiHost='www.google.com')
70+
public function __construct($publicKey, $enabled, $ajax, LocaleResolver $localeResolver, $apiHost = 'www.google.com')
7171
{
7272
$this->publicKey = $publicKey;
7373
$this->enabled = $enabled;
7474
$this->ajax = $ajax;
7575
$this->apiHost = $apiHost;
7676
$this->localeResolver = $localeResolver;
77-
$this->RECAPTCHA_API_JS_SERVER = '//'.$apiHost.'/recaptcha/api/js/recaptcha_ajax.js';
78-
$this->RECAPTCHA_API_SERVER = 'https://'.$apiHost.'/recaptcha/api.js';
77+
$this->recaptchaApiJsServer = sprintf('//%s/recaptcha/api/js/recaptcha_ajax.js', $apiHost);
78+
$this->recaptchaApiServer = sprintf('https://%s/recaptcha/api.js', $apiHost);
7979
}
8080

8181
/**
@@ -99,12 +99,12 @@ public function buildView(FormView $view, FormInterface $form, array $options)
9999

100100
if (!$this->ajax) {
101101
$view->vars = array_replace($view->vars, array(
102-
'url_challenge' => sprintf('%s?hl=%s', $this->RECAPTCHA_API_SERVER, $options['language']),
102+
'url_challenge' => sprintf('%s?hl=%s', $this->recaptchaApiServer, $options['language']),
103103
'public_key' => $this->publicKey,
104104
));
105105
} else {
106106
$view->vars = array_replace($view->vars, array(
107-
'url_api' => $this->RECAPTCHA_API_JS_SERVER,
107+
'url_api' => $this->recaptchaApiJsServer,
108108
'public_key' => $this->publicKey,
109109
));
110110
}

src/Validator/Constraints/IsTrueValidator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class IsTrueValidator extends ConstraintValidator
6464
*
6565
* @var string
6666
*/
67-
protected $RECAPTCHA_VERIFY_SERVER;
67+
protected $recaptchaVerifyServer;
6868

6969
/**
7070
* @param bool $enabled
@@ -83,7 +83,7 @@ public function __construct(
8383
$verifyHost,
8484
AuthorizationCheckerInterface $authorizationChecker = null,
8585
array $trusted_roles = array(),
86-
$apiHost='www.google.com')
86+
$apiHost = 'www.google.com')
8787
{
8888
$this->enabled = $enabled;
8989
$this->privateKey = $privateKey;
@@ -92,7 +92,7 @@ public function __construct(
9292
$this->verifyHost = $verifyHost;
9393
$this->authorizationChecker = $authorizationChecker;
9494
$this->trusted_roles = $trusted_roles;
95-
$this->RECAPTCHA_VERIFY_SERVER = 'https://'.$apiHost;
95+
$this->recaptchaVerifyServer = 'https://'.$apiHost;
9696
}
9797

9898
/**
@@ -149,7 +149,7 @@ private function checkAnswer($privateKey, $remoteip, $answer)
149149
return false;
150150
}
151151

152-
$response = $this->httpGet($this->RECAPTCHA_VERIFY_SERVER, '/recaptcha/api/siteverify', array(
152+
$response = $this->httpGet($this->recaptchaVerifyServer, '/recaptcha/api/siteverify', array(
153153
'secret' => $privateKey,
154154
'remoteip' => $remoteip,
155155
'response' => $answer,

0 commit comments

Comments
 (0)