-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Improve typing of arrays and callables #56470
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
base: 12.x
Are you sure you want to change the base?
Improve typing of arrays and callables #56470
Conversation
@@ -39,7 +39,7 @@ public function connect(array $servers, $connectionId = null, array $options = [ | |||
* Get a new Memcached instance. | |||
* | |||
* @param string|null $connectionId | |||
* @param array $credentials | |||
* @param array{string, string} $credentials |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Types taken from Memcached::setSaslAuthData()
@@ -287,6 +287,7 @@ protected function createDynamodbDriver(array $config) | |||
/** | |||
* Create new DynamoDb Client instance. | |||
* | |||
* @param array{region: string, endpoint?: string, key?: string, secret?: string, token?: string} $config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Types taken from \Aws\DynamoDb\DynamoDbClient
@browner12 What do you dislike about this PR? |
Can PphStorm recognize these formats? |
As far as I'm concerned, they are recognized by PHPStan as well as psalm, which should cover the majority of the ecosystem. I don't have PHPStorm installed to check explicitly, but assuming, it follows common sense, that should work, I'd say. |
No description provided.