From 6409c85a321b24d09f3bbf324519d5f3cead35d0 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Sun, 22 Feb 2026 10:55:37 +0100 Subject: [PATCH] fix: add docblocks to new methods --- src/Posts/Type/Attachment.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Posts/Type/Attachment.php b/src/Posts/Type/Attachment.php index 5e5cd2c..4257a61 100644 --- a/src/Posts/Type/Attachment.php +++ b/src/Posts/Type/Attachment.php @@ -91,10 +91,22 @@ get => file_get_contents($this->post->guid); } + /** + * Set the pathname for this Attachemnt to a file on disk + * + * @param string $pathname + * @return void + */ public function set_attached_file(string $pathname): void { PostMeta::new($this->post, self::META_KEY_WP_ATTACHED_FILE, $pathname); } + /** + * Set Attachemnt data from a file on disk + * + * @param string $file + * @return void + */ public function set_from_file(string $file): void { if (!is_file($file)) { throw new Exception("No file found at location '{$file}'");