From e7ebff56df2af7eba6dc5fe21682c1b552cf13f4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 30 Sep 2019 20:43:07 +0200 Subject: [PATCH] PHPDoc fixes --- program/include/rcmail_install.php | 1 - program/lib/Roundcube/cache/apc.php | 2 -- program/lib/Roundcube/cache/db.php | 2 -- program/lib/Roundcube/cache/memcache.php | 2 -- program/lib/Roundcube/cache/memcached.php | 2 -- program/lib/Roundcube/cache/redis.php | 2 -- program/lib/Roundcube/rcube_base_replacer.php | 1 - program/lib/Roundcube/rcube_cache.php | 2 -- program/lib/Roundcube/rcube_charset.php | 4 +-- program/lib/Roundcube/rcube_csv2vcard.php | 9 ++++- program/lib/Roundcube/rcube_image.php | 8 ++++- program/lib/Roundcube/rcube_imap.php | 2 -- program/lib/Roundcube/rcube_imap_cache.php | 2 -- program/lib/Roundcube/rcube_imap_search.php | 1 - program/lib/Roundcube/rcube_message.php | 34 ++++++++++++++----- .../lib/Roundcube/rcube_message_header.php | 1 - program/lib/Roundcube/rcube_message_part.php | 2 -- program/lib/Roundcube/rcube_mime.php | 2 -- program/lib/Roundcube/rcube_mime_decode.php | 1 - program/lib/Roundcube/rcube_plugin.php | 9 ++++- program/lib/Roundcube/rcube_session.php | 2 -- program/lib/Roundcube/rcube_smtp.php | 3 +- program/lib/Roundcube/rcube_storage.php | 2 -- program/lib/Roundcube/session/db.php | 3 -- program/lib/Roundcube/session/memcache.php | 3 -- program/lib/Roundcube/session/memcached.php | 3 -- program/lib/Roundcube/session/php.php | 3 -- program/lib/Roundcube/session/redis.php | 3 +- 28 files changed, 52 insertions(+), 59 deletions(-) diff --git a/program/include/rcmail_install.php b/program/include/rcmail_install.php index 635e440f4..a7ef637c5 100644 --- a/program/include/rcmail_install.php +++ b/program/include/rcmail_install.php @@ -23,7 +23,6 @@ * * @category Install * @package Webmail - * @author Thomas Bruederli */ class rcmail_install { diff --git a/program/lib/Roundcube/cache/apc.php b/program/lib/Roundcube/cache/apc.php index 25fc076c6..329315e72 100644 --- a/program/lib/Roundcube/cache/apc.php +++ b/program/lib/Roundcube/cache/apc.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Cache - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_cache_apc extends rcube_cache { diff --git a/program/lib/Roundcube/cache/db.php b/program/lib/Roundcube/cache/db.php index 695f90074..8b16c3a89 100644 --- a/program/lib/Roundcube/cache/db.php +++ b/program/lib/Roundcube/cache/db.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Cache - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_cache_db extends rcube_cache { diff --git a/program/lib/Roundcube/cache/memcache.php b/program/lib/Roundcube/cache/memcache.php index 371796d3d..b73bb2a2c 100644 --- a/program/lib/Roundcube/cache/memcache.php +++ b/program/lib/Roundcube/cache/memcache.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Cache - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_cache_memcache extends rcube_cache { diff --git a/program/lib/Roundcube/cache/memcached.php b/program/lib/Roundcube/cache/memcached.php index 717e89767..dee598362 100644 --- a/program/lib/Roundcube/cache/memcached.php +++ b/program/lib/Roundcube/cache/memcached.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Cache - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_cache_memcached extends rcube_cache { diff --git a/program/lib/Roundcube/cache/redis.php b/program/lib/Roundcube/cache/redis.php index 6972799d4..f072bad42 100644 --- a/program/lib/Roundcube/cache/redis.php +++ b/program/lib/Roundcube/cache/redis.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Cache - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_cache_redis extends rcube_cache { diff --git a/program/lib/Roundcube/rcube_base_replacer.php b/program/lib/Roundcube/rcube_base_replacer.php index 64369be51..83f240a34 100644 --- a/program/lib/Roundcube/rcube_base_replacer.php +++ b/program/lib/Roundcube/rcube_base_replacer.php @@ -23,7 +23,6 @@ * * @package Framework * @subpackage Utils - * @author Thomas Bruederli */ class rcube_base_replacer { diff --git a/program/lib/Roundcube/rcube_cache.php b/program/lib/Roundcube/rcube_cache.php index 4782d750d..e266c93bc 100644 --- a/program/lib/Roundcube/rcube_cache.php +++ b/program/lib/Roundcube/rcube_cache.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Cache - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_cache { diff --git a/program/lib/Roundcube/rcube_charset.php b/program/lib/Roundcube/rcube_charset.php index 5ecddec17..88eb6001f 100644 --- a/program/lib/Roundcube/rcube_charset.php +++ b/program/lib/Roundcube/rcube_charset.php @@ -17,6 +17,7 @@ +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | | Author: Aleksander Machniak | + | Author: Edmund Grimley Evans | +-----------------------------------------------------------------------+ */ @@ -25,9 +26,6 @@ * * @package Framework * @subpackage Core - * @author Thomas Bruederli - * @author Aleksander Machniak - * @author Edmund Grimley Evans */ class rcube_charset { diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php index e7353f0b3..ab430d2f7 100644 --- a/program/lib/Roundcube/rcube_csv2vcard.php +++ b/program/lib/Roundcube/rcube_csv2vcard.php @@ -22,7 +22,6 @@ * * @package Framework * @subpackage Addressbook - * @author Aleksander Machniak */ class rcube_csv2vcard { @@ -483,6 +482,10 @@ class rcube_csv2vcard /** * Parse CSV file line + * + * @param string $line Line of text from CSV file + * + * @return array CSV data extracted from the line */ protected function parse_line($line) { @@ -512,6 +515,8 @@ class rcube_csv2vcard /** * Parse CSV header line, detect fields mapping + * + * @param array $elements Array of field names from a first line in CSV file */ protected function parse_header($elements) { @@ -574,6 +579,8 @@ class rcube_csv2vcard /** * Convert CSV data row to vCard + * + * @param array $data CSV data array */ protected function csv_to_vcard($data) { diff --git a/program/lib/Roundcube/rcube_image.php b/program/lib/Roundcube/rcube_image.php index 50eb20c9a..a47fd7f84 100644 --- a/program/lib/Roundcube/rcube_image.php +++ b/program/lib/Roundcube/rcube_image.php @@ -395,7 +395,9 @@ class rcube_image } /** - * Checks if image format conversion is supported + * Checks if image format conversion is supported (for specified mimetype). + * + * @param string $mimetype Mimetype name * * @return boolean True if specified format can be converted to another format */ @@ -441,6 +443,10 @@ class rcube_image /** * Check if we have enough memory to load specified image + * + * @param array Hash array with image props like channels, width, height + * + * @return bool True if there's enough memory to process the image, False otherwise */ private function mem_check($props) { diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index c97e87238..8b5d3e065 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Storage - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_imap extends rcube_storage { diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php index ba7062b21..66e114e03 100644 --- a/program/lib/Roundcube/rcube_imap_cache.php +++ b/program/lib/Roundcube/rcube_imap_cache.php @@ -23,8 +23,6 @@ * * @package Framework * @subpackage Storage - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_imap_cache { diff --git a/program/lib/Roundcube/rcube_imap_search.php b/program/lib/Roundcube/rcube_imap_search.php index cc1a86667..06183f754 100644 --- a/program/lib/Roundcube/rcube_imap_search.php +++ b/program/lib/Roundcube/rcube_imap_search.php @@ -23,7 +23,6 @@ * * @package Framework * @subpackage Storage - * @author Thomas Bruederli */ class rcube_imap_search { diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 07662af8f..c6ef83709 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -24,7 +24,6 @@ * * @package Framework * @subpackage Storage - * @author Thomas Bruederli */ class rcube_message { @@ -137,7 +136,8 @@ class rcube_message * Return a (decoded) message header * * @param string $name Header name - * @param bool $row Don't mime-decode the value + * @param bool $raw Don't mime-decode the value + * * @return string Header value */ public function get_header($name, $raw = false) @@ -164,6 +164,7 @@ class rcube_message * * @param string $mime_id Part MIME-ID * @param mixed $embed Mimetype class for parts to be embedded + * * @return string URL or false if part does not exist */ public function get_part_url($mime_id, $embed = false) @@ -935,16 +936,22 @@ class rcube_message */ private function get_mime_numbers(&$part) { - if (strlen($part->mime_id)) + if (strlen($part->mime_id)) { $this->mime_parts[$part->mime_id] = &$part; + } - if (is_array($part->parts)) - for ($i=0; $iparts); $i++) + if (is_array($part->parts)) { + for ($i=0; $iparts); $i++) { $this->get_mime_numbers($part->parts[$i]); + } + } } /** * Add a part to object parts array(s) (with context check) + * + * @param rcube_message_part $part Message part + * @param string $type Part type (inline/attachment) */ private function add_part($part, $type = null) { @@ -961,6 +968,10 @@ class rcube_message /** * Check if specified part belongs to the current context + * + * @param rcube_message_part $part Message part + * + * @return bool True if the part belongs to the current context, False otherwise */ private function check_context($part) { @@ -971,7 +982,8 @@ class rcube_message * Decode a Microsoft Outlook TNEF part (winmail.dat) * * @param rcube_message_part $part Message part to decode - * @return array + * + * @return rcube_message_part[] List of message parts extracted from TNEF */ function tnef_decode(&$part) { @@ -1006,7 +1018,8 @@ class rcube_message * Parse message body for UUencoded attachments bodies * * @param rcube_message_part $part Message part to decode - * @return array + * + * @return rcube_message_part[] List of message parts extracted from the file */ function uu_decode(&$part) { @@ -1059,7 +1072,12 @@ class rcube_message } /** - * Fix attachment name encoding if needed/possible + * Fix attachment name encoding if needed and possible + * + * @param string $name Attachment name + * @param rcube_message_part $part Message part + * + * @return string Fixed attachment name */ protected function fix_attachment_name($name, $part) { diff --git a/program/lib/Roundcube/rcube_message_header.php b/program/lib/Roundcube/rcube_message_header.php index 9dc2d9c58..4539feab3 100644 --- a/program/lib/Roundcube/rcube_message_header.php +++ b/program/lib/Roundcube/rcube_message_header.php @@ -23,7 +23,6 @@ * * @package Framework * @subpackage Storage - * @author Aleksander Machniak */ class rcube_message_header { diff --git a/program/lib/Roundcube/rcube_message_part.php b/program/lib/Roundcube/rcube_message_part.php index bf8504a9a..597d69b9a 100644 --- a/program/lib/Roundcube/rcube_message_part.php +++ b/program/lib/Roundcube/rcube_message_part.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Storage - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_message_part { diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php index 9a5d8e298..d3848d507 100644 --- a/program/lib/Roundcube/rcube_mime.php +++ b/program/lib/Roundcube/rcube_mime.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Storage - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_mime { diff --git a/program/lib/Roundcube/rcube_mime_decode.php b/program/lib/Roundcube/rcube_mime_decode.php index 739987fac..94c6ec4c8 100644 --- a/program/lib/Roundcube/rcube_mime_decode.php +++ b/program/lib/Roundcube/rcube_mime_decode.php @@ -25,7 +25,6 @@ * * @package Framework * @subpackage Storage - * @author Aleksander Machniak */ class rcube_mime_decode { diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php index 09efcb949..b219b9fca 100644 --- a/program/lib/Roundcube/rcube_plugin.php +++ b/program/lib/Roundcube/rcube_plugin.php @@ -69,9 +69,16 @@ abstract class rcube_plugin */ public $allowed_prefs; + /** @var string Plugin directory location */ protected $home; + + /** @var string Base URL to the plugin directory */ protected $urlbase; + + /** @var string Plugin task name (if registered) */ private $mytask; + + /** @var array List of plugin configuration files already loaded */ private $loaded_config = array(); @@ -96,7 +103,7 @@ abstract class rcube_plugin /** * Provide information about this * - * @return array Meta information about a plugin or false if not implemented: + * @return array Meta information about a plugin or false if not implemented. * As hash array with the following keys: * name: The plugin name * vendor: Name of the plugin developer diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php index 21e9b98b9..59522a9d7 100644 --- a/program/lib/Roundcube/rcube_session.php +++ b/program/lib/Roundcube/rcube_session.php @@ -25,8 +25,6 @@ * * @package Framework * @subpackage Core - * @author Thomas Bruederli - * @author Aleksander Machniak */ abstract class rcube_session { diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php index eda3a369a..f9b28112b 100644 --- a/program/lib/Roundcube/rcube_smtp.php +++ b/program/lib/Roundcube/rcube_smtp.php @@ -14,6 +14,7 @@ | Provide SMTP functionality using socket connections | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli | + | Aleksander Machniak | +-----------------------------------------------------------------------+ */ @@ -22,8 +23,6 @@ * * @package Framework * @subpackage Mail - * @author Thomas Bruederli - * @author Aleksander Machniak */ class rcube_smtp { diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index 6c22517f3..116df9767 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -24,8 +24,6 @@ * * @package Framework * @subpackage Storage - * @author Thomas Bruederli - * @author Aleksander Machniak */ abstract class rcube_storage { diff --git a/program/lib/Roundcube/session/db.php b/program/lib/Roundcube/session/db.php index a00d6bce6..22d63ed41 100644 --- a/program/lib/Roundcube/session/db.php +++ b/program/lib/Roundcube/session/db.php @@ -25,9 +25,6 @@ * * @package Framework * @subpackage Core - * @author Thomas Bruederli - * @author Aleksander Machniak - * @author Cor Bosman */ class rcube_session_db extends rcube_session { diff --git a/program/lib/Roundcube/session/memcache.php b/program/lib/Roundcube/session/memcache.php index be22dda88..f8190b487 100644 --- a/program/lib/Roundcube/session/memcache.php +++ b/program/lib/Roundcube/session/memcache.php @@ -25,9 +25,6 @@ * * @package Framework * @subpackage Core - * @author Thomas Bruederli - * @author Aleksander Machniak - * @author Cor Bosman */ class rcube_session_memcache extends rcube_session { diff --git a/program/lib/Roundcube/session/memcached.php b/program/lib/Roundcube/session/memcached.php index cb404514c..c9f0c63a0 100644 --- a/program/lib/Roundcube/session/memcached.php +++ b/program/lib/Roundcube/session/memcached.php @@ -25,9 +25,6 @@ * * @package Framework * @subpackage Core - * @author Thomas Bruederli - * @author Aleksander Machniak - * @author Cor Bosman */ class rcube_session_memcached extends rcube_session { diff --git a/program/lib/Roundcube/session/php.php b/program/lib/Roundcube/session/php.php index 86ca5aa14..e0ae7c6b6 100644 --- a/program/lib/Roundcube/session/php.php +++ b/program/lib/Roundcube/session/php.php @@ -25,9 +25,6 @@ * * @package Framework * @subpackage Core - * @author Thomas Bruederli - * @author Aleksander Machniak - * @author Cor Bosman */ class rcube_session_php extends rcube_session { diff --git a/program/lib/Roundcube/session/redis.php b/program/lib/Roundcube/session/redis.php index 51953b5bb..10cfc4862 100644 --- a/program/lib/Roundcube/session/redis.php +++ b/program/lib/Roundcube/session/redis.php @@ -14,6 +14,7 @@ | Provide redis supported session management | +-----------------------------------------------------------------------+ | Author: Cor Bosman | + | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ */ @@ -22,8 +23,6 @@ * * @package Framework * @subpackage Core - * @author Cor Bosman - * @author Aleksander Machniak */ class rcube_session_redis extends rcube_session {