Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Response::toArray() return type. #550

Open
laurentmuller opened this issue May 10, 2024 · 0 comments
Open

Define Response::toArray() return type. #550

laurentmuller opened this issue May 10, 2024 · 0 comments

Comments

@laurentmuller
Copy link

Issue description

This will be nice if the the toArray() function in the Response class define the PHPDoc return type.

Environment

  • Windows 11
  • PHP 8.2.16
  • Apache 2.4.51
  • google/recaptcha v1.3.0
  • Chrome 124.0.6367.202

Reproducing the issue

#N/A#

Code to implement

/**
  * @return array{
  *     success: bool,
  *     hostname: string,
  *     challenge_ts: string,
  *     apk_package_name: string,
  *     score: float|null,
  *     action: string,
  *     error-codes: string[]}
  */ 
public function toArray()
{
    //...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant