Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 513dd16

Browse files
committedJan 9, 2025
Modernize to PHP 8.4
1 parent c775e26 commit 513dd16

9 files changed

+112
-222
lines changed
 

‎src/ReCaptcha/ReCaptcha.php

+25-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -43,7 +44,7 @@ class ReCaptcha
4344
* Version of this client library.
4445
* @const string
4546
*/
46-
public const VERSION = 'php_1.3.0';
47+
public const VERSION = 'php_2.0.0';
4748

4849
/**
4950
* URL for reCAPTCHA siteverify API
@@ -115,28 +116,28 @@ class ReCaptcha
115116
* Shared secret for the site.
116117
* @var string
117118
*/
118-
private $secret;
119+
private string $secret;
119120

120121
/**
121122
* Method used to communicate with service. Defaults to POST request.
122123
* @var RequestMethod
123124
*/
124-
private $requestMethod;
125+
private ?RequestMethod $requestMethod;
125126

126-
private $hostname;
127-
private $apkPackageName;
128-
private $action;
129-
private $threshold;
130-
private $timeoutSeconds;
127+
private string $hostname;
128+
private string $apkPackageName;
129+
private string $action;
130+
private float $threshold;
131+
private int $timeoutSeconds;
131132

132133
/**
133134
* Create a configured instance to use the reCAPTCHA service.
134135
*
135136
* @param string $secret The shared key between your site and reCAPTCHA.
136-
* @param RequestMethod $requestMethod method used to send the request. Defaults to POST.
137+
* @param ?RequestMethod $requestMethod method used to send the request. Defaults to POST.
137138
* @throws \RuntimeException if $secret is invalid
138139
*/
139-
public function __construct($secret, ?RequestMethod $requestMethod = null)
140+
public function __construct(string $secret, ?RequestMethod $requestMethod = null)
140141
{
141142
if (empty($secret)) {
142143
throw new \RuntimeException('No secret provided');
@@ -156,20 +157,21 @@ public function __construct($secret, ?RequestMethod $requestMethod = null)
156157
*
157158
* @param string $response The user response token provided by reCAPTCHA, verifying the user on your site.
158159
* @param string $remoteIp The end user's IP address.
160+
*
159161
* @return Response Response from the service.
160162
*/
161-
public function verify(string $response, ?string $remoteIp = null)
163+
public function verify(string $response, ?string $remoteIp = null): Response
162164
{
163165
// Discard empty solution submissions
164166
if (empty($response)) {
165-
$recaptchaResponse = new Response(false, array(self::E_MISSING_INPUT_RESPONSE));
167+
$recaptchaResponse = new Response(false, [self::E_MISSING_INPUT_RESPONSE]);
166168
return $recaptchaResponse;
167169
}
168170

169171
$params = new RequestParameters($this->secret, $response, $remoteIp, self::VERSION);
170172
$rawResponse = $this->requestMethod->submit($params);
171173
$initialResponse = Response::fromJson($rawResponse);
172-
$validationErrors = array();
174+
$validationErrors = [];
173175

174176
if (isset($this->hostname) && strcasecmp($this->hostname, $initialResponse->getHostname()) !== 0) {
175177
$validationErrors[] = self::E_HOSTNAME_MISMATCH;
@@ -215,23 +217,23 @@ public function verify(string $response, ?string $remoteIp = null)
215217
* This should be without a protocol or trailing slash, e.g. www.google.com
216218
*
217219
* @param string $hostname Expected hostname
218-
* @return ReCaptcha Current instance for fluent interface
219220
*/
220-
public function setExpectedHostname(string $hostname)
221+
public function setExpectedHostname(string $hostname): static
221222
{
222223
$this->hostname = $hostname;
224+
223225
return $this;
224226
}
225227

226228
/**
227229
* Provide an APK package name to match against in verify()
228230
*
229231
* @param string $apkPackageName Expected APK package name
230-
* @return ReCaptcha Current instance for fluent interface
231232
*/
232-
public function setExpectedApkPackageName(string $apkPackageName)
233+
public function setExpectedApkPackageName(string $apkPackageName): static
233234
{
234235
$this->apkPackageName = $apkPackageName;
236+
235237
return $this;
236238
}
237239

@@ -240,11 +242,11 @@ public function setExpectedApkPackageName(string $apkPackageName)
240242
* This should be set per page.
241243
*
242244
* @param string $action Expected action
243-
* @return ReCaptcha Current instance for fluent interface
244245
*/
245-
public function setExpectedAction(string $action)
246+
public function setExpectedAction(string $action): static
246247
{
247248
$this->action = $action;
249+
248250
return $this;
249251
}
250252

@@ -253,23 +255,23 @@ public function setExpectedAction(string $action)
253255
* Threshold should be a float between 0 and 1 which will be tested as response >= threshold.
254256
*
255257
* @param float $threshold Expected threshold
256-
* @return ReCaptcha Current instance for fluent interface
257258
*/
258-
public function setScoreThreshold(float $threshold)
259+
public function setScoreThreshold(float $threshold): static
259260
{
260261
$this->threshold = floatval($threshold);
262+
261263
return $this;
262264
}
263265

264266
/**
265267
* Provide a timeout in seconds to test against the challenge timestamp in verify()
266268
*
267269
* @param int $timeoutSeconds Expected hostname
268-
* @return ReCaptcha Current instance for fluent interface
269270
*/
270-
public function setChallengeTimeout(int $timeoutSeconds)
271+
public function setChallengeTimeout(int $timeoutSeconds): static
271272
{
272273
$this->timeoutSeconds = $timeoutSeconds;
274+
273275
return $this;
274276
}
275277
}

‎src/ReCaptcha/RequestMethod.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -45,5 +46,5 @@ interface RequestMethod
4546
* @param RequestParameters $params Request parameters
4647
* @return string Body of the reCAPTCHA response
4748
*/
48-
public function submit(RequestParameters $params);
49+
public function submit(RequestParameters $params): string;
4950
}

‎src/ReCaptcha/RequestMethod/Curl.php

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -41,8 +42,8 @@ class Curl
4142
{
4243
/**
4344
* @see http://php.net/curl_init
44-
* @param string $url
45-
* @return resource cURL handle
45+
*
46+
* @return resource cURL handle *
4647
*/
4748
public function init(?string $url = null)
4849
{
@@ -52,20 +53,17 @@ public function init(?string $url = null)
5253
/**
5354
* @see http://php.net/curl_setopt_array
5455
* @param resource $ch
55-
* @param array $options
56-
* @return bool
5756
*/
58-
public function setoptArray($ch, array $options)
57+
public function setoptArray($ch, array $options): bool
5958
{
6059
return curl_setopt_array($ch, $options);
6160
}
6261

6362
/**
6463
* @see http://php.net/curl_exec
6564
* @param resource $ch
66-
* @return mixed
6765
*/
68-
public function exec($ch)
66+
public function exec($ch): mixed
6967
{
7068
return curl_exec($ch);
7169
}
@@ -74,7 +72,7 @@ public function exec($ch)
7472
* @see http://php.net/curl_close
7573
* @param resource $ch
7674
*/
77-
public function close($ch)
75+
public function close($ch): void
7876
{
7977
curl_close($ch);
8078
}

‎src/ReCaptcha/RequestMethod/CurlPost.php

+16-22
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -45,51 +46,44 @@
4546
*/
4647
class CurlPost implements RequestMethod
4748
{
48-
/**
49-
* Curl connection to the reCAPTCHA service
50-
* @var Curl
51-
*/
52-
private $curl;
53-
54-
/**
55-
* URL for reCAPTCHA siteverify API
56-
* @var string
57-
*/
58-
private $siteVerifyUrl;
59-
6049
/**
6150
* Only needed if you want to override the defaults
6251
*
63-
* @param Curl $curl Curl resource
64-
* @param string $siteVerifyUrl URL for reCAPTCHA siteverify API
52+
* @param ?Curl $curl Curl connection to the reCAPTCHA service
53+
* @param ?string $siteVerifyUrl URL for reCAPTCHA siteverify API
6554
*/
66-
public function __construct(?Curl $curl = null, ?string $siteVerifyUrl = null)
55+
public function __construct(private ?Curl $curl = null, private ?string $siteVerifyUrl = null)
6756
{
68-
$this->curl = (is_null($curl)) ? new Curl() : $curl;
69-
$this->siteVerifyUrl = (is_null($siteVerifyUrl)) ? ReCaptcha::SITE_VERIFY_URL : $siteVerifyUrl;
57+
if (is_null($curl)) {
58+
$this->curl = new Curl();
59+
}
60+
if (is_null($siteVerifyUrl)) {
61+
$this->siteVerifyUrl = ReCaptcha::SITE_VERIFY_URL;
62+
}
7063
}
7164

7265
/**
7366
* Submit the cURL request with the specified parameters.
7467
*
7568
* @param RequestParameters $params Request parameters
69+
*
7670
* @return string Body of the reCAPTCHA response
7771
*/
78-
public function submit(RequestParameters $params)
72+
public function submit(RequestParameters $params): string
7973
{
8074
$handle = $this->curl->init($this->siteVerifyUrl);
8175

82-
$options = array(
76+
$options = [
8377
CURLOPT_POST => true,
8478
CURLOPT_POSTFIELDS => $params->toQueryString(),
85-
CURLOPT_HTTPHEADER => array(
79+
CURLOPT_HTTPHEADER => [
8680
'Content-Type: application/x-www-form-urlencoded'
87-
),
81+
],
8882
CURLINFO_HEADER_OUT => false,
8983
CURLOPT_HEADER => false,
9084
CURLOPT_RETURNTRANSFER => true,
9185
CURLOPT_SSL_VERIFYPEER => true
92-
);
86+
];
9387
$this->curl->setoptArray($handle, $options);
9488

9589
$response = $this->curl->exec($handle);

‎src/ReCaptcha/RequestMethod/Post.php

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -43,43 +44,40 @@
4344
*/
4445
class Post implements RequestMethod
4546
{
46-
/**
47-
* URL for reCAPTCHA siteverify API
48-
* @var string
49-
*/
50-
private $siteVerifyUrl;
51-
5247
/**
5348
* Only needed if you want to override the defaults
5449
*
5550
* @param string $siteVerifyUrl URL for reCAPTCHA siteverify API
5651
*/
57-
public function __construct(?string $siteVerifyUrl = null)
52+
public function __construct(private ?string $siteVerifyUrl = null)
5853
{
59-
$this->siteVerifyUrl = (is_null($siteVerifyUrl)) ? ReCaptcha::SITE_VERIFY_URL : $siteVerifyUrl;
54+
if (is_null($siteVerifyUrl)) {
55+
$this->siteVerifyUrl = ReCaptcha::SITE_VERIFY_URL;
56+
}
6057
}
6158

6259
/**
6360
* Submit the POST request with the specified parameters.
6461
*
6562
* @param RequestParameters $params Request parameters
63+
*
6664
* @return string Body of the reCAPTCHA response
6765
*/
68-
public function submit(RequestParameters $params)
66+
public function submit(RequestParameters $params): string
6967
{
70-
$options = array(
71-
'http' => array(
68+
$options = [
69+
'http' => [
7270
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
7371
'method' => 'POST',
7472
'content' => $params->toQueryString(),
7573
// Force the peer to validate (not needed in 5.6.0+, but still works)
7674
'verify_peer' => true,
77-
),
78-
);
75+
],
76+
];
7977
$context = stream_context_create($options);
8078
$response = file_get_contents($this->siteVerifyUrl, false, $context);
8179

82-
if ($response !== false) {
80+
if ($response) {
8381
return $response;
8482
}
8583

‎src/ReCaptcha/RequestMethod/Socket.php

+7-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -46,12 +47,8 @@ class Socket
4647
* fsockopen
4748
*
4849
* @see http://php.net/fsockopen
49-
* @param string $hostname
50-
* @param int $port
51-
* @param int $errno
52-
* @param string $errstr
53-
* @param float $timeout
54-
* @return resource
50+
*
51+
* @return resource|false
5552
*/
5653
public function fsockopen(string $hostname, int $port = -1, int &$errno = 0, string &$errstr = '', ?float $timeout = null)
5754
{
@@ -67,11 +64,8 @@ public function fsockopen(string $hostname, int $port = -1, int &$errno = 0, str
6764
* fwrite
6865
*
6966
* @see http://php.net/fwrite
70-
* @param string $string
71-
* @param int $length
72-
* @return int | bool
7367
*/
74-
public function fwrite(string $string, ?int $length = null)
68+
public function fwrite(string $string, ?int $length = null): int | bool
7569
{
7670
return fwrite($this->handle, $string, (is_null($length) ? strlen($string) : $length));
7771
}
@@ -80,10 +74,8 @@ public function fwrite(string $string, ?int $length = null)
8074
* fgets
8175
*
8276
* @see http://php.net/fgets
83-
* @param int $length
84-
* @return string
8577
*/
86-
public function fgets(?int $length = null)
78+
public function fgets(?int $length = null): string
8779
{
8880
return fgets($this->handle, $length);
8981
}
@@ -92,9 +84,8 @@ public function fgets(?int $length = null)
9284
* feof
9385
*
9486
* @see http://php.net/feof
95-
* @return bool
9687
*/
97-
public function feof()
88+
public function feof(): bool
9889
{
9990
return feof($this->handle);
10091
}
@@ -103,9 +94,8 @@ public function feof()
10394
* fclose
10495
*
10596
* @see http://php.net/fclose
106-
* @return bool
10797
*/
108-
public function fclose()
98+
public function fclose(): bool
10999
{
110100
return fclose($this->handle);
111101
}

‎src/ReCaptcha/RequestMethod/SocketPost.php

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -45,33 +46,30 @@
4546
*/
4647
class SocketPost implements RequestMethod
4748
{
48-
/**
49-
* Socket to the reCAPTCHA service
50-
* @var Socket
51-
*/
52-
private $socket;
53-
54-
private $siteVerifyUrl;
55-
5649
/**
5750
* Only needed if you want to override the defaults
5851
*
5952
* @param \ReCaptcha\RequestMethod\Socket $socket optional socket, injectable for testing
6053
* @param string $siteVerifyUrl URL for reCAPTCHA siteverify API
6154
*/
62-
public function __construct(?Socket $socket = null, ?string $siteVerifyUrl = null)
55+
public function __construct(private ?Socket $socket = null, private ?string $siteVerifyUrl = null)
6356
{
64-
$this->socket = (is_null($socket)) ? new Socket() : $socket;
65-
$this->siteVerifyUrl = (is_null($siteVerifyUrl)) ? ReCaptcha::SITE_VERIFY_URL : $siteVerifyUrl;
57+
if (is_null($socket)) {
58+
$this->socket = new Socket();
59+
}
60+
if (is_null($siteVerifyUrl)) {
61+
$this->siteVerifyUrl = ReCaptcha::SITE_VERIFY_URL;
62+
}
6663
}
6764

6865
/**
6966
* Submit the POST request with the specified parameters.
7067
*
7168
* @param RequestParameters $params Request parameters
69+
*
7270
* @return string Body of the reCAPTCHA response
7371
*/
74-
public function submit(RequestParameters $params)
72+
public function submit(RequestParameters $params): string
7573
{
7674
$errno = 0;
7775
$errstr = '';

‎src/ReCaptcha/RequestParameters.php

+9-36
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -39,54 +40,26 @@
3940
*/
4041
class RequestParameters
4142
{
42-
/**
43-
* The shared key between your site and reCAPTCHA.
44-
* @var string
45-
*/
46-
private $secret;
47-
48-
/**
49-
* The user response token provided by reCAPTCHA, verifying the user on your site.
50-
* @var string
51-
*/
52-
private $response;
53-
54-
/**
55-
* Remote user's IP address.
56-
* @var string
57-
*/
58-
private $remoteIp;
59-
60-
/**
61-
* Client version.
62-
* @var string
63-
*/
64-
private $version;
65-
6643
/**
6744
* Initialise parameters.
6845
*
69-
* @param string $secret Site secret.
70-
* @param string $response Value from g-captcha-response form field.
71-
* @param string $remoteIp User's IP address.
72-
* @param string $version Version of this client library.
46+
* @param string $secret The shared key between your site and reCAPTCHA
47+
* @param string $response The user response token provided by reCAPTCHA, verifying the user on your site.
48+
* @param ?string $remoteIp Remote user's IP address.
49+
* @param ?string $version Version of this client library.
7350
*/
74-
public function __construct(string $secret, string $response, ?string $remoteIp = null, ?string $version = null)
51+
public function __construct(private string $secret, private string $response, private ?string $remoteIp = null, private ?string $version = null)
7552
{
76-
$this->secret = $secret;
77-
$this->response = $response;
78-
$this->remoteIp = $remoteIp;
79-
$this->version = $version;
8053
}
8154

8255
/**
8356
* Array representation.
8457
*
8558
* @return array Array formatted parameters.
8659
*/
87-
public function toArray()
60+
public function toArray(): array
8861
{
89-
$params = array('secret' => $this->secret, 'response' => $this->response);
62+
$params = ['secret' => $this->secret, 'response' => $this->response];
9063

9164
if (!is_null($this->remoteIp)) {
9265
$params['remoteip'] = $this->remoteIp;
@@ -104,7 +77,7 @@ public function toArray()
10477
*
10578
* @return string Query string formatted parameters.
10679
*/
107-
public function toQueryString()
80+
public function toQueryString(): string
10881
{
10982
return http_build_query($this->toArray(), '', '&');
11083
}

‎src/ReCaptcha/Response.php

+25-89
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This is a PHP library that handles calling reCAPTCHA.
45
*
@@ -39,60 +40,15 @@
3940
*/
4041
class Response
4142
{
42-
/**
43-
* Success or failure.
44-
* @var boolean
45-
*/
46-
private $success = false;
47-
48-
/**
49-
* Error code strings.
50-
* @var array
51-
*/
52-
private $errorCodes = array();
53-
54-
/**
55-
* The hostname of the site where the reCAPTCHA was solved.
56-
* @var string
57-
*/
58-
private $hostname;
59-
60-
/**
61-
* Timestamp of the challenge load (ISO format yyyy-MM-dd'T'HH:mm:ssZZ)
62-
* @var string
63-
*/
64-
private $challengeTs;
65-
66-
/**
67-
* APK package name
68-
* @var string
69-
*/
70-
private $apkPackageName;
71-
72-
/**
73-
* Score assigned to the request
74-
* @var float
75-
*/
76-
private $score;
77-
78-
/**
79-
* Action as specified by the page
80-
* @var string
81-
*/
82-
private $action;
83-
8443
/**
8544
* Build the response from the expected JSON returned by the service.
86-
*
87-
* @param string $json
88-
* @return \ReCaptcha\Response
8945
*/
90-
public static function fromJson(string $json)
46+
public static function fromJson(string $json): Response
9147
{
9248
$responseData = json_decode($json, true);
9349

9450
if (!$responseData) {
95-
return new Response(false, array(ReCaptcha::E_INVALID_JSON));
51+
return new Response(false, [ReCaptcha::E_INVALID_JSON]);
9652
}
9753

9854
$hostname = isset($responseData['hostname']) ? $responseData['hostname'] : '';
@@ -102,117 +58,97 @@ public static function fromJson(string $json)
10258
$action = isset($responseData['action']) ? $responseData['action'] : '';
10359

10460
if (isset($responseData['success']) && $responseData['success'] == true) {
105-
return new Response(true, array(), $hostname, $challengeTs, $apkPackageName, $score, $action);
61+
return new Response(true, [], $hostname, $challengeTs, $apkPackageName, $score, $action);
10662
}
10763

10864
if (isset($responseData['error-codes']) && is_array($responseData['error-codes'])) {
10965
return new Response(false, $responseData['error-codes'], $hostname, $challengeTs, $apkPackageName, $score, $action);
11066
}
11167

112-
return new Response(false, array(ReCaptcha::E_UNKNOWN_ERROR), $hostname, $challengeTs, $apkPackageName, $score, $action);
68+
return new Response(false, [ReCaptcha::E_UNKNOWN_ERROR], $hostname, $challengeTs, $apkPackageName, $score, $action);
11369
}
11470

11571
/**
11672
* Constructor.
11773
*
118-
* @param boolean $success
119-
* @param string $hostname
120-
* @param string $challengeTs
121-
* @param string $apkPackageName
122-
* @param float $score
123-
* @param string $action
124-
* @param array $errorCodes
125-
*/
126-
public function __construct(bool $success, array $errorCodes = [], string $hostname = '', string $challengeTs = '', string $apkPackageName = '', ?float $score = null, string $action = '')
74+
* @param boolean $success Success or failure
75+
* @param string $hostname The hostname of the site where the reCAPTCHA was solved
76+
* @param string $challengeTs Timestamp of the challenge load (ISO format yyyy-MM-dd'T'HH:mm:ssZZ)
77+
* @param string $apkPackageName APK package name
78+
* @param ?float $score Score assigned to the request
79+
* @param string $action Action as specified by the page
80+
* @param array $errorCodes Error code strings.
81+
*/
82+
public function __construct(private bool $success, private array $errorCodes = [], private string $hostname = '', private string $challengeTs = '', private string $apkPackageName = '', private ?float $score = null, private string $action = '')
12783
{
128-
$this->success = $success;
129-
$this->hostname = $hostname;
130-
$this->challengeTs = $challengeTs;
131-
$this->apkPackageName = $apkPackageName;
132-
$this->score = $score;
133-
$this->action = $action;
134-
$this->errorCodes = $errorCodes;
13584
}
13685

13786
/**
13887
* Is success?
139-
*
140-
* @return boolean
14188
*/
142-
public function isSuccess()
89+
public function isSuccess(): bool
14390
{
14491
return $this->success;
14592
}
14693

14794
/**
14895
* Get error codes.
149-
*
150-
* @return array
15196
*/
152-
public function getErrorCodes()
97+
public function getErrorCodes(): array
15398
{
15499
return $this->errorCodes;
155100
}
156101

157102
/**
158103
* Get hostname.
159-
*
160-
* @return string
161104
*/
162-
public function getHostname()
105+
public function getHostname(): string
163106
{
164107
return $this->hostname;
165108
}
166109

167110
/**
168111
* Get challenge timestamp
169-
*
170-
* @return string
171112
*/
172-
public function getChallengeTs()
113+
public function getChallengeTs(): string
173114
{
174115
return $this->challengeTs;
175116
}
176117

177118
/**
178119
* Get APK package name
179-
*
180-
* @return string
181120
*/
182-
public function getApkPackageName()
121+
public function getApkPackageName(): string
183122
{
184123
return $this->apkPackageName;
185124
}
125+
186126
/**
187127
* Get score
188-
*
189-
* @return float
190128
*/
191-
public function getScore()
129+
public function getScore(): ?float
192130
{
193131
return $this->score;
194132
}
195133

196134
/**
197135
* Get action
198-
*
199-
* @return string
200136
*/
201-
public function getAction()
137+
public function getAction(): string
202138
{
203139
return $this->action;
204140
}
205141

206-
public function toArray()
142+
public function toArray(): array
207143
{
208-
return array(
144+
return [
209145
'success' => $this->isSuccess(),
210146
'hostname' => $this->getHostname(),
211147
'challenge_ts' => $this->getChallengeTs(),
212148
'apk_package_name' => $this->getApkPackageName(),
213149
'score' => $this->getScore(),
214150
'action' => $this->getAction(),
215151
'error-codes' => $this->getErrorCodes(),
216-
);
152+
];
217153
}
218154
}

0 commit comments

Comments
 (0)
Please sign in to comment.