fix: add docblocks to new methods

This commit is contained in:
Victor Westerlund 2026-02-22 10:55:37 +01:00
parent 7e873c48fa
commit 6409c85a32
Signed by: vlw
GPG key ID: D0AD730E1057DFC6

View file

@ -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}'");