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

Fix phpdoc handle_factory array #2919

Merged
merged 2 commits into from Sep 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Handler/CurlHandler.php
Expand Up @@ -24,9 +24,9 @@ class CurlHandler
/**
* Accepts an associative array of options:
*
* - factory: Optional curl factory used to create cURL handles.
* - handle_factory: Optional curl factory used to create cURL handles.
*
* @param array $options Array of options to use with the handler
* @param array{handle_factory?:CurlFactoryInterface} $options Array of options to use with the handler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array{handle_factory?: ?CurlFactoryInterface} is probably the correct type, here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, about the space after the colon it would be great to consolidate around one convention, I did it like that because of

* @return array{0:string, 1:int, 2:?string, 3:array}

we may want to update the code there too

*/
public function __construct(array $options = [])
{
Expand Down