Skip to content

Commit 661fdd4

Browse files
committed
Fix nullable deprecations
1 parent c82cd3c commit 661fdd4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Form/HCaptchaType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class HCaptchaType extends AbstractType
4040
* If the site key is not set globally by configuration, then it must be
4141
* passed as an option to the form type.
4242
*/
43-
public function __construct(HCaptchaValueFetcher $hcaptchaValueFetcher, string $hcaptchaSiteKey = null)
43+
public function __construct(HCaptchaValueFetcher $hcaptchaValueFetcher, ?string $hcaptchaSiteKey = null)
4444
{
4545
$this->valueFetcher = $hcaptchaValueFetcher;
4646
$this->hcaptchaSiteKey = $hcaptchaSiteKey;

Service/HCaptchaVerifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class HCaptchaVerifier
6868
*/
6969
public function __construct(ClientInterface $client,
7070
RequestFactoryInterface $requestFactory, StreamFactoryInterface $streamFactory,
71-
string $hcaptchaSecret, LoggerInterface $logger = null)
71+
string $hcaptchaSecret, ?LoggerInterface $logger = null)
7272
{
7373
$this->client = $client;
7474
$this->requestFactory = $requestFactory;
@@ -93,7 +93,7 @@ public function __construct(ClientInterface $client,
9393
* @throws BadAnswerFromHCaptchaException Thrown if the HCaptcha API has
9494
* failed to answer in due time or if the answer is out of specification.
9595
*/
96-
public function verify(HCaptchaResponse $value, string &$output = null): bool
96+
public function verify(HCaptchaResponse $value, ?string &$output = null): bool
9797
{
9898
// Make the validation request to hCaptcha
9999
$stream = $this->streamFactory->createStream(

0 commit comments

Comments
 (0)