Skip to content

docs: add @throws ZVecException annotations on all FFI-calling methods (closes #62)#161

Merged
s2x merged 2 commits into
mainfrom
docs/issue-62-throws-annotations
Jul 8, 2026
Merged

docs: add @throws ZVecException annotations on all FFI-calling methods (closes #62)#161
s2x merged 2 commits into
mainfrom
docs/issue-62-throws-annotations

Conversation

@s2x

@s2x s2x commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #62

Changes

  • Added @throws ZVecException to ~122 methods across 8 source files:
    • ZVec.php (40 annotations) — all public methods calling checkStatus() or ffi()
    • ZVecSchema.php (30 annotations) — __construct, setMaxDocCountPerSegment, all add* methods
    • ZVecDoc.php (4 annotations) — setSparseVectorFp32, setSparseVectorFp16, serialize, deserialize
    • ZVecIndexParams.php (6 annotations) — all 6 factory methods
    • ZVecVectorQuery.php (13 annotations) — __construct, all setter methods
    • ZVecGroupByVectorQuery.php (12 annotations) — __construct, all setter methods
    • ZVecFieldSchema.php (13 annotations) — all getter/introspection methods
    • ZVecCollectionStats.php (4 annotations) — getDocCount, getIndexCount, getIndexName, getIndexCompleteness
  • Methods with existing PHPDoc: added @throws ZVecException inside the doc block
  • Methods without PHPDoc: added single-line /** @throws ZVecException */
  • Skipped: __destruct, __clone, getHandle(), ffi(), checkStatus(), private helpers

Testing

  • All files pass php -l syntax check
  • No runtime behavior changes (annotations only)
  • No duplicate annotations

Code Review

  • Passed subagent code review
  • All review comments addressed

closes #62)

- Added @throws ZVecException to ~122 methods across 8 source files
- Methods without existing PHPDoc: added single-line /** @throws ZVecException */
- Methods with existing PHPDoc: added @throws inside existing doc block
- Skipped: __destruct, __clone, getHandle, ffi, checkStatus, private helpers
- All php -l syntax checks pass
@s2x s2x self-assigned this Jul 7, 2026
@s2x
s2x merged commit ef40353 into main Jul 8, 2026
3 checks passed
@s2x
s2x deleted the docs/issue-62-throws-annotations branch July 8, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC-003: Missing @throws ZVecException on All FFI-Calling Methods

1 participant