Skip to content

refactor(storage): improve LocalTempFileTrait docs and harden toTmpFile stream handling#58842

Draft
joshtrichards wants to merge 2 commits intomasterfrom
jtr/refactor-storage-LocalTempFileTrait
Draft

refactor(storage): improve LocalTempFileTrait docs and harden toTmpFile stream handling#58842
joshtrichards wants to merge 2 commits intomasterfrom
jtr/refactor-storage-LocalTempFileTrait

Conversation

@joshtrichards
Copy link
Member

  • Resolves: #

Summary

  • Replaces inherited/outdated trait docblock text with trait-specific documentation.
    • Existing docblock was just a copy/paste of the one from Common and thus was not adding anything and was inaccurate.
  • Adds focused method-level docblocks
  • Refactors toTmpFile() for robustness and readability:
    • use pathinfo(..., PATHINFO_EXTENSION) for clearer/consistent extension extraction
    • handle target fopen failure explicitly
    • ensure both source and target streams are always closed via try/finally

TODO

Checklist

AI (if applicable)

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

It was just a copy/paste of the one one Common and thus was not adding anything/inaccurate.

Signed-off-by: Josh <josh.t.richards@gmail.com>
A refactor for clarity and general robustness

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant