Skip to content

Commit 8f966c5

Browse files
authored
Merge pull request #66 from RyanDaDeng/analysis-7ay662
Apply fixes from StyleCI
2 parents 5d2938b + a307d72 commit 8f966c5

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

resources/lang/en/messages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
'ERROR_SCORE_THRESHOLD' => 'Score does not meet threshold.',
99
'ERROR_TIMEOUT' => 'Timeout',
1010
'SUCCESS' => 'Successfully passed.',
11-
'TIMEOUT_OR_DUPLICATE'=> 'The action is timeout.'
11+
'TIMEOUT_OR_DUPLICATE'=> 'The action is timeout.',
1212
];

resources/lang/lv/messages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
'ERROR_SCORE_THRESHOLD' => 'Vērtējums neatbilst minimālajam slieksnim.',
99
'ERROR_TIMEOUT' => 'Noildze',
1010
'SUCCESS' => 'Veiksmīgi apstiprināts.',
11-
'TIMEOUT_OR_DUPLICATE'=> 'Noildze'
11+
'TIMEOUT_OR_DUPLICATE'=> 'Noildze',
1212
];

resources/lang/ru/messages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
'ERROR_SCORE_THRESHOLD' => 'Оценка не соответствует пороговому значению.',
99
'ERROR_TIMEOUT' => 'Тайм-аут',
1010
'SUCCESS' => 'Проверка успешно пройдена.',
11-
'TIMEOUT_OR_DUPLICATE' => 'Тайм-аут'
11+
'TIMEOUT_OR_DUPLICATE' => 'Тайм-аут',
1212
];

src/Services/GoogleReCaptchaV3Service.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function ifInSkippedIps($ip)
4444
*/
4545
public function verifyResponse($response, $ip = null)
4646
{
47-
if (!$this->config->isServiceEnabled() || ($ip && $this->ifInSkippedIps($ip)) === true) {
47+
if (! $this->config->isServiceEnabled() || ($ip && $this->ifInSkippedIps($ip)) === true) {
4848
$res = new GoogleReCaptchaV3Response([], $ip);
4949
$res->setSuccess(true);
5050

@@ -77,14 +77,15 @@ public function verifyResponse($response, $ip = null)
7777

7878
if ($rawResponse->getMessage() === 'timeout-or-duplicate') {
7979
$rawResponse->setMessage(Lang::get(GoogleReCaptchaV3Response::TIMEOUT_OR_DUPLICATE));
80+
8081
return $rawResponse;
8182
}
8283

8384
if ($rawResponse->isSuccess() === false) {
8485
return $rawResponse;
8586
}
8687

87-
if (!empty($this->config->getHostName()) && strcasecmp($this->config->getHostName(), $rawResponse->getHostname()) !== 0) {
88+
if (! empty($this->config->getHostName()) && strcasecmp($this->config->getHostName(), $rawResponse->getHostname()) !== 0) {
8889
$rawResponse->setMessage(Lang::get(GoogleReCaptchaV3Response::ERROR_HOSTNAME));
8990
$rawResponse->setSuccess(false);
9091

0 commit comments

Comments
 (0)