From 76b88f19da769c16ea2a0392c67803d788860d7a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 10 Mar 2024 21:10:03 +0100 Subject: [PATCH] PHPDoc improvements --- Mail/mime.php | 36 ++++++++++++++++++------------------ Mail/mimePart.php | 14 +++++++------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Mail/mime.php b/Mail/mime.php index 516bd2c..3d845e7 100644 --- a/Mail/mime.php +++ b/Mail/mime.php @@ -517,7 +517,7 @@ protected function file2str($file_name) * @param mixed $obj The object to add the part to, or * anything else if a new object is to be created. * - * @return object The text mimePart object + * @return Mail_mimePart The text mimePart object */ protected function addTextPart($obj = null) { @@ -531,7 +531,7 @@ protected function addTextPart($obj = null) * @param mixed $obj The object to add the part to, or * anything else if a new object is to be created. * - * @return object The html mimePart object + * @return Mail_mimePart The html mimePart object */ protected function addHtmlPart($obj = null) { @@ -545,7 +545,7 @@ protected function addHtmlPart($obj = null) * @param mixed $obj The object to add the part to, or * anything else if a new object is to be created. * - * @return object The text mimePart object + * @return Mail_mimePart The text mimePart object */ protected function addCalendarPart($obj = null) { @@ -561,7 +561,7 @@ protected function addCalendarPart($obj = null) * * @param array $params Additional part parameters * - * @return object The multipart/mixed mimePart object + * @return Mail_mimePart The multipart/mixed mimePart object */ protected function addMixedPart($params = array()) { @@ -580,7 +580,7 @@ protected function addMixedPart($params = array()) * @param mixed $obj The object to add the part to, or * anything else if a new object is to be created. * - * @return object The multipart/mixed mimePart object + * @return Mail_mimePart The multipart/mixed mimePart object */ protected function addAlternativePart($obj = null) { @@ -604,7 +604,7 @@ protected function addAlternativePart($obj = null) * @param mixed $obj The object to add the part to, or * anything else if a new object is to be created * - * @return object The multipart/mixed mimePart object + * @return Mail_mimePart The multipart/mixed mimePart object */ protected function addRelatedPart($obj = null) { @@ -627,7 +627,7 @@ protected function addRelatedPart($obj = null) * @param object $obj The mimePart to add the image to * @param array $value The image information * - * @return object The image mimePart object + * @return Mail_mimePart The image mimePart object */ protected function addHtmlImagePart($obj, $value) { @@ -656,7 +656,7 @@ protected function addHtmlImagePart($obj, $value) * @param object $obj The mimePart to add the image to * @param mixed $value The attachment information array or Mail_mimePart object * - * @return object The image mimePart object + * @return Mail_mimePart The image mimePart object */ protected function addAttachmentPart($obj, $value) { @@ -847,12 +847,12 @@ public function saveMessageBody($filename, $params = null) * Builds the multipart message from the list ($this->parts) and * returns the mime content. * - * @param array $params Build parameters that change the way the email - * is built. Should be associative. See $_build_params. - * @param mixed $filename Output filename or file pointer where to save - * the message instead of returning it - * @param boolean $skip_head True if you want to return/save only the message - * without headers + * @param array $params Build parameters that change the way the email + * is built. Should be associative. See $_build_params. + * @param mixed $filename Output filename or file pointer where to save + * the message instead of returning it + * @param bool $skip_head True if you want to return/save only the message + * without headers * * @return mixed The MIME message content string, null or PEAR error object */ @@ -978,9 +978,9 @@ protected function buildBodyPart() * part when no parent_part is * received. * - * @return null|object The main part built inside the method. It will be an - * alternative part or text, html, or calendar part. - * Null if no body texts are found. + * @return null|Mail_mimePart The main part built inside the method. It will be an + * alternative part or text, html, or calendar part. + * Null if no body texts are found. */ protected function buildAlternativeParts($parent_part, $mixed_params = null) { @@ -1543,7 +1543,7 @@ protected function setBody($type, $data, $isfile = false, $append = false) * @param string $ctype Part content type * @param string $type Internal part type * - * @return object The mimePart object + * @return Mail_mimePart The mimePart object */ protected function addBodyPart($obj, $body, $ctype, $type) { diff --git a/Mail/mimePart.php b/Mail/mimePart.php index 217e49c..6d8479d 100644 --- a/Mail/mimePart.php +++ b/Mail/mimePart.php @@ -365,10 +365,10 @@ public function encode($boundary = null) * Encodes and saves the email into file or stream. * Data will be appended to the file/stream. * - * @param mixed $filename Existing file location - * or file pointer resource - * @param string $boundary Pre-defined boundary string - * @param boolean $skip_head True if you don't want to save headers + * @param mixed $filename Existing file location + * or file pointer resource + * @param string $boundary Pre-defined boundary string + * @param bool $skip_head True if you don't want to save headers * * @return array An associative array containing message headers * or PEAR error object @@ -411,9 +411,9 @@ public function encodeToFile($filename, $boundary = null, $skip_head = false) /** * Encodes given email part into file * - * @param string $fh Output file handle - * @param string $boundary Pre-defined boundary string - * @param boolean $skip_head True if you don't want to save headers + * @param string $fh Output file handle + * @param string $boundary Pre-defined boundary string + * @param bool $skip_head True if you don't want to save headers * * @return array True on sucess or PEAR error object */