-
Notifications
You must be signed in to change notification settings - Fork 28
phpdoc are not precise #30
Comments
Thanks for noticing this. I'll fix the those documentation issues. In the second case, we were trying to indicate that, you were passing in a reference to a return value which would end up being turned into an array, but as you correctly point out, the current documentation does not correctly indicate that. Thanks again for discovering these issues. |
One more issue with constants. Another issue.
|
Also there's a problem with |
Thank you for pointing this out. I'll look into a fix and post an update when done. If you know which functions are causing the issue could you please post them? Thanks |
I can confirm this issue. Easy way to list all empty parameter names:
in my env PHP7.3, Aerospike client 7.5.2 output is:
Due this is impossible to use Aerospike class directly as Symfony DI lazy service. |
I've caught this error using \Aerospike::get() method, but it seems, other methods might have similar issues.
The file https://github.com/aerospike/aerospike-client-php/blob/master/doc/phpdoc/aerospike.php gives us this interface for the method get():
There are 2 problems here.
First, it says that the default value for the last 2 parameters is an empty array. However this code gonna fail:
with $response_status === 4 (AS_PROTO_RESULT_FAIL_PARAMETER)
It seems that the real default value for the last 2 parameters is null.
This code works without errors:
The second problem is about the second parameter - array &$record. AFAIK, in PHP if you create function with such parameter, you should pass an array there, otherwise it fails due to type mismatch
It's not critical, but these errors are visible if you:
The text was updated successfully, but these errors were encountered: