Skip to content

docs(lock): clarify LockContext docs and modernize implementation#59980

Open
joshtrichards wants to merge 1 commit intomasterfrom
jtr/docs-lock-LockContext-API
Open

docs(lock): clarify LockContext docs and modernize implementation#59980
joshtrichards wants to merge 1 commit intomasterfrom
jtr/docs-lock-LockContext-API

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented Apr 28, 2026

Summary

Improve LockContext documentation and make the implementation more concise.

Changes

  • clarify the class docblock and constructor parameter docs
  • document getType(), getOwner(), and __toString() more clearly
  • switch to constructor property promotion
  • mark properties as readonly
  • simplify __toString() using match and sprintf()

Notes

This is a documentation/cleanup change only and is not intended to change lock behavior.1

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Footnotes

  1. Technically I did drop an extra space in the __toString() output.

@joshtrichards joshtrichards added this to the Nextcloud 34 milestone Apr 28, 2026
@joshtrichards joshtrichards added feature: locking developer experience ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Apr 28, 2026
@joshtrichards joshtrichards marked this pull request as ready for review April 28, 2026 16:26
@joshtrichards joshtrichards requested a review from a team as a code owner April 28, 2026 16:26
@joshtrichards joshtrichards requested review from CarlSchwan, artonge, leftybournes and nfebe and removed request for a team April 28, 2026 16:26
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Apr 28, 2026
@provokateurin provokateurin enabled auto-merge April 29, 2026 11:44
Signed-off-by: Josh <josh.t.richards@gmail.com>
@artonge artonge force-pushed the jtr/docs-lock-LockContext-API branch from dc875b8 to e66b1f5 Compare April 30, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews developer experience feature: locking ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants