Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1628

Clarify return type for WriteConcernError and WriteError getInfo() methods

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial - P5
    • Resolution: Fixed
    • None
    • 1.8.0-beta2, 1.8.0
    • None
    • None

    Description

      The return value of the getInfo method for WriteConcernError and WriteError is documented as mixed (likely because it is stored internally as a zval); however, it is only ever initialized from a BSON document. Therefore, the return type can more correctly be stated as object|null.

      This came up while investigating a PR comment for PHPC-1571.

      Attachments

        Activity

          People

            jmikola@mongodb.com Jeremy Mikola
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: