Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-165

Docs have return type scalar ( Binary object ), which doesn't help much



      A lot of the PHP methods are documented to return scalar ( Binary object ), which is not very helpful. What does the binary object represent?

      For example, the set method:


      What does it really return? By looking at the source, I think it returns bool(false) if it fails, and the new CAS id for the item (represented as a string in decimal notation) on success. Saying "Binary Object" is a long ways away from understanding this. The docs (and probably the underlying code, too, but hey, it's PHP and bound to turn into spaghetti, right?) need to create meaningful names for these things, like "Returns: CAS id string or false", and then use those names consistently.

      Another example, just below, is setMulti:

      It returns a PHP Array, where the index of the array is the key that was set, and the value is – I think – a CAS id string or false. I could be wrong here, I didn't do a complete test on it. But I think that demonstrates exactly the point. Currently it's very difficult for anyone to use the library correctly based on our API reference.

      The tests in the source code are a helpful source of info in the mean time, until the reference docs can be improved.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.


        TimSmith Tim Smith (Inactive) created issue -
        ingenthr Matt Ingenthron made changes -
        Field Original Value New Value
        Assignee Matt Ingenthron [ ingenthr ] MC Brown [ mccouch ]
        mccouch MC Brown (Inactive) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        brett19 Brett Lawson made changes -
        Workflow jira [ 23187 ] Couchbase SDK Workflow [ 44372 ]


          • Assignee:
            mccouch MC Brown (Inactive)
            TimSmith Tim Smith (Inactive)
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created:

              Gerrit Reviews

              There are no open Gerrit changes