Clarify return type for WriteConcernError and WriteError getInfo() methods

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Trivial - P5
    • 1.8.0-beta2, 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: