From 2103cc317de9370959d8b18002cd5c2ac5cfd8ec Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 26 Jan 2024 14:38:48 +0100 Subject: [PATCH] PHPDoc fixes --- phpstan.neon | 3 +- plugins/calendar/calendar.php | 21 +-- .../drivers/caldav/caldav_calendar.php | 34 ++-- .../calendar/drivers/caldav/caldav_driver.php | 36 ++--- .../drivers/database/database_driver.php | 47 +++--- .../calendar/drivers/kolab/kolab_calendar.php | 26 +-- .../calendar/drivers/kolab/kolab_driver.php | 61 ++++---- .../kolab/kolab_invitation_calendar.php | 18 +-- .../drivers/kolab/kolab_user_calendar.php | 24 +-- .../drivers/ldap/resources_driver_ldap.php | 2 +- plugins/calendar/lib/calendar_ui.php | 2 +- .../drivers/carddav/carddav_contacts.php | 58 +++---- .../carddav/carddav_contacts_driver.php | 2 +- .../drivers/kolab/kolab_contacts.php | 67 ++++---- .../drivers/kolab/kolab_contacts_driver.php | 2 +- .../lib/kolab_addressbook_ui.php | 2 +- plugins/kolab_chat/kolab_chat.php | 6 +- plugins/kolab_config/kolab_config.php | 4 +- .../kolab_delegation_engine.php | 8 +- plugins/kolab_notes/kolab_notes.php | 36 +++-- plugins/kolab_sso/lib/Firebase/JWT/JWT.php | 2 +- plugins/kolab_tags/lib/kolab_tags_engine.php | 2 +- .../lib/libcalendaring_itip.php | 46 +++--- .../lib/libcalendaring_recurrence.php | 4 +- .../lib/libcalendaring_vcalendar.php | 75 ++++----- plugins/libcalendaring/libcalendaring.php | 42 ++--- .../libkolab/lib/kolab_date_recurrence.php | 4 +- plugins/libkolab/lib/kolab_format.php | 65 ++++---- .../lib/kolab_format_configuration.php | 6 +- plugins/libkolab/lib/kolab_format_contact.php | 6 +- .../lib/kolab_format_distributionlist.php | 7 +- plugins/libkolab/lib/kolab_format_event.php | 9 +- plugins/libkolab/lib/kolab_format_file.php | 6 +- plugins/libkolab/lib/kolab_format_journal.php | 7 +- plugins/libkolab/lib/kolab_format_note.php | 6 +- plugins/libkolab/lib/kolab_format_task.php | 6 +- plugins/libkolab/lib/kolab_format_xcal.php | 12 +- plugins/libkolab/lib/kolab_ldap.php | 2 +- plugins/libkolab/lib/kolab_storage.php | 79 +++++----- plugins/libkolab/lib/kolab_storage_cache.php | 67 ++++---- .../lib/kolab_storage_cache_configuration.php | 8 +- plugins/libkolab/lib/kolab_storage_config.php | 4 +- .../libkolab/lib/kolab_storage_dataset.php | 2 +- plugins/libkolab/lib/kolab_storage_dav.php | 52 +++--- .../libkolab/lib/kolab_storage_dav_cache.php | 46 +++--- .../libkolab/lib/kolab_storage_dav_folder.php | 22 +-- plugins/libkolab/lib/kolab_storage_folder.php | 82 +++++----- .../libkolab/lib/kolab_storage_folder_api.php | 25 +-- .../lib/kolab_storage_folder_user.php | 4 +- .../lib/kolab_storage_folder_virtual.php | 3 +- plugins/libkolab/libkolab.php | 11 +- .../drivers/caldav/tasklist_caldav_driver.php | 148 +++++++++--------- .../database/tasklist_database_driver.php | 4 +- 53 files changed, 684 insertions(+), 639 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 3c9772ff..0be50305 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -22,7 +22,8 @@ parameters: - '#Call to static method .* on an unknown class jqueryui#' - '#Access to an undefined property Kolab2FA\\.*::\$(username|secret)#' - '#Unsafe call to private method Firebase\\JWT\\JWT::.*#' - - '#PHPDoc tag#' + - '#Access to an undefined property Sabre\\VObject.*::\$.*#' + - '#invalid .*type vector#' - '#(cDateTime|EventCal)#' paths: diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index cd0de2bb..d286eb6b 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -385,7 +385,7 @@ class calendar extends rcube_plugin * Handler for preferences_sections_list hook. * Adds Calendar settings sections into preferences sections list. * - * @param array Original parameters + * @param array $p Original parameters * * @return array Modified parameters */ @@ -403,7 +403,7 @@ class calendar extends rcube_plugin * Handler for preferences_list hook. * Adds options blocks into Calendar settings sections in Preferences. * - * @param array Original parameters + * @param array $p Original parameters * * @return array Modified parameters */ @@ -875,7 +875,7 @@ $("#rcmfd_new_category").keypress(function(event) { * Handler for preferences_save hook. * Executed on Calendar settings form submit. * - * @param array Original parameters + * @param array $p Original parameters * * @return array Modified parameters */ @@ -2064,8 +2064,8 @@ $("#rcmfd_new_category").keypress(function(event) { /** * Encode events as JSON * - * @param array Events as array - * @param bool Add CSS class names according to calendar and categories + * @param array $events Events as array + * @param bool $addcss Add CSS class names according to calendar and categories * * @return string JSON encoded events */ @@ -2724,8 +2724,8 @@ $("#rcmfd_new_category").keypress(function(event) { /** * Compare two event objects and return differing properties * - * @param array Event A - * @param array Event B + * @param array $a Event A + * @param array $b Event B * * @return array List of differing event properties */ @@ -2759,10 +2759,11 @@ $("#rcmfd_new_category").keypress(function(event) { /** * Update attendee properties on the given event object * - * @param array The event object to be altered - * @param array List of hash arrays each represeting an updated/added attendee + * @param array $event The event object to be altered + * @param array $attendees List of hash arrays each represeting an updated/added attendee + * @param array $removed List of attendees' addresses to remove */ - public static function merge_attendee_data(&$event, $attendees, $removed = null) + public static function merge_attendee_data(&$event, $attendees, $removed = []) { if (!empty($attendees) && !is_array($attendees[0])) { $attendees = [$attendees]; diff --git a/plugins/calendar/drivers/caldav/caldav_calendar.php b/plugins/calendar/drivers/caldav/caldav_calendar.php index 6febcd2a..a4180020 100644 --- a/plugins/calendar/drivers/caldav/caldav_calendar.php +++ b/plugins/calendar/drivers/caldav/caldav_calendar.php @@ -42,8 +42,8 @@ class caldav_calendar extends kolab_storage_dav_folder /** * Factory method to instantiate a caldav_calendar object * - * @param string $id Calendar ID (encoded IMAP folder name) - * @param object $calendar Calendar plugin object + * @param string $id Calendar ID (encoded IMAP folder name) + * @param calendar $calendar Calendar plugin object * * @return caldav_calendar Self instance */ @@ -201,16 +201,16 @@ class caldav_calendar extends kolab_storage_dav_folder } /** - * @param int Event's new start (unix timestamp) - * @param int Event's new end (unix timestamp) - * @param string Search query (optional) - * @param bool Include virtual events (optional) - * @param array Additional parameters to query storage - * @param array Additional query to filter events + * @param int $start Event's new start (unix timestamp) + * @param int $end Event's new end (unix timestamp) + * @param string $search Search query (optional) + * @param bool $virtual Include virtual events (optional) + * @param array $query Additional parameters to query storage + * @param array $filter_query Additional query to filter events * * @return array A list of event records */ - public function list_events($start, $end, $search = null, $virtual = 1, $query = [], $filter_query = null) + public function list_events($start, $end, $search = null, $virtual = true, $query = [], $filter_query = null) { // convert to DateTime for comparisons // #5190: make the range a little bit wider @@ -368,9 +368,9 @@ class caldav_calendar extends kolab_storage_dav_folder /** * Get number of events in the given calendar * - * @param int Date range start (unix timestamp) - * @param int Date range end (unix timestamp) - * @param array Additional query to filter events + * @param int $start Date range start (unix timestamp) + * @param int $end Date range end (unix timestamp) + * @param array $filter_query Additional query to filter events * * @return int Number of events */ @@ -566,11 +566,11 @@ class caldav_calendar extends kolab_storage_dav_folder /** * Create instances of a recurring event * - * @param array $event Hash array with event properties - * @param DateTime $start Start date of the recurrence window - * @param DateTime $end End date of the recurrence window - * @param string $event_id ID of a specific recurring event instance - * @param int $limit Max. number of instances to return + * @param array $event Hash array with event properties + * @param DateTime $start Start date of the recurrence window + * @param ?DateTime $end End date of the recurrence window + * @param string $event_id ID of a specific recurring event instance + * @param int $limit Max. number of instances to return * * @return array List of recurring event instances */ diff --git a/plugins/calendar/drivers/caldav/caldav_driver.php b/plugins/calendar/drivers/caldav/caldav_driver.php index 0493dd2c..c0e5d250 100644 --- a/plugins/calendar/drivers/caldav/caldav_driver.php +++ b/plugins/calendar/drivers/caldav/caldav_driver.php @@ -276,7 +276,7 @@ class caldav_driver extends kolab_driver /** * Get the caldav_calendar instance for the given calendar ID * - * @param string Calendar identifier + * @param string $id Calendar identifier * * @return ?caldav_calendar Object nor null if calendar doesn't exist */ @@ -305,7 +305,7 @@ class caldav_driver extends kolab_driver /** * Create a new calendar assigned to the current user * - * @param array Hash array with calendar properties + * @param array $prop Hash array with calendar properties * name: Calendar name * color: The color of the calendar * @@ -411,8 +411,8 @@ class caldav_driver extends kolab_driver /** * Search for shared or otherwise not listed calendars the user has access * - * @param string Search string - * @param string Section/source to search + * @param string $query Search string + * @param string $source Section/source to search * * @return array List of calendars */ @@ -460,12 +460,12 @@ class caldav_driver extends kolab_driver /** * Get events from source. * - * @param int Event's new start (unix timestamp) - * @param int Event's new end (unix timestamp) - * @param string Search query (optional) - * @param mixed List of calendar IDs to load events from (either as array or comma-separated string) - * @param bool Include virtual events (optional) - * @param int Only list events modified since this time (unix timestamp) + * @param int $start Event's new start (unix timestamp) + * @param int $end Event's new end (unix timestamp) + * @param string $search Search query (optional) + * @param mixed $calendars List of calendar IDs to load events from (either as array or comma-separated string) + * @param bool $virtual Include virtual events (optional) + * @param int $modifiedsince Only list events modified since this time (unix timestamp) * * @return array A list of event records */ @@ -521,9 +521,9 @@ class caldav_driver extends kolab_driver /** * Create instances of a recurring event * - * @param array Hash array with event properties - * @param DateTime Start date of the recurrence window - * @param DateTime End date of the recurrence window + * @param array $event Hash array with event properties + * @param DateTime $start Start date of the recurrence window + * @param ?DateTime $end End date of the recurrence window * * @return array List of recurring event instances */ @@ -597,8 +597,8 @@ class caldav_driver extends kolab_driver /** * Identify changes considered relevant for scheduling * - * @param array Hash array with NEW object properties - * @param array Hash array with OLD object properties + * @param array $object Hash array with NEW object properties + * @param array $old Hash array with OLD object properties * * @return bool True if changes affect scheduling, False otherwise */ @@ -644,9 +644,9 @@ class caldav_driver extends kolab_driver /** * Callback function to produce driver-specific calendar create/edit form * - * @param string Request action 'form-edit|form-new' - * @param array Calendar properties (e.g. id, color) - * @param array Edit form fields + * @param string $action Request action 'form-edit|form-new' + * @param array $calendar Calendar properties (e.g. id, color) + * @param array $formfields Edit form fields * * @return string HTML content of the form */ diff --git a/plugins/calendar/drivers/database/database_driver.php b/plugins/calendar/drivers/database/database_driver.php index 74b3d0f6..15fe3924 100644 --- a/plugins/calendar/drivers/database/database_driver.php +++ b/plugins/calendar/drivers/database/database_driver.php @@ -105,7 +105,7 @@ class database_driver extends calendar_driver /** * Get a list of available calendars from this source * - * @param integer Bitmask defining filter criterias + * @param int $filter Bitmask defining filter criterias * * @return array List of calendars */ @@ -159,9 +159,10 @@ class database_driver extends calendar_driver /** * Create a new calendar assigned to the current user * - * @param array Hash array with calendar properties + * @param array $prop Hash array with calendar properties * name: Calendar name * color: The color of the calendar + * * @return mixed ID of the calendar on success, False on error */ public function create_calendar($prop) @@ -262,8 +263,8 @@ class database_driver extends calendar_driver /** * Search for shared or otherwise not listed calendars the user has access * - * @param string Search string - * @param string Section/source to search + * @param string $query Search string + * @param string $source Section/source to search * * @return array List of calendars */ @@ -276,7 +277,7 @@ class database_driver extends calendar_driver /** * Add a single event to the database * - * @param array Hash array with event properties + * @param array $event Hash array with event properties * @see calendar_driver::new_event() */ public function new_event($event) @@ -364,7 +365,7 @@ class database_driver extends calendar_driver /** * Update an event entry with the given data * - * @param array Hash array with event properties + * @param array $event Hash array with event properties * @see calendar_driver::edit_event() */ public function edit_event($event) @@ -516,11 +517,11 @@ class database_driver extends calendar_driver /** * Extended event editing with possible changes to the argument * - * @param array Hash array with event properties - * @param string New participant status - * @param array List of hash arrays with updated attendees + * @param array $event Hash array with event properties + * @param string $status New participant status + * @param array $attendees List of hash arrays with updated attendees * - * @return boolean True on success, False on error + * @return bool True on success, False on error */ public function edit_rsvp(&$event, $status, $attendees) { @@ -702,8 +703,8 @@ class database_driver extends calendar_driver /** * Save the given event record to database * - * @param array Event data - * @param boolean True if recurring events instances should be updated, too + * @param array $event Event data + * @param bool $update_recurring True if recurring events instances should be updated, too */ private function _update_event($event, $update_recurring = true) { @@ -904,7 +905,7 @@ class database_driver extends calendar_driver /** * Move a single event * - * @param array Hash array with event properties + * @param array $event Hash array with event properties * @see calendar_driver::move_event() */ public function move_event($event) @@ -916,7 +917,7 @@ class database_driver extends calendar_driver /** * Resize a single event * - * @param array Hash array with event properties + * @param array $event Hash array with event properties * @see calendar_driver::resize_event() */ public function resize_event($event) @@ -928,8 +929,8 @@ class database_driver extends calendar_driver /** * Remove a single event from the database * - * @param array Hash array with event properties - * @param boolean Remove record irreversible (@TODO) + * @param array $event Hash array with event properties + * @param bool $force Remove record irreversible (@TODO) * * @see calendar_driver::remove_event() */ @@ -1012,9 +1013,9 @@ class database_driver extends calendar_driver /** * Return data of a specific event * - * @param mixed Hash array with event properties or event UID - * @param integer Bitmask defining the scope to search events in - * @param boolean If true, recurrence exceptions shall be added + * @param mixed $event Hash array with event properties or event UID + * @param int $scope Bitmask defining the scope to search events in + * @param bool $full If true, recurrence exceptions shall be added * * @return array Hash array with event properties */ @@ -1158,11 +1159,11 @@ class database_driver extends calendar_driver /** * Get number of events in the given calendar * - * @param mixed List of calendar IDs to count events (either as array or comma-separated string) - * @param integer Date range start (unix timestamp) - * @param integer Date range end (unix timestamp) + * @param mixed $calendars List of calendar IDs to count events (either as array or comma-separated string) + * @param int $start Date range start (unix timestamp) + * @param ?int $end Date range end (unix timestamp) * - * @return array Hash array with counts grouped by calendar ID + * @return array Hash array with counts grouped by calendar ID */ public function count_events($calendars, $start, $end = null) { diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php index 5553d27a..cb0b70ee 100644 --- a/plugins/calendar/drivers/kolab/kolab_calendar.php +++ b/plugins/calendar/drivers/kolab/kolab_calendar.php @@ -45,8 +45,8 @@ class kolab_calendar extends kolab_storage_folder_api /** * Factory method to instantiate a kolab_calendar object * - * @param string Calendar ID (encoded IMAP folder name) - * @param object Calendar plugin object + * @param string $id Calendar ID (encoded IMAP folder name) + * @param calendar $calendar Calendar plugin object * * @return kolab_calendar Self instance */ @@ -54,7 +54,7 @@ class kolab_calendar extends kolab_storage_folder_api { $imap = $calendar->rc->get_storage(); $imap_folder = kolab_storage::id_decode($id); - $info = $imap->folder_info($imap_folder, true); + $info = $imap->folder_info($imap_folder); if ( empty($info) @@ -256,16 +256,16 @@ class kolab_calendar extends kolab_storage_folder_api } /** - * @param int Event's new start (unix timestamp) - * @param int Event's new end (unix timestamp) - * @param string Search query (optional) - * @param bool Include virtual events (optional) - * @param array Additional parameters to query storage - * @param array Additional query to filter events + * @param int $start Event's new start (unix timestamp) + * @param int $end Event's new end (unix timestamp) + * @param string $search Search query (optional) + * @param bool $virtual Include virtual events (optional) + * @param array $query Additional parameters to query storage + * @param array $filter_query Additional query to filter events * * @return array A list of event records */ - public function list_events($start, $end, $search = null, $virtual = 1, $query = [], $filter_query = null) + public function list_events($start, $end, $search = null, $virtual = true, $query = [], $filter_query = null) { // convert to DateTime for comparisons // #5190: make the range a little bit wider @@ -421,9 +421,9 @@ class kolab_calendar extends kolab_storage_folder_api /** * Get number of events in the given calendar * - * @param int Date range start (unix timestamp) - * @param int Date range end (unix timestamp) - * @param array Additional query to filter events + * @param int $start Date range start (unix timestamp) + * @param int $end Date range end (unix timestamp) + * @param array $filter_query Additional query to filter events * * @return int Count */ diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php index 623c6602..2114d494 100644 --- a/plugins/calendar/drivers/kolab/kolab_driver.php +++ b/plugins/calendar/drivers/kolab/kolab_driver.php @@ -292,7 +292,7 @@ class kolab_driver extends calendar_driver /** * Get list of calendars according to specified filters * - * @param int Bitmask defining restrictions. See FILTER_* constants for possible values. + * @param int $filter Bitmask defining restrictions. See FILTER_* constants for possible values. * * @return array List of calendars */ @@ -350,7 +350,7 @@ class kolab_driver extends calendar_driver /** * Get the kolab_calendar instance for the given calendar ID * - * @param string Calendar identifier (encoded imap folder name) + * @param string $id Calendar identifier (encoded imap folder name) * * @return kolab_calendar Object nor null if calendar doesn't exist */ @@ -379,7 +379,7 @@ class kolab_driver extends calendar_driver /** * Create a new calendar assigned to the current user * - * @param array Hash array with calendar properties + * @param array $prop Hash array with calendar properties * name: Calendar name * color: The color of the calendar * @@ -530,8 +530,8 @@ class kolab_driver extends calendar_driver /** * Search for shared or otherwise not listed calendars the user has access * - * @param string Search string - * @param string Section/source to search + * @param string $query Search string + * @param string $source Section/source to search * * @return array List of calendars */ @@ -681,9 +681,9 @@ class kolab_driver extends calendar_driver /** * Extended event editing with possible changes to the argument * - * @param array Hash array with event properties - * @param string New participant status - * @param array List of hash arrays with updated attendees + * @param array $event Hash array with event properties + * @param string $status New participant status + * @param array $attendees List of hash arrays with updated attendees * * @return bool True on success, False on error */ @@ -775,7 +775,7 @@ class kolab_driver extends calendar_driver * Move a single event * * @see calendar_driver::move_event() - * @return boolean True on success, False on error + * @return bool True on success, False on error */ public function move_event($event) { @@ -793,7 +793,7 @@ class kolab_driver extends calendar_driver * Resize a single event * * @see calendar_driver::resize_event() - * @return boolean True on success, False on error + * @return bool True on success, False on error */ public function resize_event($event) { @@ -810,9 +810,9 @@ class kolab_driver extends calendar_driver /** * Remove a single event * - * @param array Hash array with event properties: - * id: Event identifier - * @param bool Remove record(s) irreversible (mark as deleted otherwise) + * @param array $event Hash array with event properties: + * - id: Event identifier + * @param bool $force Remove record(s) irreversible (mark as deleted otherwise) * * @return bool True on success, False on error */ @@ -964,9 +964,9 @@ class kolab_driver extends calendar_driver /** * Restore a single deleted event * - * @param array Hash array with event properties: - * id: Event identifier - * calendar: Event calendar + * @param array $event Hash array with event properties: + * - id: Event identifier + * - calendar: Event calendar * * @return bool True on success, False on error */ @@ -1562,9 +1562,9 @@ class kolab_driver extends calendar_driver /** * Merge certain properties from the overlay event to the base event object * - * @param array The event object to be altered - * @param array The overlay event object to be merged over $event - * @param array List of properties not allowed to be overwritten + * @param array $event The event object to be altered + * @param array $overlay The overlay event object to be merged over $event + * @param ?array $blacklist List of properties not allowed to be overwritten */ public static function merge_exception_data(&$event, $overlay, $blacklist = null) { @@ -1681,9 +1681,9 @@ class kolab_driver extends calendar_driver /** * Get number of events in the given calendar * - * @param mixed List of calendar IDs to count events (either as array or comma-separated string) - * @param int Date range start (unix timestamp) - * @param int Date range end (unix timestamp) + * @param mixed $calendars List of calendar IDs to count events (either as array or comma-separated string) + * @param int $start Date range start (unix timestamp) + * @param ?int $end Date range end (unix timestamp) * * @return array Hash array with counts grouped by calendar ID */ @@ -1946,9 +1946,9 @@ class kolab_driver extends calendar_driver /** * Create instances of a recurring event * - * @param array Hash array with event properties - * @param DateTime Start date of the recurrence window - * @param DateTime End date of the recurrence window + * @param array $event Hash array with event properties + * @param DateTime $start Start date of the recurrence window + * @param DateTime $end End date of the recurrence window * * @return array List of recurring event instances */ @@ -2410,8 +2410,8 @@ class kolab_driver extends calendar_driver /** * Return full data of a specific revision of an event * - * @param array Hash array with event properties - * @param mixed $rev Revision number + * @param array $event Hash array with event properties + * @param mixed $rev Revision number * * @return array Event object as hash array * @see calendar_driver::get_event_revison() @@ -2430,6 +2430,7 @@ class kolab_driver extends calendar_driver // call Bonnie API $result = $this->bonnie_api->get('event', $uid, $rev, $mailbox, $msguid); if (is_array($result) && $result['uid'] == $uid && !empty($result['xml'])) { + /** @var kolab_format_event $format */ $format = kolab_format::factory('event'); $format->load($result['xml']); $event = $format->to_array(); @@ -2544,9 +2545,9 @@ class kolab_driver extends calendar_driver /** * Callback function to produce driver-specific calendar create/edit form * - * @param string Request action 'form-edit|form-new' - * @param array Calendar properties (e.g. id, color) - * @param array Edit form fields + * @param string $action Request action 'form-edit|form-new' + * @param array $calendar Calendar properties (e.g. id, color) + * @param array $formfields Edit form fields * * @return string HTML content of the form */ diff --git a/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php b/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php index af246543..3cdb39b6 100644 --- a/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php +++ b/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php @@ -231,15 +231,15 @@ class kolab_invitation_calendar } /** - * @param int Event's new start (unix timestamp) - * @param int Event's new end (unix timestamp) - * @param string Search query (optional) - * @param bool Include virtual events (optional) - * @param array Additional parameters to query storage + * @param int $start Event's new start (unix timestamp) + * @param int $end Event's new end (unix timestamp) + * @param string $search Search query (optional) + * @param bool $virtual Include virtual events (optional) + * @param array $query Additional parameters to query storage * * @return array A list of event records */ - public function list_events($start, $end, $search = null, $virtual = 1, $query = []) + public function list_events($start, $end, $search = null, $virtual = true, $query = []) { // get email addresses of the current user $user_emails = $this->cal->get_user_emails(); @@ -292,9 +292,9 @@ class kolab_invitation_calendar /** * Get number of events in the given calendar * - * @param int Date range start (unix timestamp) - * @param int Date range end (unix timestamp) - * @param array Additional query to filter events + * @param int $start Date range start (unix timestamp) + * @param int $end Date range end (unix timestamp) + * @param array $filter Additional query to filter events * * @return int Count */ diff --git a/plugins/calendar/drivers/kolab/kolab_user_calendar.php b/plugins/calendar/drivers/kolab/kolab_user_calendar.php index 0329b915..3e22086f 100644 --- a/plugins/calendar/drivers/kolab/kolab_user_calendar.php +++ b/plugins/calendar/drivers/kolab/kolab_user_calendar.php @@ -89,7 +89,7 @@ class kolab_user_calendar extends kolab_calendar /** * Getter for the IMAP folder owner * - * @param bool Return a fully qualified owner name (unused) + * @param bool $fully_qualified Return a fully qualified owner name (unused) * * @return string Name of the folder owner */ @@ -206,16 +206,16 @@ class kolab_user_calendar extends kolab_calendar } /** - * @param int Event's new start (unix timestamp) - * @param int Event's new end (unix timestamp) - * @param string Search query (optional) - * @param bool Include virtual events (optional) - * @param array Additional parameters to query storage - * @param array Additional query to filter events + * @param int $start Event's new start (unix timestamp) + * @param int $end Event's new end (unix timestamp) + * @param string $search Search query (optional) + * @param bool $virtual Include virtual events (optional) + * @param array $query Additional parameters to query storage + * @param array $filter_query Additional query to filter events * * @return array A list of event records */ - public function list_events($start, $end, $search = null, $virtual = 1, $query = [], $filter_query = null) + public function list_events($start, $end, $search = null, $virtual = true, $query = [], $filter_query = null) { // convert to DateTime for comparisons try { @@ -279,11 +279,11 @@ class kolab_user_calendar extends kolab_calendar /** * Get number of events in the given calendar * - * @param int Date range start (unix timestamp) - * @param int Date range end (unix timestamp) - * @param array Additional query to filter events + * @param int $start Date range start (unix timestamp) + * @param int $end Date range end (unix timestamp) + * @param array $filter_query Additional query to filter events * - * @return integer Count + * @return int Count */ public function count_events($start, $end = null, $filter_query = null) { diff --git a/plugins/calendar/drivers/ldap/resources_driver_ldap.php b/plugins/calendar/drivers/ldap/resources_driver_ldap.php index 29942837..c12067fc 100644 --- a/plugins/calendar/drivers/ldap/resources_driver_ldap.php +++ b/plugins/calendar/drivers/ldap/resources_driver_ldap.php @@ -75,7 +75,7 @@ class resources_driver_ldap extends resources_driver /** * Return properties of a single resource * - * @param string $id Unique resource identifier + * @param string $dn Unique resource identifier * * @return array Resource object as hash array */ diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php index 4ecf7c27..68f987a3 100644 --- a/plugins/calendar/lib/calendar_ui.php +++ b/plugins/calendar/lib/calendar_ui.php @@ -43,7 +43,7 @@ class calendar_ui /** * Object constructor * - * @param calendar Calendar plugin + * @param calendar $cal Calendar plugin */ public function __construct($cal) { diff --git a/plugins/kolab_addressbook/drivers/carddav/carddav_contacts.php b/plugins/kolab_addressbook/drivers/carddav/carddav_contacts.php index 79dc2781..aea1db11 100644 --- a/plugins/kolab_addressbook/drivers/carddav/carddav_contacts.php +++ b/plugins/kolab_addressbook/drivers/carddav/carddav_contacts.php @@ -232,7 +232,7 @@ class carddav_contacts extends rcube_addressbook /** * Save a search string for future listings * - * @param mixed Search params to use in listing method, obtained by get_search_set() + * @param mixed $filter Search params to use in listing method, obtained by get_search_set() */ public function set_search_set($filter): void { @@ -261,8 +261,8 @@ class carddav_contacts extends rcube_addressbook /** * List all active contact groups of this source * - * @param string Optional search string to match group name - * @param int Search mode. Sum of self::SEARCH_* + * @param string $search Optional search string to match group name + * @param int $mode Search mode. Sum of self::SEARCH_* * * @return array Indexed list of contact groups, each a hash array */ @@ -286,9 +286,9 @@ class carddav_contacts extends rcube_addressbook /** * List the current set of contact records * - * @param array List of cols to show - * @param int Only return this number of records, use negative values for tail - * @param bool True to skip the count query (select only) + * @param array $cols List of cols to show + * @param int $subset Only return this number of records, use negative values for tail + * @param bool $nocount True to skip the count query (select only) * * @return array Indexed list of contact records, each a hash array */ @@ -527,7 +527,7 @@ class carddav_contacts extends rcube_addressbook /** * Return the last result set * - * @return rcube_result_set Current result set or NULL if nothing selected yet + * @return ?rcube_result_set Current result set or NULL if nothing selected yet */ public function get_result() { @@ -537,10 +537,10 @@ class carddav_contacts extends rcube_addressbook /** * Get a specific contact record * - * @param mixed Record identifier(s) - * @param bool True to return record as associative array, otherwise a result set is returned + * @param mixed $id Record identifier(s) + * @param bool $assoc True to return record as associative array, otherwise a result set is returned * - * @return mixed Result object with all record fields or False if not found + * @return rcube_result_set|array|false Result object with all record fields or False if not found */ public function get_record($id, $assoc = false) { @@ -580,7 +580,7 @@ class carddav_contacts extends rcube_addressbook /** * Get group assignments of a specific contact record * - * @param mixed Record identifier + * @param mixed $id Record identifier * * @return array List of assigned groups as ID=>Name pairs */ @@ -604,10 +604,10 @@ class carddav_contacts extends rcube_addressbook /** * Create a new contact record * - * @param array Associative array with save data + * @param array $save_data Associative array with save data * Keys: Field name with optional section in the form FIELD:SECTION * Values: Field value. Can be either a string or an array of strings for multiple values - * @param bool True to check for duplicates first + * @param bool $check True to check for duplicates first * * @return mixed The created record ID on success, False on error */ @@ -657,8 +657,8 @@ class carddav_contacts extends rcube_addressbook /** * Update a specific contact record * - * @param mixed Record identifier - * @param array Associative array with save data + * @param mixed $id Record identifier + * @param array $save_data Associative array with save data * Keys: Field name with optional section in the form FIELD:SECTION * Values: Field value. Can be either a string or an array of strings for multiple values * @@ -692,8 +692,8 @@ class carddav_contacts extends rcube_addressbook /** * Mark one or more contact records as deleted * - * @param array Record identifiers - * @param bool Remove record(s) irreversible (mark as deleted otherwise) + * @param array $ids Record identifiers + * @param bool $force Remove record(s) irreversible (mark as deleted otherwise) * * @return int Number of records deleted */ @@ -745,7 +745,7 @@ class carddav_contacts extends rcube_addressbook * Undelete one or more contact records. * Only possible just after delete (see 2nd argument of delete() method). * - * @param array Record identifiers + * @param array $ids Record identifiers * * @return int Number of records restored */ @@ -802,7 +802,7 @@ class carddav_contacts extends rcube_addressbook /** * Create a contact group with the given name * - * @param string The group name + * @param string $name The group name * * @return mixed False on error, array with record props in success */ @@ -844,7 +844,7 @@ class carddav_contacts extends rcube_addressbook /** * Delete the given group and all linked group members * - * @param string Group identifier + * @param string $gid Group identifier * * @return bool True on success, false if no data was changed */ @@ -877,9 +877,9 @@ class carddav_contacts extends rcube_addressbook /** * Rename a specific contact group * - * @param string Group identifier - * @param string New name to set for this group - * @param string New group identifier (if changed, otherwise don't set) + * @param string $gid Group identifier + * @param string $newname New name to set for this group + * @param string $newid New group identifier (if changed, otherwise don't set) * * @return string|false New name on success, false if no data was changed */ @@ -919,8 +919,8 @@ class carddav_contacts extends rcube_addressbook /** * Add the given contact records the a certain group * - * @param string Group identifier - * @param array List of contact identifiers to be added + * @param string $gid Group identifier + * @param array $ids List of contact identifiers to be added * * @return int Number of contacts added */ @@ -1001,8 +1001,8 @@ class carddav_contacts extends rcube_addressbook /** * Remove the given contact records from a certain group * - * @param string Group identifier - * @param array List of contact identifiers to be removed + * @param string $gid Group identifier + * @param array $ids List of contact identifiers to be removed * * @return bool */ @@ -1059,8 +1059,8 @@ class carddav_contacts extends rcube_addressbook * Check the given data before saving. * If input not valid, the message to display can be fetched using get_error() * - * @param array Associative array with contact data to save - * @param bool Attempt to fix/complete data automatically + * @param array $save_data Associative array with contact data to save + * @param bool $autofix Attempt to fix/complete data automatically * * @return bool True if input is valid, False if not. */ diff --git a/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php b/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php index 50f6f797..881614ad 100644 --- a/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php +++ b/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php @@ -92,7 +92,7 @@ class carddav_contacts_driver /** * Delete address book folder * - * @param string $source Addressbook identifier + * @param string $folder Addressbook identifier * * @return bool */ diff --git a/plugins/kolab_addressbook/drivers/kolab/kolab_contacts.php b/plugins/kolab_addressbook/drivers/kolab/kolab_contacts.php index 1e730233..f062a118 100644 --- a/plugins/kolab_addressbook/drivers/kolab/kolab_contacts.php +++ b/plugins/kolab_addressbook/drivers/kolab/kolab_contacts.php @@ -157,6 +157,7 @@ class kolab_contacts extends rcube_addressbook } // extend coltypes configuration + /** @var kolab_format_contact $format */ $format = kolab_format::factory('contact'); $this->coltypes['phone']['subtypes'] = array_keys($format->phonetypes); @@ -285,7 +286,7 @@ class kolab_contacts extends rcube_addressbook /** * Save a search string for future listings * - * @param mixed Search params to use in listing method, obtained by get_search_set() + * @param mixed $filter Search params to use in listing method, obtained by get_search_set() */ public function set_search_set($filter): void { @@ -314,8 +315,8 @@ class kolab_contacts extends rcube_addressbook /** * List all active contact groups of this source * - * @param string Optional search string to match group name - * @param int Search mode. Sum of self::SEARCH_* + * @param string $search Optional search string to match group name + * @param int $mode Search mode. Sum of self::SEARCH_* * * @return array Indexed list of contact groups, each a hash array */ @@ -339,9 +340,9 @@ class kolab_contacts extends rcube_addressbook /** * List the current set of contact records * - * @param array List of cols to show - * @param int Only return this number of records, use negative values for tail - * @param bool True to skip the count query (select only) + * @param array $cols List of cols to show + * @param int $subset Only return this number of records, use negative values for tail + * @param bool $nocount True to skip the count query (select only) * * @return array Indexed list of contact records, each a hash array */ @@ -579,7 +580,7 @@ class kolab_contacts extends rcube_addressbook /** * Return the last result set * - * @return rcube_result_set Current result set or NULL if nothing selected yet + * @return ?rcube_result_set Current result set or NULL if nothing selected yet */ public function get_result() { @@ -589,10 +590,10 @@ class kolab_contacts extends rcube_addressbook /** * Get a specific contact record * - * @param mixed Record identifier(s) - * @param bool True to return record as associative array, otherwise a result set is returned + * @param mixed $id Record identifier(s) + * @param bool $assoc True to return record as associative array, otherwise a result set is returned * - * @return mixed Result object with all record fields or False if not found + * @return false|rcube_result_set Result object with all record fields or False if not found */ public function get_record($id, $assoc = false) { @@ -629,7 +630,7 @@ class kolab_contacts extends rcube_addressbook /** * Get group assignments of a specific contact record * - * @param mixed Record identifier + * @param mixed $id Record identifier * * @return array List of assigned groups as ID=>Name pairs */ @@ -653,10 +654,10 @@ class kolab_contacts extends rcube_addressbook /** * Create a new contact record * - * @param array Associative array with save data + * @param array $save_data Associative array with save data * Keys: Field name with optional section in the form FIELD:SECTION * Values: Field value. Can be either a string or an array of strings for multiple values - * @param bool True to check for duplicates first + * @param bool $check True to check for duplicates first * * @return mixed The created record ID on success, False on error */ @@ -706,8 +707,8 @@ class kolab_contacts extends rcube_addressbook /** * Update a specific contact record * - * @param mixed Record identifier - * @param array Associative array with save data + * @param mixed $id Record identifier + * @param array $save_data Associative array with save data * Keys: Field name with optional section in the form FIELD:SECTION * Values: Field value. Can be either a string or an array of strings for multiple values * @@ -741,8 +742,8 @@ class kolab_contacts extends rcube_addressbook /** * Mark one or more contact records as deleted * - * @param array Record identifiers - * @param bool Remove record(s) irreversible (mark as deleted otherwise) + * @param array $ids Record identifiers + * @param bool $force Remove record(s) irreversible (mark as deleted otherwise) * * @return int Number of records deleted */ @@ -794,7 +795,7 @@ class kolab_contacts extends rcube_addressbook * Undelete one or more contact records. * Only possible just after delete (see 2nd argument of delete() method). * - * @param array Record identifiers + * @param array $ids Record identifiers * * @return int Number of records restored */ @@ -850,9 +851,9 @@ class kolab_contacts extends rcube_addressbook /** * Create a contact group with the given name * - * @param string The group name + * @param string $name The group name * - * @return mixed False on error, array with record props in success + * @return array|false False on error, array with record props in success */ public function create_group($name) { @@ -887,7 +888,7 @@ class kolab_contacts extends rcube_addressbook /** * Delete the given group and all linked group members * - * @param string Group identifier + * @param string $gid Group identifier * * @return bool True on success, false if no data was changed */ @@ -919,9 +920,9 @@ class kolab_contacts extends rcube_addressbook /** * Rename a specific contact group * - * @param string Group identifier - * @param string New name to set for this group - * @param string New group identifier (if changed, otherwise don't set) + * @param string $gid Group identifier + * @param string $newname New name to set for this group + * @param string $newid New group identifier (if changed, otherwise don't set) * * @return bool New name on success, false if no data was changed */ @@ -953,9 +954,10 @@ class kolab_contacts extends rcube_addressbook /** * Add the given contact records the a certain group * - * @param string Group identifier - * @param array List of contact identifiers to be added - * @return int Number of contacts added + * @param string $gid Group identifier + * @param array $ids List of contact identifiers to be added + * + * @return int Number of contacts added */ public function add_to_group($gid, $ids) { @@ -1029,9 +1031,10 @@ class kolab_contacts extends rcube_addressbook /** * Remove the given contact records from a certain group * - * @param string Group identifier - * @param array List of contact identifiers to be removed - * @return int Number of deleted group members + * @param string $gid Group identifier + * @param array $ids List of contact identifiers to be removed + * + * @return int Number of deleted group members */ public function remove_from_group($gid, $ids) { @@ -1081,8 +1084,8 @@ class kolab_contacts extends rcube_addressbook * Check the given data before saving. * If input not valid, the message to display can be fetched using get_error() * - * @param array Associative array with contact data to save - * @param bool Attempt to fix/complete data automatically + * @param array $save_data Associative array with contact data to save + * @param bool $autofix Attempt to fix/complete data automatically * * @return bool True if input is valid, False if not. */ diff --git a/plugins/kolab_addressbook/drivers/kolab/kolab_contacts_driver.php b/plugins/kolab_addressbook/drivers/kolab/kolab_contacts_driver.php index 533c2bf5..ad5e8c24 100644 --- a/plugins/kolab_addressbook/drivers/kolab/kolab_contacts_driver.php +++ b/plugins/kolab_addressbook/drivers/kolab/kolab_contacts_driver.php @@ -87,7 +87,7 @@ class kolab_contacts_driver /** * Delete address book folder * - * @param string $source Addressbook identifier + * @param string $folder Addressbook identifier * * @return bool */ diff --git a/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php b/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php index 0d37e2ce..4e234881 100644 --- a/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php +++ b/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php @@ -177,7 +177,7 @@ class kolab_addressbook_ui /** * Handler for 'bookdetails' object returning form content for book create/edit * - * @param array $attr Object attributes + * @param array $attrib Object attributes * * @return string HTML output */ diff --git a/plugins/kolab_chat/kolab_chat.php b/plugins/kolab_chat/kolab_chat.php index 78140b23..e5fdab11 100644 --- a/plugins/kolab_chat/kolab_chat.php +++ b/plugins/kolab_chat/kolab_chat.php @@ -140,7 +140,7 @@ class kolab_chat extends rcube_plugin * Handler for preferences_sections_list hook. * Adds Chat settings section into preferences sections list. * - * @param array Original parameters + * @param array $p Original parameters * * @return array Modified parameters */ @@ -157,7 +157,7 @@ class kolab_chat extends rcube_plugin * Handler for preferences_list hook. * Adds options blocks into Chat settings sections in Preferences. * - * @param array Original parameters + * @param array $p Original parameters * * @return array Modified parameters */ @@ -201,7 +201,7 @@ class kolab_chat extends rcube_plugin * Handler for preferences_save hook. * Executed on Chat settings form submit. * - * @param array Original parameters + * @param array $p Original parameters * * @return array Modified parameters */ diff --git a/plugins/kolab_config/kolab_config.php b/plugins/kolab_config/kolab_config.php index 740d3a45..b72f0e3c 100644 --- a/plugins/kolab_config/kolab_config.php +++ b/plugins/kolab_config/kolab_config.php @@ -138,8 +138,8 @@ class kolab_config extends rcube_plugin /** * Load dictionary config objects from Kolab storage * - * @param string The language (2 chars) to load - * @param bool Only load objects from default folder + * @param string $lang The language (2 chars) to load + * @param bool $default Only load objects from default folder * * @return array|null Dictionary object as hash array */ diff --git a/plugins/kolab_delegation/kolab_delegation_engine.php b/plugins/kolab_delegation/kolab_delegation_engine.php index c0668819..8d12d845 100644 --- a/plugins/kolab_delegation/kolab_delegation_engine.php +++ b/plugins/kolab_delegation/kolab_delegation_engine.php @@ -556,7 +556,7 @@ class kolab_delegation_engine /** * Update LDAP record of current user * - * @param array List of delegates + * @param array $list List of delegates */ public function user_update_delegates($list) { @@ -900,7 +900,7 @@ class kolab_delegation_engine * @param array $acl1 ACL rights array (or string) * @param array $acl2 ACL rights array (or string) * - * @param bool True if $acl1 contains all rights from $acl2 + * @return bool True if $acl1 contains all rights from $acl2 */ public function acl_compare($acl1, $acl2) { @@ -920,9 +920,7 @@ class kolab_delegation_engine $cnt1 = count($res); $cnt2 = count($acl2); - if ($cnt1 >= $cnt2) { - return true; - } + return $cnt1 >= $cnt2; } /** diff --git a/plugins/kolab_notes/kolab_notes.php b/plugins/kolab_notes/kolab_notes.php index 465c4744..4a09a49c 100644 --- a/plugins/kolab_notes/kolab_notes.php +++ b/plugins/kolab_notes/kolab_notes.php @@ -276,8 +276,9 @@ class kolab_notes extends rcube_plugin /** * Search for shared or otherwise not listed folders the user has access * - * @param string Search string - * @param string Section/source to search + * @param string $query Search string + * @param string $source Section/source to search + * * @return array List of notes folders */ protected function search_lists($query, $source) @@ -374,8 +375,9 @@ class kolab_notes extends rcube_plugin /** * Get the kolab_calendar instance for the given calendar ID * - * @param string List identifier (encoded imap folder name) - * @return object kolab_storage_folder Object nor null if list doesn't exist + * @param string $id List identifier (encoded imap folder name) + * + * @return ?kolab_storage_folder Object nor null if list doesn't exist */ public function get_folder($id) { @@ -388,7 +390,7 @@ class kolab_notes extends rcube_plugin } } - return $this->folders[$id]; + return $this->folders[$id] ?? null; } /******* UI functions ********/ @@ -718,8 +720,9 @@ class kolab_notes extends rcube_plugin /** * Update an note record with the given data * - * @param array Hash array with note properties (id, list) - * @return boolean True on success, False on error + * @param array $note Hash array with note properties (id, list) + * + * @return bool True on success, False on error */ private function save_note(&$note) { @@ -813,9 +816,10 @@ class kolab_notes extends rcube_plugin /** * Remove a single note record from the backend * - * @param array Hash array with note properties (id, list) - * @param boolean Remove record irreversible (mark as deleted otherwise) - * @return boolean True on success, False on error + * @param array $note Hash array with note properties (id, list) + * @param bool $force Remove record irreversible (mark as deleted otherwise) + * + * @return bool True on success, False on error */ public function delete_note($note, $force = true) { @@ -886,7 +890,8 @@ class kolab_notes extends rcube_plugin /** * Provide a list of revisions for the given object * - * @param array $note Hash array with note properties + * @param array $note Hash array with note properties + * * @return array List of changes, each as a hash array */ public function get_changelog($note) @@ -908,8 +913,8 @@ class kolab_notes extends rcube_plugin /** * Return full data of a specific revision of a note record * - * @param mixed $note UID string or hash array with note properties - * @param mixed $rev Revision number + * @param mixed $note UID string or hash array with note properties + * @param mixed $rev Revision number * * @return array Note object as hash array */ @@ -940,8 +945,9 @@ class kolab_notes extends rcube_plugin /** * Get a list of property changes beteen two revisions of a note object * - * @param array $$note Hash array with note properties - * @param mixed $rev Revisions: "from:to" + * @param array $note Hash array with note properties + * @param mixed $rev1 Revision: "from" + * @param mixed $rev2 Revision: "to" * * @return array List of property changes, each as a hash array */ diff --git a/plugins/kolab_sso/lib/Firebase/JWT/JWT.php b/plugins/kolab_sso/lib/Firebase/JWT/JWT.php index ce75cbce..72020782 100644 --- a/plugins/kolab_sso/lib/Firebase/JWT/JWT.php +++ b/plugins/kolab_sso/lib/Firebase/JWT/JWT.php @@ -368,7 +368,7 @@ class JWT /** * Get the number of bytes in cryptographic strings. * - * @param string + * @param string $str * * @return int */ diff --git a/plugins/kolab_tags/lib/kolab_tags_engine.php b/plugins/kolab_tags/lib/kolab_tags_engine.php index 15802c6b..ef8f8277 100644 --- a/plugins/kolab_tags/lib/kolab_tags_engine.php +++ b/plugins/kolab_tags/lib/kolab_tags_engine.php @@ -534,7 +534,7 @@ class kolab_tags_engine /** * Builds member URI * - * @param array Message folder, UID, Search headers (Message-Id, Date) + * @param array $params Message folder, UID, Search headers (Message-Id, Date) * * @return string $url Member URI */ diff --git a/plugins/libcalendaring/lib/libcalendaring_itip.php b/plugins/libcalendaring/lib/libcalendaring_itip.php index 116dc857..f43e319c 100644 --- a/plugins/libcalendaring/lib/libcalendaring_itip.php +++ b/plugins/libcalendaring/lib/libcalendaring_itip.php @@ -86,14 +86,15 @@ class libcalendaring_itip /** * Send an iTip mail message * - * @param array Event object to send - * @param string iTip method (REQUEST|REPLY|CANCEL) - * @param array Hash array with recipient data (name, email) - * @param string Mail subject - * @param string Mail body text label - * @param object Mail_mime object with message data - * @param boolean Request RSVP - * @return boolean True on success, false on failure + * @param array $event Event object to send + * @param string $method iTip method (REQUEST|REPLY|CANCEL) + * @param array $recipient Hash array with recipient data (name, email) + * @param string $subject Mail subject + * @param string $bodytext Mail body text label + * @param Mail_mime $message An object with message data + * @param bool $rsvp Request RSVP + * + * @return bool True on success, false on failure */ public function send_itip_message($event, $method, $recipient, $subject, $bodytext, $message = null, $rsvp = true) { @@ -199,12 +200,13 @@ class libcalendaring_itip } /** - * Helper function to build a Mail_mime object to send an iTip message + * Helper function to build a Mail_mime object to send an iTip message. * - * @param array Event object to send - * @param string iTip method (REQUEST|REPLY|CANCEL) - * @param boolean Request RSVP - * @return object Mail_mime object with message data + * @param array $event Event object to send + * @param string $method iTip method (REQUEST|REPLY|CANCEL) + * @param bool $rsvp Request RSVP + * + * @return Mail_mime An object with message data */ public function compose_itip_message($event, $method, $rsvp = true) { @@ -314,11 +316,12 @@ class libcalendaring_itip /** * Forward the given iTip event as delegation to another person * - * @param array Event object to delegate - * @param mixed Delegatee as string or hash array with keys 'name' and 'mailto' - * @param boolean The delegator's RSVP flag - * @param array List with indexes of new/updated attendees - * @return boolean True on success, False on failure + * @param array $event Event object to delegate + * @param mixed $delegate Delegatee as string or hash array with keys 'name' and 'mailto' + * @param bool $rsvp The delegator's RSVP flag + * @param array $attendees List with indexes of new/updated attendees + * + * @return bool True on success, False on failure */ public function delegate_to(&$event, $delegate, $rsvp = false, &$attendees = []) { @@ -959,8 +962,9 @@ class libcalendaring_itip /** * Create iTIP invitation token for later replies via URL * - * @param array Hash array with event properties - * @param string Attendee email address + * @param array $event Hash array with event properties + * @param string $attendee Attendee email address + * * @return string Invitation token */ public function store_invitation($event, $attendee) @@ -972,7 +976,7 @@ class libcalendaring_itip /** * Mark invitations for the given event as cancelled * - * @param array Hash array with event properties + * @param array $event Hash array with event properties */ public function cancel_itip_invitation($event) { diff --git a/plugins/libcalendaring/lib/libcalendaring_recurrence.php b/plugins/libcalendaring/lib/libcalendaring_recurrence.php index 0314ea8d..f396a2af 100644 --- a/plugins/libcalendaring/lib/libcalendaring_recurrence.php +++ b/plugins/libcalendaring/lib/libcalendaring_recurrence.php @@ -60,8 +60,8 @@ class libcalendaring_recurrence /** * Initialize recurrence engine * - * @param array The recurrence properties - * @param DateTime The recurrence start date + * @param array $recurrence The recurrence properties + * @param DateTime $start The recurrence start date */ public function init($recurrence, $start) { diff --git a/plugins/libcalendaring/lib/libcalendaring_vcalendar.php b/plugins/libcalendaring/lib/libcalendaring_vcalendar.php index 9af59615..b27a762b 100644 --- a/plugins/libcalendaring/lib/libcalendaring_vcalendar.php +++ b/plugins/libcalendaring/lib/libcalendaring_vcalendar.php @@ -29,7 +29,6 @@ use Sabre\VObject\DateTimeParser; * * Uses the Sabre VObject library, version 3.x. */ - class libcalendaring_vcalendar implements Iterator { private $timezone; @@ -131,9 +130,9 @@ class libcalendaring_vcalendar implements Iterator /** * Import events from iCalendar format * - * @param string vCalendar input - * @param string Input charset (from envelope) - * @param bool True if parsing exceptions should be forwarded to the caller + * @param string $vcal vCalendar input + * @param string $charset Input charset (from envelope) + * @param bool $forward_exceptions True if parsing exceptions should be forwarded to the caller * * @return array List of events extracted from the input */ @@ -177,9 +176,9 @@ class libcalendaring_vcalendar implements Iterator /** * Read iCalendar events from a file * - * @param string File path to read from - * @param string Input charset (from envelope) - * @param bool True if parsing exceptions should be forwarded to the caller + * @param string $filepath File path to read from + * @param string $charset Input charset (from envelope) + * @param bool $forward_exceptions True if parsing exceptions should be forwarded to the caller * * @return array List of events extracted from the file */ @@ -200,10 +199,11 @@ class libcalendaring_vcalendar implements Iterator /** * Open a file to read iCalendar events sequentially * - * @param string File path to read from - * @param string Input charset (from envelope) - * @param boolean True if parsing exceptions should be forwarded to the caller - * @return boolean True if file contents are considered valid + * @param string $filepath File path to read from + * @param string $charset Input charset (from envelope) + * @param bool $forward_exceptions True if parsing exceptions should be forwarded to the caller + * + * @return bool True if file contents are considered valid */ public function fopen($filepath, $charset = 'UTF-8', $forward_exceptions = false) { @@ -314,7 +314,8 @@ class libcalendaring_vcalendar implements Iterator /** * Import objects from an already parsed Sabre\VObject\Component object * - * @param object Sabre\VObject\Component to read from + * @param Sabre\VObject\Component $vobject Component to read from + * * @return array List of events extracted from the file */ public function import_from_vobject($vobject) @@ -398,7 +399,8 @@ class libcalendaring_vcalendar implements Iterator /** * Convert the given VEvent object to a libkolab compatible array representation * - * @param object Vevent object to convert + * @param Sabre\VObject\Component\VEvent|Sabre\VObject\Component\VTodo $ve VEvent object to convert + * * @return array Hash array with object properties */ private function _to_array($ve) @@ -929,11 +931,11 @@ class libcalendaring_vcalendar implements Iterator /** * Create a Sabre\VObject\Property instance from a PHP DateTime object * - * @param object VObject\Document parent node to create property for - * @param string Property name - * @param DateTime Date time object - * @param bool Set as UTC date - * @param bool Set as VALUE=DATE property + * @param VObject\Document $cal Parent node to create property for + * @param string $name Property name + * @param DateTime $dt Date time object + * @param bool $utc Set as UTC date + * @param bool $dateonly Set as VALUE=DATE property * * @return Sabre\VObject\Property */ @@ -1004,14 +1006,15 @@ class libcalendaring_vcalendar implements Iterator /** * Export events to iCalendar format * - * @param array Events as array - * @param string VCalendar method to advertise - * @param boolean Directly send data to stdout instead of returning - * @param callable Callback function to fetch attachment contents, false if no attachment export - * @param boolean Add VTIMEZONE block with timezone definitions for the included events - * @return string Events in iCalendar format (http://tools.ietf.org/html/rfc5545) + * @param array $objects Events as array + * @param ?string $method VCalendar method to advertise + * @param bool $write Directly send data to stdout instead of returning + * @param ?callable $get_attachment Optional callback function to fetch attachment contents + * @param bool $with_timezones Add VTIMEZONE block with timezone definitions for the included events + * + * @return string Events in iCalendar format (http://tools.ietf.org/html/rfc5545) */ - public function export($objects, $method = null, $write = false, $get_attachment = false, $with_timezones = true) + public function export($objects, $method = null, $write = false, $get_attachment = null, $with_timezones = true) { $this->method = $method; @@ -1061,12 +1064,12 @@ class libcalendaring_vcalendar implements Iterator /** * Converts internal event representation to Sabre component * - * @param array Event - * @param callable Callback function to fetch attachment contents, false if no attachment export + * @param array $object Event + * @param ?callable $get_attachment Optional callback function to fetch attachment contents * * @return Sabre\VObject\Component\VEvent Sabre component */ - public function toSabreComponent($object, $get_attachment = false) + public function toSabreComponent($object, $get_attachment = null) { $vcal = new VObject\Component\VCalendar(); @@ -1078,10 +1081,10 @@ class libcalendaring_vcalendar implements Iterator /** * Build a valid iCal format block from the given event * - * @param array Hash array with event/task properties from libkolab - * @param object VCalendar object to append event to or false for directly sending data to stdout - * @param callable Callback function to fetch attachment contents, false if no attachment export - * @param object RECURRENCE-ID property when serializing a recurrence exception + * @param array $event Hash array with event/task properties from libkolab + * @param VObject\Component\VCalendar $vcal VCalendar object to append event to or false for directly sending data to stdout + * @param ?callable $get_attachment Optional callback function to fetch attachment contents + * @param object $recurrence_id RECURRENCE-ID property when serializing a recurrence exception */ private function _to_ical($event, $vcal, $get_attachment, $recurrence_id = null) { @@ -1410,10 +1413,10 @@ class libcalendaring_vcalendar implements Iterator * Returns a VTIMEZONE component for a Olson timezone identifier * with daylight transitions covering the given date range. * - * @param string $tzid Timezone ID as used in PHP's Date functions - * @param int $from Unix timestamp with first date/time in this timezone - * @param int $to Unix timestap with last date/time in this timezone - * @param VObject\Component\VCalendar Optional VCalendar component + * @param string $tzid Timezone ID as used in PHP's Date functions + * @param int $from Unix timestamp with first date/time in this timezone + * @param int $to Unix timestap with last date/time in this timezone + * @param Sabre\VObject\Component\VCalendar $cal Optional VCalendar component * * @return Sabre\VObject\Component|false Object representing a VTIMEZONE definition * or false if no timezone information is available diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php index 16763eca..9f80367e 100644 --- a/plugins/libcalendaring/libcalendaring.php +++ b/plugins/libcalendaring/libcalendaring.php @@ -171,7 +171,7 @@ class libcalendaring extends rcube_plugin /** * Load iCalendar functions * - * @return libcalendaring_vcalendar iCal parser + * @return libcalendaring_vcalendar iCal parser */ public static function get_ical() { @@ -198,11 +198,11 @@ class libcalendaring extends rcube_plugin } /** - * Shift dates into user's current timezone + * Shift dates into user's current timezone. * - * @param mixed Any kind of a date representation (DateTime object, string or unix timestamp) + * @param mixed $dt Any kind of a date representation (DateTime object, string or unix timestamp) * - * @return object DateTime object in user's timezone + * @return DateTime DateTime object in user's timezone */ public function adjust_timezone($dt, $dateonly = false) { @@ -431,7 +431,7 @@ class libcalendaring extends rcube_plugin /** * Get a list of email addresses of the given user (from login and identities) * - * @param string User Email (default to current user) + * @param string $user User Email (default to current user) * * @return array Email addresses related to the user */ @@ -471,7 +471,7 @@ class libcalendaring extends rcube_plugin * @param string $status The PARTSTAT value to set * @param bool $recursive Recurive call * - * @return mixed Email address of the updated attendee or False if none matching found + * @return string|false Email address of the updated attendee or False if none matching found */ public function set_partstat(&$event, $status, $recursive = true) { @@ -658,8 +658,9 @@ class libcalendaring extends rcube_plugin /** * Get the next alarm (time & action) for the given event * - * @param array Record data - * @return array Hash array with alarm time/type or null if no alarms are configured + * @param array $rec Record data + * + * @return array|null Hash array with alarm time/type or null if no alarms are configured */ public static function get_next_alarm($rec, $type = 'event') { @@ -1238,10 +1239,10 @@ class libcalendaring extends rcube_plugin /** * Read the given mime message from IMAP and parse ical data * - * @param string Mailbox name - * @param string Message UID - * @param string Message part ID and object index (e.g. '1.2:0') - * @param string Object type filter (optional) + * @param string $mbox Mailbox name + * @param string $uid Message UID + * @param string $mime_id Message part ID and object index (e.g. '1.2:0') + * @param string $type Object type filter (optional) * * @return array Hash array with the parsed iCal */ @@ -1295,10 +1296,10 @@ class libcalendaring extends rcube_plugin /** * Checks if specified message part is a vcalendar data * - * @param rcube_message_part Part object - * @param rcube_message Message object + * @param rcube_message_part $part Part object + * @param rcube_message $message Message object * - * @return boolean True if part is of type vcard + * @return bool True if part is of type vcard */ public static function part_is_vcalendar($part, $message = null) { @@ -1351,7 +1352,8 @@ class libcalendaring extends rcube_plugin /** * Return a date() format string to render identifiers for recurrence instances * - * @param array Hash array with event properties + * @param array $event Hash array with event properties + * * @return string Format string */ public static function recurrence_id_format($event) @@ -1362,8 +1364,8 @@ class libcalendaring extends rcube_plugin /** * Return the identifer for the given instance of a recurring event * - * @param array Hash array with event properties - * @param bool All-day flag from the main event + * @param array $event Hash array with event properties + * @param ?bool $allday All-day flag from the main event * * @return mixed Format string or null if identifier cannot be generated */ @@ -1385,8 +1387,8 @@ class libcalendaring extends rcube_plugin /** * Check if a specified event is "identical" to the specified recurrence exception * - * @param array Hash array with occurrence properties - * @param array Hash array with exception properties + * @param array $event Hash array with occurrence properties + * @param array $exception Hash array with exception properties * * @return bool */ diff --git a/plugins/libkolab/lib/kolab_date_recurrence.php b/plugins/libkolab/lib/kolab_date_recurrence.php index 906101f4..202328fb 100644 --- a/plugins/libkolab/lib/kolab_date_recurrence.php +++ b/plugins/libkolab/lib/kolab_date_recurrence.php @@ -52,7 +52,7 @@ class kolab_date_recurrence /** * Default constructor * - * @param kolab_format_xcal The Kolab object to operate on + * @param kolab_format_xcal $object The Kolab object to operate on */ public function __construct($object) { @@ -76,7 +76,7 @@ class kolab_date_recurrence /** * Get date/time of the next occurence of this event * - * @param bool Return a Unix timestamp instead of a DateTime object + * @param bool $timestamp Return a Unix timestamp instead of a DateTime object * * @return DateTime|int|false Object/unix timestamp or False if recurrence ended */ diff --git a/plugins/libkolab/lib/kolab_format.php b/plugins/libkolab/lib/kolab_format.php index 1e2c904a..629335e6 100644 --- a/plugins/libkolab/lib/kolab_format.php +++ b/plugins/libkolab/lib/kolab_format.php @@ -161,10 +161,11 @@ abstract class kolab_format /** * Factory method to instantiate a kolab_format object of the given type and version * - * @param string Object type to instantiate - * @param float Format version - * @param string Cached xml data to initialize with - * @return object kolab_format + * @param string $type Object type to instantiate + * @param string $version Format version + * @param string $xmldata Cached xml data to initialize with + * + * @return kolab_format */ public static function factory($type, $version = '3.0', $xmldata = null) { @@ -189,8 +190,9 @@ abstract class kolab_format /** * Determine support for the given format version * - * @param float Format version to check - * @return boolean True if supported, False otherwise + * @param float $version Format version to check + * + * @return bool True if supported, False otherwise */ public static function supports($version) { @@ -204,10 +206,10 @@ abstract class kolab_format /** * Convert the given date/time value into a cDateTime object * - * @param mixed Date/Time value either as unix timestamp, date string or PHP DateTime object - * @param DateTimeZone The timezone the date/time is in. Use global default if Null, local time if False - * @param bool True of the given date has no time component - * @param DateTimeZone The timezone to convert the date to before converting to cDateTime + * @param mixed $datetime Date/Time value either as unix timestamp, date string or PHP DateTime object + * @param DateTimeZone $tz The timezone the date/time is in. Use global default if Null, local time if False + * @param bool $dateonly True of the given date has no time component + * @param DateTimeZone $dest_tz The timezone to convert the date to before converting to cDateTime * * @return cDateTime The libkolabxml date/time object */ @@ -278,8 +280,8 @@ abstract class kolab_format /** * Convert the given cDateTime into a PHP DateTime object * - * @param cDateTime The libkolabxml datetime object - * @param DateTimeZone The timezone to convert the date to + * @param cDateTime $cdt The libkolabxml datetime object + * @param DateTimeZone $dest_tz The timezone to convert the date to * * @return libcalendaring_datetime PHP datetime instance */ @@ -320,7 +322,9 @@ abstract class kolab_format /** * Convert a libkolabxml vector to a PHP array * - * @param object vector Object + * @param vector $vec Object + * @param int $max Max vector size + * * @return array Indexed array containing vector elements */ public static function vector2array($vec, $max = PHP_INT_MAX) @@ -335,8 +339,9 @@ abstract class kolab_format /** * Build a libkolabxml vector (string) from a PHP array * - * @param array Array with vector elements - * @return object vectors + * @param array $arr Array with vector elements + * + * @return vectors */ public static function array2vector($arr) { @@ -352,15 +357,16 @@ abstract class kolab_format /** * Parse the X-Kolab-Type header from MIME messages and return the object type in short form * - * @param string X-Kolab-Type header value + * @param string $type X-Kolab-Type header value + * * @return string Kolab object type (contact,event,task,note,etc.) */ - public static function mime2object_type($x_kolab_type) + public static function mime2object_type($type) { return preg_replace( ['/dictionary.[a-z.]+$/', '/contact.distlist$/'], [ 'dictionary', 'distribution-list'], - substr($x_kolab_type, strlen(self::KTYPE_PREFIX)) + substr($type, strlen(self::KTYPE_PREFIX)) ); } @@ -386,7 +392,7 @@ abstract class kolab_format /** * Check for format errors after calling kolabformat::write*() * - * @return boolean True if there were errors, False if OK + * @return bool True if there were errors, False if OK */ protected function format_errors() { @@ -455,7 +461,8 @@ abstract class kolab_format /** * Get constant value for libkolab's version parameter * - * @param float Version value to convert + * @param float $v Version value to convert + * * @return int Constant value of either kolabobject::KolabV2 or kolabobject::KolabV3 or false if kolabobject module isn't available */ protected function libversion($v = null) @@ -498,8 +505,7 @@ abstract class kolab_format /** * Load Kolab object data from the given XML block * - * @param string XML data - * @return void + * @param string $xml XML data */ public function load($xml) { @@ -524,7 +530,8 @@ abstract class kolab_format /** * Write object data to XML format * - * @param float Format version to write + * @param float $version Format version to write + * * @return string XML data */ public function write($version = null) @@ -551,7 +558,7 @@ abstract class kolab_format /** * Set properties to the kolabformat object * - * @param array Object data as hash array + * @param array $object Object data as hash array */ public function set(&$object) { @@ -597,9 +604,9 @@ abstract class kolab_format /** * Convert the Kolab object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Kolab object data as hash array + * @return array Kolab object data as hash array */ public function to_array($data = []) { @@ -667,7 +674,7 @@ abstract class kolab_format /** * Utility function to extract object attachment data * - * @param array Hash array reference to append attachment data into + * @param array $object Hash array reference to append attachment data into */ public function get_attachments(&$object, $all = false) { @@ -706,8 +713,8 @@ abstract class kolab_format /** * Utility function to set attachment properties to the kolabformat object * - * @param array Object data as hash array - * @param boolean True to always overwrite attachment information + * @param array $object Object data as hash array + * @param bool $write True to always overwrite attachment information */ protected function set_attachments($object, $write = true) { diff --git a/plugins/libkolab/lib/kolab_format_configuration.php b/plugins/libkolab/lib/kolab_format_configuration.php index 0e93462e..29842137 100644 --- a/plugins/libkolab/lib/kolab_format_configuration.php +++ b/plugins/libkolab/lib/kolab_format_configuration.php @@ -44,7 +44,7 @@ class kolab_format_configuration extends kolab_format /** * Set properties to the kolabformat object * - * @param array Object data as hash array + * @param array $object Object data as hash array */ public function set(&$object) { @@ -146,9 +146,9 @@ class kolab_format_configuration extends kolab_format /** * Convert the Configuration object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Config object data as hash array + * @return array Config object data as hash array */ public function to_array($data = []) { diff --git a/plugins/libkolab/lib/kolab_format_contact.php b/plugins/libkolab/lib/kolab_format_contact.php index 91c1beeb..4a427969 100644 --- a/plugins/libkolab/lib/kolab_format_contact.php +++ b/plugins/libkolab/lib/kolab_format_contact.php @@ -87,7 +87,7 @@ class kolab_format_contact extends kolab_format /** * Set contact properties to the kolabformat object * - * @param array Contact data as hash array + * @param array $object Contact data as hash array */ public function set(&$object) { @@ -305,9 +305,9 @@ class kolab_format_contact extends kolab_format /** * Convert the Contact object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Contact data as hash array + * @return array Contact data as hash array */ public function to_array($data = []) { diff --git a/plugins/libkolab/lib/kolab_format_distributionlist.php b/plugins/libkolab/lib/kolab_format_distributionlist.php index 429a254e..32df4c31 100644 --- a/plugins/libkolab/lib/kolab_format_distributionlist.php +++ b/plugins/libkolab/lib/kolab_format_distributionlist.php @@ -35,7 +35,7 @@ class kolab_format_distributionlist extends kolab_format /** * Set properties to the kolabformat object * - * @param array Object data as hash array + * @param array $object Object data as hash array */ public function set(&$object) { @@ -85,9 +85,9 @@ class kolab_format_distributionlist extends kolab_format /** * Convert the Distlist object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Distribution list data as hash array + * @return array Distribution list data as hash array */ public function to_array($data = []) { @@ -120,5 +120,4 @@ class kolab_format_distributionlist extends kolab_format $this->data = $object; return $this->data; } - } diff --git a/plugins/libkolab/lib/kolab_format_event.php b/plugins/libkolab/lib/kolab_format_event.php index 8c1fb73b..1cb2f5da 100644 --- a/plugins/libkolab/lib/kolab_format_event.php +++ b/plugins/libkolab/lib/kolab_format_event.php @@ -52,7 +52,7 @@ class kolab_format_event extends kolab_format_xcal /** * Set event properties to the kolabformat object * - * @param array Event data as hash array + * @param array $object Event data as hash array */ public function set(&$object) { @@ -139,9 +139,9 @@ class kolab_format_event extends kolab_format_xcal /** * Convert the Event object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Event data as hash array + * @return array Event data as hash array */ public function to_array($data = []) { @@ -231,7 +231,8 @@ class kolab_format_event extends kolab_format_xcal /** * Getter for a single instance from a recurrence series or stored subcomponents * - * @param mixed The recurrence-id of the requested instance, either as string or a DateTime object + * @param mixed $recurrence_id The recurrence-id of the requested instance, either as string or a DateTime object + * * @return array Event data as hash array or null if not found */ public function get_instance($recurrence_id) diff --git a/plugins/libkolab/lib/kolab_format_file.php b/plugins/libkolab/lib/kolab_format_file.php index 766f362e..2008a0c9 100644 --- a/plugins/libkolab/lib/kolab_format_file.php +++ b/plugins/libkolab/lib/kolab_format_file.php @@ -34,7 +34,7 @@ class kolab_format_file extends kolab_format /** * Set properties to the kolabformat object * - * @param array Object data as hash array + * @param array $object Object data as hash array */ public function set(&$object) { @@ -92,9 +92,9 @@ class kolab_format_file extends kolab_format /** * Convert the Configuration object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Config object data as hash array + * @return array Config object data as hash array */ public function to_array($data = []) { diff --git a/plugins/libkolab/lib/kolab_format_journal.php b/plugins/libkolab/lib/kolab_format_journal.php index 37b03866..c3a9472b 100644 --- a/plugins/libkolab/lib/kolab_format_journal.php +++ b/plugins/libkolab/lib/kolab_format_journal.php @@ -35,7 +35,7 @@ class kolab_format_journal extends kolab_format /** * Set properties to the kolabformat object * - * @param array Object data as hash array + * @param array $object Object data as hash array */ public function set(&$object) { @@ -60,9 +60,9 @@ class kolab_format_journal extends kolab_format /** * Convert the Configuration object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Config object data as hash array + * @return array Config object data as hash array */ public function to_array($data = []) { @@ -79,5 +79,4 @@ class kolab_format_journal extends kolab_format $this->data = $object; return $this->data; } - } diff --git a/plugins/libkolab/lib/kolab_format_note.php b/plugins/libkolab/lib/kolab_format_note.php index 8b42d18d..5ebecadd 100644 --- a/plugins/libkolab/lib/kolab_format_note.php +++ b/plugins/libkolab/lib/kolab_format_note.php @@ -36,7 +36,7 @@ class kolab_format_note extends kolab_format /** * Set properties to the kolabformat object * - * @param array Object data as hash array + * @param array $object Object data as hash array */ public function set(&$object) { @@ -65,9 +65,9 @@ class kolab_format_note extends kolab_format /** * Convert the Configuration object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Config object data as hash array + * @return array Config object data as hash array */ public function to_array($data = []) { diff --git a/plugins/libkolab/lib/kolab_format_task.php b/plugins/libkolab/lib/kolab_format_task.php index d88f7ba0..5f96f0cc 100644 --- a/plugins/libkolab/lib/kolab_format_task.php +++ b/plugins/libkolab/lib/kolab_format_task.php @@ -46,7 +46,7 @@ class kolab_format_task extends kolab_format_xcal /** * Set properties to the kolabformat object * - * @param array Object data as hash array + * @param array $object Object data as hash array */ public function set(&$object) { @@ -94,9 +94,9 @@ class kolab_format_task extends kolab_format_xcal /** * Convert the Configuration object into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Config object data as hash array + * @return array Config object data as hash array */ public function to_array($data = []) { diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php index a4673e18..3375eb55 100644 --- a/plugins/libkolab/lib/kolab_format_xcal.php +++ b/plugins/libkolab/lib/kolab_format_xcal.php @@ -100,9 +100,9 @@ abstract class kolab_format_xcal extends kolab_format /** * Convert common xcard properties into a hash array data structure * - * @param array Additional data for merge + * @param array $data Additional data for merge * - * @return array Object data as hash array + * @return array Object data as hash array */ public function to_array($data = []) { @@ -322,7 +322,7 @@ abstract class kolab_format_xcal extends kolab_format /** * Set common xcal properties to the kolabformat object * - * @param array Event data as hash array + * @param array $object Event data as hash array */ public function set(&$object) { @@ -735,10 +735,10 @@ abstract class kolab_format_xcal extends kolab_format /** * Identify changes considered relevant for scheduling * - * @param array Hash array with NEW object properties - * @param array Hash array with OLD object properties + * @param array $object Hash array with NEW object properties + * @param array $old Hash array with OLD object properties * - * @return boolean True if changes affect scheduling, False otherwise + * @return bool True if changes affect scheduling, False otherwise */ public function check_rescheduling($object, $old = null) { diff --git a/plugins/libkolab/lib/kolab_ldap.php b/plugins/libkolab/lib/kolab_ldap.php index e76eec59..08a46c29 100644 --- a/plugins/libkolab/lib/kolab_ldap.php +++ b/plugins/libkolab/lib/kolab_ldap.php @@ -299,7 +299,7 @@ class kolab_ldap extends rcube_ldap_generic /** * Get a specific LDAP record * - * @param string DN + * @param string $dn DN * * @return array Record data */ diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php index 4fd49574..a84c101c 100644 --- a/plugins/libkolab/lib/kolab_storage.php +++ b/plugins/libkolab/lib/kolab_storage.php @@ -167,8 +167,8 @@ class kolab_storage /** * Get a list of storage folders for the given data type * - * @param string Data type to list folders for (contact,distribution-list,event,task,note) - * @param bool Enable to return subscribed folders only (null to use configured subscription mode) + * @param string $type Data type to list folders for (contact,distribution-list,event,task,note) + * @param ?bool $subscribed Enable to return subscribed folders only (null to use configured subscription mode) * * @return array List of Kolab_Folder objects (folder names in UTF7-IMAP) */ @@ -188,7 +188,8 @@ class kolab_storage /** * Getter for the storage folder for the given type * - * @param string Data type to list folders for (contact,distribution-list,event,task,note) + * @param string $type Data type to list folders for (contact,distribution-list,event,task,note) + * * @return object kolab_storage_folder The folder object */ public static function get_default_folder($type) @@ -205,8 +206,8 @@ class kolab_storage /** * Getter for a specific storage folder * - * @param string IMAP folder to access (UTF7-IMAP) - * @param string Expected folder type + * @param string $folder IMAP folder to access (UTF7-IMAP) + * @param string $type Expected folder type * * @return object kolab_storage_folder The folder object */ @@ -219,8 +220,9 @@ class kolab_storage * Getter for a single Kolab object, identified by its UID. * This will search all folders storing objects of the given type. * - * @param string Object UID - * @param string Object type (contact,event,task,journal,file,note,configuration) + * @param string $uid Object UID + * @param string $type Object type (contact,event,task,journal,file,note,configuration) + * * @return array The Kolab object represented as hash array or false if not found */ public static function get_object($uid, $type) @@ -245,9 +247,9 @@ class kolab_storage /** * Execute cross-folder searches with the given query. * - * @param array Pseudo-SQL query as list of filter parameter triplets - * @param string Folder type (contact,event,task,journal,file,note,configuration) - * @param int Expected number of records or limit (for performance reasons) + * @param array $query Pseudo-SQL query as list of filter parameter triplets + * @param string $type Folder type (contact,event,task,journal,file,note,configuration) + * @param ?int $limit Expected number of records or limit (for performance reasons) * * @return array List of Kolab data objects (each represented as hash array) * @see kolab_storage_format::select() @@ -291,9 +293,9 @@ class kolab_storage /** * Compose an URL to query the free/busy status for the given user * - * @param string Email address of the user to get free/busy data for - * @param object DateTime Start of the query range (optional) - * @param object DateTime End of the query range (optional) + * @param string $email Email address of the user to get free/busy data for + * @param ?DateTime $start Start of the query range (optional) + * @param ?DateTime $end End of the query range (optional) * * @return ?string Fully qualified URL to query free/busy data */ @@ -367,6 +369,7 @@ class kolab_storage * Convert the given identifier back to it's raw value * * @param string $id Ascii identifier + * * @return string Raw identifier string */ public static function id_decode($id) @@ -377,7 +380,8 @@ class kolab_storage /** * Return the (first) path of the requested IMAP namespace * - * @param string Namespace name (personal, shared, other) + * @param string $name Namespace name (personal, shared, other) + * * @return string IMAP root path for that namespace */ public static function namespace_root($name) @@ -849,11 +853,11 @@ class kolab_storage /** * Returns a list of folder names * - * @param string Optional root folder - * @param string Optional name pattern - * @param string Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) - * @param bool Enable to return subscribed folders only (null to use configured subscription mode) - * @param array Will be filled with folder-types data + * @param string $root Optional root folder + * @param string $mbox Optional name pattern + * @param string $filter Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) + * @param bool $subscribed Enable to return subscribed folders only (null to use configured subscription mode) + * @param array $folderdata Will be filled with folder-types data * * @return array List of folders */ @@ -979,9 +983,9 @@ class kolab_storage /** * Search for shared or otherwise not listed groupware folders the user has access * - * @param string Folder type of folders to search for - * @param string Search string - * @param array Namespace(s) to exclude results from + * @param string $type Folder type of folders to search for + * @param string $query Search string + * @param array $exclude_ns Namespace(s) to exclude results from * * @return array List of matching kolab_storage_folder objects */ @@ -1012,7 +1016,8 @@ class kolab_storage /** * Sort the given list of kolab folders by namespace/name * - * @param array List of kolab_storage_folder objects + * @param array $folders List of kolab_storage_folder objects + * * @return array Sorted list of folders */ public static function sort_folders($folders) @@ -1042,8 +1047,8 @@ class kolab_storage /** * Check the folder tree and add the missing parents as virtual folders * - * @param array $folders Folders list - * @param object $tree Reference to the root node of the folder tree + * @param array $folders Folders list + * @param object $tree Reference to the root node of the folder tree * * @return array Flat folders list */ @@ -1234,7 +1239,7 @@ class kolab_storage * Check subscription status of this folder * * @param string $folder Folder name - * @param bool $temp Include temporary/session subscriptions + * @param bool $temp Include temporary/session subscriptions * * @return bool True if subscribed, false if not */ @@ -1508,11 +1513,11 @@ class kolab_storage /** * Search users in Kolab LDAP storage * - * @param mixed $query Search value (or array of field => value pairs) - * @param int $mode Matching mode: 0 - partial (*abc*), 1 - strict (=), 2 - prefix (abc*) - * @param array $required List of fields that shall ot be empty - * @param int $limit Maximum number of records - * @param int $count Returns the number of records found + * @param mixed $query Search value (or array of field => value pairs) + * @param int $mode Matching mode: 0 - partial (*abc*), 1 - strict (=), 2 - prefix (abc*) + * @param array $required List of fields that shall ot be empty + * @param int $limit Maximum number of records + * @param int $count Returns the number of records found * * @return array List of users */ @@ -1549,10 +1554,10 @@ class kolab_storage /** * Returns a list of IMAP folders shared by the given user * - * @param array User entry from LDAP - * @param string Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) - * @param int 1 - subscribed folders only, 0 - all folders, 2 - all non-active - * @param array Will be filled with folder-types data + * @param array $user User entry from LDAP + * @param string $type Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) + * @param int $subscribed 1 - subscribed folders only, 0 - all folders, 2 - all non-active + * @param array $folderdata Will be filled with folder-types data * * @return array List of folders */ @@ -1588,8 +1593,8 @@ class kolab_storage /** * Get a list of (virtual) top-level folders from the other users namespace * - * @param string Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) - * @param bool Enable to return subscribed folders only (null to use configured subscription mode) + * @param string $type Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) + * @param bool $subscribed Enable to return subscribed folders only (null to use configured subscription mode) * * @return array List of kolab_storage_folder_user objects */ diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php index f6303e5d..3d00b077 100644 --- a/plugins/libkolab/lib/kolab_storage_cache.php +++ b/plugins/libkolab/lib/kolab_storage_cache.php @@ -118,11 +118,11 @@ class kolab_storage_cache /** * Connect cache with a storage folder * - * @param kolab_storage_folder The storage folder instance to connect with + * @param kolab_storage_folder $folder The storage folder instance to connect with */ - public function set_folder(kolab_storage_folder $storage_folder) + public function set_folder(kolab_storage_folder $folder) { - $this->folder = $storage_folder; + $this->folder = $folder; if (empty($this->folder->name) || !$this->folder->valid) { $this->ready = false; @@ -481,10 +481,11 @@ class kolab_storage_cache /** * Read a single entry from cache or from IMAP directly * - * @param string Related IMAP message UID - * @param string Object type to read - * @param string IMAP folder name the entry relates to - * @param array Hash array with object properties or null if not found + * @param string $msguid Related IMAP message UID + * @param string $type Object type to read + * @param string $foldername IMAP folder name the entry relates to + * + * @return array|null Hash array with object properties or null if not found */ public function get($msguid, $type = null, $foldername = null) { @@ -561,9 +562,9 @@ class kolab_storage_cache /** * Insert/Update a cache entry * - * @param string Related IMAP message UID - * @param mixed Hash array with object properties to save or false to delete the cache entry - * @param string IMAP folder name the entry relates to + * @param string $msguid Related IMAP message UID + * @param mixed $object Hash array with object properties to save or false to delete the cache entry + * @param string $foldername IMAP folder name the entry relates to */ public function set($msguid, $object, $foldername = null) { @@ -605,9 +606,9 @@ class kolab_storage_cache /** * Insert (or update) a cache entry * - * @param int Related IMAP message UID - * @param mixed Hash array with object properties to save or false to delete the cache entry - * @param int Optional old message UID (for update) + * @param int $msguid Related IMAP message UID + * @param mixed $object Hash array with object properties to save or false to delete the cache entry + * @param int $olduid Optional old message UID (for update) */ public function save($msguid, $object, $olduid = null) { @@ -664,10 +665,10 @@ class kolab_storage_cache /** * Move an existing cache entry to a new resource * - * @param string Entry's IMAP message UID - * @param string Entry's Object UID - * @param kolab_storage_folder Target storage folder instance - * @param string Target entry's IMAP message UID + * @param string $msguid Entry's IMAP message UID + * @param string $uid Entry's Object UID + * @param kolab_storage_folder $target Target storage folder instance + * @param string $new_msguid Target entry's IMAP message UID */ public function move($msguid, $uid, $target, $new_msguid = null) { @@ -728,7 +729,7 @@ class kolab_storage_cache /** * Update resource URI for existing cache entries * - * @param string Target IMAP folder to move it to + * @param string $new_folder Target IMAP folder to move it to */ public function rename($new_folder) { @@ -754,11 +755,11 @@ class kolab_storage_cache /** * Select Kolab objects filtered by the given query * - * @param array Pseudo-SQL query as list of filter parameter triplets - * triplet: array('', '', '') - * @param bool Set true to only return UIDs instead of complete objects - * @param bool Use fast mode to fetch only minimal set of information - * (no xml fetching and parsing, etc.) + * @param array $query Pseudo-SQL query as list of filter parameter triplets + * triplet: array('', '', '') + * @param bool $uids Set true to only return UIDs instead of complete objects + * @param bool $fast Use fast mode to fetch only minimal set of information + * (no xml fetching and parsing, etc.) * * @return null|array|kolab_storage_dataset List of Kolab data objects * (each represented as hash array) or UIDs @@ -853,7 +854,7 @@ class kolab_storage_cache /** * Get number of objects mathing the given query * - * @param array $query Pseudo-SQL query as list of filter parameter triplets + * @param array $query Pseudo-SQL query as list of filter parameter triplets * * @return int|null The number of objects of the given type, Null on error */ @@ -1006,9 +1007,10 @@ class kolab_storage_cache /** * Fetch messages from IMAP * - * @param array List of message UIDs to fetch - * @param string Requested object type or * for all - * @param string IMAP folder to read from + * @param array $index List of message UIDs to fetch + * @param string $type Requested object type or * for all + * @param string $folder IMAP folder to read from + * * @return array List of parsed Kolab objects */ protected function _fetch($index, $type = null, $folder = null) @@ -1107,8 +1109,8 @@ class kolab_storage_cache /** * Write records into cache using extended inserts to reduce the number of queries to be executed * - * @param int Message UID. Set 0 to commit buffered inserts - * @param array Kolab object to cache + * @param int $msguid Message UID. Set 0 to commit buffered inserts + * @param array $object Kolab object to cache */ protected function _extended_insert($msguid, $object) { @@ -1323,9 +1325,10 @@ class kolab_storage_cache /** * Resolve an object UID into an IMAP message UID * - * @param string Kolab object UID - * @param boolean Include deleted objects - * @return int The resolved IMAP message UID + * @param string $uid Kolab object UID + * @param bool $deleted Include deleted objects + * + * @return int|null The resolved IMAP message UID */ public function uid2msguid($uid, $deleted = false) { diff --git a/plugins/libkolab/lib/kolab_storage_cache_configuration.php b/plugins/libkolab/lib/kolab_storage_cache_configuration.php index a5bb4d7a..71229d76 100644 --- a/plugins/libkolab/lib/kolab_storage_cache_configuration.php +++ b/plugins/libkolab/lib/kolab_storage_cache_configuration.php @@ -55,10 +55,10 @@ class kolab_storage_cache_configuration extends kolab_storage_cache /** * Select Kolab objects filtered by the given query * - * @param array Pseudo-SQL query as list of filter parameter triplets - * @param boolean Set true to only return UIDs instead of complete objects - * @param boolean Use fast mode to fetch only minimal set of information - * (no xml fetching and parsing, etc.) + * @param array $query Pseudo-SQL query as list of filter parameter triplets + * @param bool $uids Set true to only return UIDs instead of complete objects + * @param bool $fast Use fast mode to fetch only minimal set of information + * (no xml fetching and parsing, etc.) * * @return array List of Kolab data objects (each represented as hash array) or UIDs */ diff --git a/plugins/libkolab/lib/kolab_storage_config.php b/plugins/libkolab/lib/kolab_storage_config.php index 2f1ee268..4fbf5875 100644 --- a/plugins/libkolab/lib/kolab_storage_config.php +++ b/plugins/libkolab/lib/kolab_storage_config.php @@ -274,7 +274,7 @@ class kolab_storage_config /** * Builds relation member URI * - * @param string|array Object UUID or Message folder, UID, Search headers (Message-Id, Date) + * @param string|array $params Object UUID or Message folder, UID, Search headers (Message-Id, Date) * * @return string $url Member URI */ @@ -793,7 +793,7 @@ class kolab_storage_config /** * Find objects linked with the given groupware object through a relation * - * @param string Object UUID + * @param string $uid Object UUID * * @return array List of related URIs */ diff --git a/plugins/libkolab/lib/kolab_storage_dataset.php b/plugins/libkolab/lib/kolab_storage_dataset.php index f1b2b6e6..64bf5068 100644 --- a/plugins/libkolab/lib/kolab_storage_dataset.php +++ b/plugins/libkolab/lib/kolab_storage_dataset.php @@ -40,7 +40,7 @@ class kolab_storage_dataset implements Iterator, ArrayAccess, Countable /** * Default constructor * - * @param object kolab_storage_cache instance to be used for fetching objects upon access + * @param kolab_storage_cache $cache Cache instance to be used for fetching objects upon access */ public function __construct($cache) { diff --git a/plugins/libkolab/lib/kolab_storage_dav.php b/plugins/libkolab/lib/kolab_storage_dav.php index fe543da1..24298104 100644 --- a/plugins/libkolab/lib/kolab_storage_dav.php +++ b/plugins/libkolab/lib/kolab_storage_dav.php @@ -46,7 +46,7 @@ class kolab_storage_dav /** * Get a list of storage folders for the given data type * - * @param string Data type to list folders for (contact,event,task,note) + * @param string $type Data type to list folders for (contact,event,task,note) * * @return array List of kolab_storage_dav_folder objects */ @@ -77,7 +77,7 @@ class kolab_storage_dav /** * Getter for the storage folder for the given type * - * @param string Data type to list folders for (contact,event,task,note) + * @param string $type Data type to list folders for (contact,event,task,note) * * @return kolab_storage_dav_folder|null The folder object */ @@ -110,8 +110,8 @@ class kolab_storage_dav * Getter for a single Kolab object, identified by its UID. * This will search all folders storing objects of the given type. * - * @param string Object UID - * @param string Object type (contact,event,task,journal,file,note,configuration) + * @param string $uid Object UID + * @param string $type Object type (contact,event,task,journal,file,note,configuration) * * @return array The Kolab object represented as hash array or false if not found */ @@ -124,9 +124,9 @@ class kolab_storage_dav /** * Execute cross-folder searches with the given query. * - * @param array Pseudo-SQL query as list of filter parameter triplets - * @param string Folder type (contact,event,task,journal,file,note,configuration) - * @param int Expected number of records or limit (for performance reasons) + * @param array $query Pseudo-SQL query as list of filter parameter triplets + * @param string $type Folder type (contact,event,task,journal,file,note,configuration) + * @param int $limit Expected number of records or limit (for performance reasons) * * @return array List of Kolab data objects (each represented as hash array) */ @@ -150,9 +150,9 @@ class kolab_storage_dav /** * Compose an URL to query the free/busy status for the given user * - * @param string Email address of the user to get free/busy data for - * @param object DateTime Start of the query range (optional) - * @param object DateTime End of the query range (optional) + * @param string $email Email address of the user to get free/busy data for + * @param ?DateTime $start Start of the query range (optional) + * @param ?DateTime $end End of the query range (optional) * * @return ?string Fully qualified URL to query free/busy data */ @@ -318,11 +318,11 @@ class kolab_storage_dav /** * Returns a list of folder names * - * @param string Optional root folder - * @param string Optional name pattern - * @param string Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) - * @param bool Enable to return subscribed folders only (null to use configured subscription mode) - * @param array Will be filled with folder-types data + * @param string $root Optional root folder + * @param string $mbox Optional name pattern + * @param string $filter Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) + * @param bool $subscribed Enable to return subscribed folders only (null to use configured subscription mode) + * @param array $folderdata Will be filled with folder-types data * * @return array List of folders */ @@ -335,9 +335,9 @@ class kolab_storage_dav /** * Search for shared or otherwise not listed groupware folders the user has access * - * @param string Folder type of folders to search for - * @param string Search string - * @param array Namespace(s) to exclude results from + * @param string $type Folder type of folders to search for + * @param string $query Search string + * @param array $exclude_ns Namespace(s) to exclude results from * * @return array List of matching kolab_storage_folder objects */ @@ -350,7 +350,7 @@ class kolab_storage_dav /** * Sort the given list of folders by namespace/name * - * @param array List of kolab_storage_dav_folder objects + * @param array $folders List of kolab_storage_dav_folder objects * * @return array Sorted list of folders */ @@ -432,7 +432,7 @@ class kolab_storage_dav * Change subscription status of this folder * * @param string $folder Folder name - * @param bool $temp Only remove temporary subscription + * @param bool $temp Only remove temporary subscription * * @return True on success, false on error */ @@ -496,10 +496,10 @@ class kolab_storage_dav /** * Returns a list of IMAP folders shared by the given user * - * @param array User entry from LDAP - * @param string Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) - * @param int 1 - subscribed folders only, 0 - all folders, 2 - all non-active - * @param array Will be filled with folder-types data + * @param array $user User entry from LDAP + * @param string $type Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) + * @param int $subscribed 1 - subscribed folders only, 0 - all folders, 2 - all non-active + * @param array $folderdata Will be filled with folder-types data * * @return array List of folders */ @@ -512,8 +512,8 @@ class kolab_storage_dav /** * Get a list of (virtual) top-level folders from the other users namespace * - * @param string Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) - * @param bool Enable to return subscribed folders only (null to use configured subscription mode) + * @param string $type Data type to list folders for (contact,event,task,journal,file,note,mail,configuration) + * @param bool $subscribed Enable to return subscribed folders only (null to use configured subscription mode) * * @return array List of kolab_storage_folder_user objects */ diff --git a/plugins/libkolab/lib/kolab_storage_dav_cache.php b/plugins/libkolab/lib/kolab_storage_dav_cache.php index c976c9ff..4c346cf2 100644 --- a/plugins/libkolab/lib/kolab_storage_dav_cache.php +++ b/plugins/libkolab/lib/kolab_storage_dav_cache.php @@ -44,7 +44,7 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Connect cache with a storage folder * - * @param kolab_storage_folder The storage folder instance to connect with + * @param kolab_storage_folder $storage_folder The storage folder instance to connect with */ public function set_folder(kolab_storage_folder $storage_folder) { @@ -254,9 +254,9 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Read a single entry from cache or from server directly * - * @param string Object UID - * @param string Object type to read - * @param string Unused (kept for compat. with the parent class) + * @param string $uid Object UID + * @param string $type Object type to read + * @param string $unused Unused (kept for compat. with the parent class) * * @return null|array An array of objects, NULL if not found */ @@ -289,7 +289,7 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Read multiple entries from the server directly * - * @param array Object UIDs + * @param array $uids Object UIDs * * @return false|array An array of objects, False on error */ @@ -301,9 +301,9 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Insert/Update a cache entry * - * @param string Object UID - * @param array|false Hash array with object properties to save or false to delete the cache entry - * @param string Unused (kept for compat. with the parent class) + * @param string $uid Object UID + * @param array|false $object Hash array with object properties to save or false to delete the cache entry + * @param string $unused Unused (kept for compat. with the parent class) */ public function set($uid, $object, $unused = null) { @@ -326,9 +326,9 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Insert (or update) a cache entry * - * @param mixed Hash array with object properties to save or false to delete the cache entry - * @param string Optional old message UID (for update) - * @param string Unused (kept for compat. with the parent class) + * @param mixed $object Hash array with object properties to save or false to delete the cache entry + * @param string $olduid Optional old message UID (for update) + * @param string $unused Unused (kept for compat. with the parent class) */ public function save($object, $olduid = null, $unused = null) { @@ -378,10 +378,10 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Move an existing cache entry to a new resource * - * @param string Entry's UID - * @param kolab_storage_folder Target storage folder instance - * @param string Unused (kept for compat. with the parent class) - * @param string Unused (kept for compat. with the parent class) + * @param string $uid Entry's UID + * @param kolab_storage_folder $target Target storage folder instance + * @param string $unused1 Unused (kept for compat. with the parent class) + * @param string $unused2 Unused (kept for compat. with the parent class) */ public function move($uid, $target, $unused1 = null, $unused2 = null) { @@ -391,7 +391,7 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Update resource URI for existing folder * - * @param string Target DAV folder to move it to + * @param string $new_folder Target DAV folder to move it to */ public function rename($new_folder) { @@ -401,11 +401,11 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Select Kolab objects filtered by the given query * - * @param array Pseudo-SQL query as list of filter parameter triplets - * triplet: ['', '', ''] - * @param bool Set true to only return UIDs instead of complete objects - * @param bool Use fast mode to fetch only minimal set of information - * (no xml fetching and parsing, etc.) + * @param array $query Pseudo-SQL query as list of filter parameter triplets + * triplet: ['', '', ''] + * @param bool $uids Set true to only return UIDs instead of complete objects + * @param bool $fast Use fast mode to fetch only minimal set of information + * (no xml fetching and parsing, etc.) * * @return array|null|kolab_storage_dataset List of Kolab data objects (each represented as hash array) or UIDs */ @@ -501,8 +501,8 @@ class kolab_storage_dav_cache extends kolab_storage_cache /** * Write records into cache using extended inserts to reduce the number of queries to be executed * - * @param bool Set to false to commit buffered insert, true to force an insert - * @param array Kolab object to cache + * @param bool $force Set to false to commit buffered insert, true to force an insert + * @param array $object Kolab object to cache */ protected function _extended_insert($force, $object) { diff --git a/plugins/libkolab/lib/kolab_storage_dav_folder.php b/plugins/libkolab/lib/kolab_storage_dav_folder.php index 36349a21..227a7f86 100644 --- a/plugins/libkolab/lib/kolab_storage_dav_folder.php +++ b/plugins/libkolab/lib/kolab_storage_dav_folder.php @@ -57,7 +57,7 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Returns the owner of the folder. * - * @param bool Return a fully qualified owner name (i.e. including domain for shared folders) + * @param bool $fully_qualified Return a fully qualified owner name (i.e. including domain for shared folders) * * @return string The owner of this folder. */ @@ -177,7 +177,7 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Get the color value stored in metadata * - * @param string Default color value to return if not set + * @param string $default Default color value to return if not set * * @return mixed Color value from the folder metadata or $default if not set */ @@ -220,7 +220,7 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Change activation status of this folder * - * @param bool The desired subscription status: true = active, false = not active + * @param bool $active The desired subscription status: true = active, false = not active * * @return bool True on success, false on error */ @@ -242,7 +242,7 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Change subscription status of this folder * - * @param bool The desired subscription status: true = subscribed, false = not subscribed + * @param bool $subscribed The desired subscription status: true = subscribed, false = not subscribed * * @return True on success, false on error */ @@ -324,8 +324,8 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Move a Kolab object message to another IMAP folder * - * @param string Object UID - * @param kolab_storage_dav_folder Target folder to move object into + * @param string $uid Object UID + * @param kolab_storage_dav_folder $target_folder Target folder to move object into * * @return bool True on success, false on failure */ @@ -411,9 +411,9 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Fetch the object the DAV server and convert to internal format * - * @param string The object UID to fetch - * @param string The object type expected (use wildcard '*' to accept all types) - * @param string Unused (kept for compat. with the parent class) + * @param string $uid The object UID to fetch + * @param string $type The object type expected (use wildcard '*' to accept all types) + * @param string $folder Unused (kept for compat. with the parent class) * * @return mixed Hash array representing the Kolab object, a kolab_format instance or false if not found */ @@ -440,7 +440,7 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Fetch multiple objects from the DAV server and convert to internal format * - * @param array The object UIDs to fetch + * @param array $uids The object UIDs to fetch * * @return mixed Hash array representing the Kolab objects */ @@ -498,7 +498,7 @@ class kolab_storage_dav_folder extends kolab_storage_folder /** * Convert DAV object into PHP array * - * @param array Object data in kolab_dav_client::fetchData() format + * @param array $object Object data in kolab_dav_client::fetchData() format * * @return array|false Object properties, False on error */ diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php index 161ed2b5..34efb1c7 100644 --- a/plugins/libkolab/lib/kolab_storage_folder.php +++ b/plugins/libkolab/lib/kolab_storage_folder.php @@ -43,9 +43,9 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Default constructor * - * @param string The folder name/path - * @param string Expected folder type - * @param string Optional folder type if known + * @param string $name The folder name/path + * @param ?string $type Expected folder type + * @param ?string $type_annotation Optional folder type if known */ public function __construct($name, $type = null, $type_annotation = null) { @@ -56,9 +56,9 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Set the IMAP folder this instance connects to * - * @param string The folder name/path - * @param string Expected folder type - * @param string Optional folder type if known + * @param string $name The folder name/path + * @param ?string $type Expected folder type + * @param ?string $type_annotation Optional folder type if known */ public function set_folder($name, $type = null, $type_annotation = null) { @@ -179,7 +179,7 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Helper method to set an UID value to the given IMAP folder instance * - * @param string Folder's UID + * @param string $uid Folder's UID * * @return bool True on succes, False on failure */ @@ -214,7 +214,7 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Change activation status of this folder * - * @param bool The desired subscription status: true = active, false = not active + * @param bool $active The desired subscription status: true = active, false = not active * * @return True on success, false on error */ @@ -236,7 +236,7 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Change subscription status of this folder * - * @param bool The desired subscription status: true = subscribed, false = not subscribed + * @param bool $subscribed The desired subscription status: true = subscribed, false = not subscribed * * @return True on success, false on error */ @@ -248,8 +248,8 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Get number of objects stored in this folder * - * @param mixed Pseudo-SQL query as list of filter parameter triplets - * or string with object type (e.g. contact, event, todo, journal, note, configuration) + * @param mixed $query Pseudo-SQL query as list of filter parameter triplets + * or string with object type (e.g. contact, event, todo, journal, note, configuration) * * @return int|null The number of objects of the given type, Null on error * @see self::select() @@ -288,8 +288,8 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * List Kolab objects matching the given query * - * @param mixed Pseudo-SQL query as list of filter parameter triplets - * or string with object type (e.g. contact, event, todo, journal, note, configuration) + * @param mixed $query Pseudo-SQL query as list of filter parameter triplets + * or string with object type (e.g. contact, event, todo, journal, note, configuration) * * @return array List of Kolab data objects (each represented as hash array) * @deprecated Use select() @@ -302,10 +302,10 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Select Kolab objects matching the given query * - * @param mixed Pseudo-SQL query as list of filter parameter triplets - * or string with object type (e.g. contact, event, todo, journal, note, configuration) - * @param bool Use fast mode to fetch only minimal set of information - * (no xml fetching and parsing, etc.) + * @param mixed $query Pseudo-SQL query as list of filter parameter triplets + * or string with object type (e.g. contact, event, todo, journal, note, configuration) + * @param bool $fast Use fast mode to fetch only minimal set of information + * (no xml fetching and parsing, etc.) * * @return null|array|kolab_storage_dataset List of Kolab data objects (each represented as hash array) */ @@ -325,7 +325,8 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Getter for object UIDs only * - * @param array Pseudo-SQL query as list of filter parameter triplets + * @param array $query Pseudo-SQL query as list of filter parameter triplets + * * @return array List of Kolab object UIDs */ public function get_uids($query = []) @@ -344,9 +345,9 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Setter for ORDER BY and LIMIT parameters for cache queries * - * @param array List of columns to order by - * @param integer Limit result set to this length - * @param integer Offset row + * @param array $sortcols List of columns to order by + * @param int $length Limit result set to this length + * @param int $offset Offset row */ public function set_order_and_limit($sortcols, $length = null, $offset = 0) { @@ -388,13 +389,13 @@ class kolab_storage_folder extends kolab_storage_folder_api * Fetch a Kolab object attachment which is stored in a separate part * of the mail MIME message that represents the Kolab record. * - * @param string Object's UID - * @param string The attachment's mime number - * @param string IMAP folder where message is stored; - * If set, that also implies that the given UID is an IMAP UID - * @param bool True to print the part content - * @param resource File pointer to save the message part - * @param bool Disables charset conversion + * @param string $uid Object's UID + * @param string $part The attachment's mime number + * @param ?string $mailbox IMAP folder where message is stored; + * If set, that also implies that the given UID is an IMAP UID + * @param bool $print True to print the part content + * @param resource $fp File pointer to save the message part + * @param bool $skip_charset_conv Disables charset conversion * * @return mixed The attachment content as binary string */ @@ -440,9 +441,9 @@ class kolab_storage_folder extends kolab_storage_folder_api * Fetch the mime message from the storage server and extract * the Kolab groupware object from it * - * @param string The IMAP message UID to fetch - * @param string The object type expected (use wildcard '*' to accept all types) - * @param string The folder name where the message is stored + * @param string $msguid The IMAP message UID to fetch + * @param string $type The object type expected (use wildcard '*' to accept all types) + * @param string $folder The folder name where the message is stored * * @return mixed Hash array representing the Kolab object, a kolab_format instance or false if not found */ @@ -742,8 +743,8 @@ class kolab_storage_folder extends kolab_storage_folder_api * Save recurrence exceptions as individual objects. * The Kolab v2 format doesn't allow us to save fully embedded exception objects. * - * @param array Hash array with event properties - * @param string Object type + * @param array $object Hash array with event properties + * @param string $type Object type */ private function save_recurrence_exceptions(&$object, $type = null) { @@ -855,7 +856,8 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Restore a previously deleted object * - * @param string Object UID + * @param string $uid Object UID + * * @return mixed Message UID on success, false on error */ public function undelete($uid) @@ -880,8 +882,8 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Move a Kolab object message to another IMAP folder * - * @param string Object UID - * @param string|kolab_storage_folder IMAP folder to move object to + * @param string $uid Object UID + * @param string|kolab_storage_folder $target_folder IMAP folder to move object to * * @return bool True on success, false on failure */ @@ -1149,11 +1151,11 @@ class kolab_storage_folder extends kolab_storage_folder_api /** * Triggers a URL. * - * @param string $url The URL to be triggered. - * @param string $auth_user Username to authenticate with - * @param string $auth_passwd Password for basic auth + * @param string $url The URL to be triggered. + * @param string $auth_user Username to authenticate with + * @param string $auth_passwd Password for basic auth * - * @return bool|PEAR_Error True if successfull. + * @return bool|PEAR_Error True if successfull. */ private function trigger_url($url, $auth_user = null, $auth_passwd = null) { diff --git a/plugins/libkolab/lib/kolab_storage_folder_api.php b/plugins/libkolab/lib/kolab_storage_folder_api.php index 33d40e93..42b50917 100644 --- a/plugins/libkolab/lib/kolab_storage_folder_api.php +++ b/plugins/libkolab/lib/kolab_storage_folder_api.php @@ -48,7 +48,7 @@ abstract class kolab_storage_folder_api /** * Is this folder set to be the default for its type - * @var boolean + * @var bool */ public $default = false; @@ -86,8 +86,9 @@ abstract class kolab_storage_folder_api /** * Returns the owner of the folder. * - * @param boolean Return a fully qualified owner name (i.e. including domain for shared folders) - * @return string The owner of this folder. + * @param bool $fully_qualified Return a fully qualified owner name (i.e. including domain for shared folders) + * + * @return string The owner of this folder. */ public function get_owner($fully_qualified = false) { @@ -220,7 +221,8 @@ abstract class kolab_storage_folder_api /** * Get the color value stored in metadata * - * @param string Default color value to return if not set + * @param string $default Default color value to return if not set + * * @return mixed Color value from IMAP metadata or $default is not set */ public function get_color($default = null) @@ -252,8 +254,9 @@ abstract class kolab_storage_folder_api /** * Sets IMAP metadata/annotations (SETMETADATA/SETANNOTATION) * - * @param array $entries Entry-value array (use NULL value as NIL) - * @return boolean True on success, False on failure + * @param array $entries Entry-value array (use NULL value as NIL) + * + * @return bool True on success, False on failure */ public function set_metadata($entries) { @@ -331,7 +334,7 @@ abstract class kolab_storage_folder_api /** * Check activation status of this folder * - * @return boolean True if enabled, false if not + * @return bool True if enabled, false if not */ public function is_active() { @@ -341,7 +344,7 @@ abstract class kolab_storage_folder_api /** * Change activation status of this folder * - * @param boolean The desired subscription status: true = active, false = not active + * @param bool $active The desired subscription status: true = active, false = not active * * @return True on success, false on error */ @@ -353,7 +356,7 @@ abstract class kolab_storage_folder_api /** * Check subscription status of this folder * - * @return boolean True if subscribed, false if not + * @return bool True if subscribed, false if not */ public function is_subscribed() { @@ -363,9 +366,9 @@ abstract class kolab_storage_folder_api /** * Change subscription status of this folder * - * @param boolean The desired subscription status: true = subscribed, false = not subscribed + * @param bool $subscribed The desired subscription status: true = subscribed, false = not subscribed * - * @return True on success, false on error + * @return bool True on success, false on error */ public function subscribe($subscribed) { diff --git a/plugins/libkolab/lib/kolab_storage_folder_user.php b/plugins/libkolab/lib/kolab_storage_folder_user.php index c6e48ec5..57e9e039 100644 --- a/plugins/libkolab/lib/kolab_storage_folder_user.php +++ b/plugins/libkolab/lib/kolab_storage_folder_user.php @@ -78,7 +78,7 @@ class kolab_storage_folder_user extends kolab_storage_folder_virtual * Check subscription status of this folder. * Subscription of a virtual user folder depends on the subscriptions of subfolders. * - * @return boolean True if subscribed, false if not + * @return bool True if subscribed, false if not */ public function is_subscribed() { @@ -102,7 +102,7 @@ class kolab_storage_folder_user extends kolab_storage_folder_virtual /** * Change subscription status of this folder * - * @param boolean The desired subscription status: true = subscribed, false = not subscribed + * @param bool $subscribed The desired subscription status: true = subscribed, false = not subscribed * * @return True on success, false on error */ diff --git a/plugins/libkolab/lib/kolab_storage_folder_virtual.php b/plugins/libkolab/lib/kolab_storage_folder_virtual.php index 00c92451..4f7b0e72 100644 --- a/plugins/libkolab/lib/kolab_storage_folder_virtual.php +++ b/plugins/libkolab/lib/kolab_storage_folder_virtual.php @@ -47,7 +47,8 @@ class kolab_storage_folder_virtual extends kolab_storage_folder_api /** * Get the color value stored in metadata * - * @param string Default color value to return if not set + * @param string $default Default color value to return if not set + * * @return mixed Color value from IMAP metadata or $default is not set */ public function get_color($default = null) diff --git a/plugins/libkolab/libkolab.php b/plugins/libkolab/libkolab.php index 47068698..ae2d82a0 100644 --- a/plugins/libkolab/libkolab.php +++ b/plugins/libkolab/libkolab.php @@ -206,10 +206,10 @@ class libkolab extends rcube_plugin /** * Wrapper function to load and initalize the HTTP_Request2 Object * - * @param string|Net_Url2 Request URL - * @param string Request method ('OPTIONS','GET','HEAD','POST','PUT','DELETE','TRACE','CONNECT') - * @param array Configuration for this Request instance, that will be merged - * with default configuration + * @param string|Net_URL2 $url Request URL + * @param string $method Request method ('OPTIONS','GET','HEAD','POST','PUT','DELETE','TRACE','CONNECT') + * @param array $config Configuration for this Request instance, that will be merged + * with default configuration * * @return HTTP_Request2 Request object */ @@ -352,7 +352,8 @@ class libkolab extends rcube_plugin /** * Return a date() format string to render identifiers for recurrence instances * - * @param array Hash array with event properties + * @param array $event Hash array with event properties + * * @return string Format string */ public static function recurrence_id_format($event) diff --git a/plugins/tasklist/drivers/caldav/tasklist_caldav_driver.php b/plugins/tasklist/drivers/caldav/tasklist_caldav_driver.php index 1bd4c9e1..aef961c7 100644 --- a/plugins/tasklist/drivers/caldav/tasklist_caldav_driver.php +++ b/plugins/tasklist/drivers/caldav/tasklist_caldav_driver.php @@ -141,8 +141,11 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get a list of available task lists from this source * - * @param int Bitmask defining filter criterias. - * See FILTER_* constants for possible values. + * @param int $filter Bitmask defining filter criterias. + * See FILTER_* constants for possible values. + * @param ?array $tree + * + * @return array */ public function get_lists($filter = 0, &$tree = null) { @@ -202,7 +205,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get list of folders according to specified filters * - * @param int Bitmask defining restrictions. See FILTER_* constants for possible values. + * @param int $filter Bitmask defining restrictions. See FILTER_* constants for possible values. * * @return array List of task folders */ @@ -275,7 +278,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get the kolab_calendar instance for the given calendar ID * - * @param string List identifier (encoded imap folder name) + * @param string $id List identifier (encoded imap folder name) * * @return ?kolab_storage_folder Object nor null if list doesn't exist */ @@ -290,10 +293,10 @@ class tasklist_caldav_driver extends tasklist_driver /** * Create a new list assigned to the current user * - * @param array Hash array with list properties - * name: List name - * color: The color of the list - * showalarms: True if alarms are enabled + * @param array $prop Hash array with list properties + * - name: List name + * - color: The color of the list + * - showalarms: True if alarms are enabled * * @return mixed ID of the new list on success, False on error */ @@ -331,11 +334,11 @@ class tasklist_caldav_driver extends tasklist_driver /** * Update properties of an existing tasklist * - * @param array Hash array with list properties - * id: List Identifier - * name: List name - * color: The color of the list - * showalarms: True if alarms are enabled (if supported) + * @param array $prop Hash array with list properties + * - id: List Identifier + * - name: List name + * - color: The color of the list + * - showalarms: True if alarms are enabled (if supported) * * @return bool True on success, Fales on failure */ @@ -371,10 +374,10 @@ class tasklist_caldav_driver extends tasklist_driver /** * Set active/subscribed state of a list * - * @param array Hash array with list properties - * id: List Identifier - * active: True if list is active, false if not - * permanent: True if list is to be subscribed permanently + * @param array $prop Hash array with list properties + * - id: List Identifier + * - active: True if list is active, false if not + * - permanent: True if list is to be subscribed permanently * * @return bool True on success, Fales on failure */ @@ -402,8 +405,8 @@ class tasklist_caldav_driver extends tasklist_driver /** * Delete the given list with all its contents * - * @param array Hash array with list properties - * id: list Identifier + * @param array $prop Hash array with list properties + * - id: list Identifier * * @return bool True on success, Fales on failure */ @@ -428,8 +431,8 @@ class tasklist_caldav_driver extends tasklist_driver /** * Search for shared or otherwise not listed tasklists the user has access * - * @param string Search string - * @param string Section/source to search + * @param string $query Search string + * @param string $source Section/source to search * * @return array List of tasklists */ @@ -493,7 +496,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get number of tasks matching the given filter * - * @param array List of lists to count tasks of + * @param array $lists List of lists to count tasks of * * @return array Hash array with counts grouped by status (all|flagged|completed|today|tomorrow|nodate) */ @@ -546,13 +549,13 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get all task records matching the given filter * - * @param array Hash array with filter criterias: - * - mask: Bitmask representing the filter selection (check against tasklist::FILTER_MASK_* constants) - * - from: Date range start as string (Y-m-d) - * - to: Date range end as string (Y-m-d) - * - search: Search query string - * - uid: Task UIDs - * @param array List of lists to get tasks from + * @param array $filter Hash array with filter criterias: + * - mask: Bitmask representing the filter selection (check against tasklist::FILTER_MASK_* constants) + * - from: Date range start as string (Y-m-d) + * - to: Date range end as string (Y-m-d) + * - search: Search query string + * - uid: Task UIDs + * @param array $lists List of lists to get tasks from * * @return array List of tasks records matchin the criteria */ @@ -613,11 +616,11 @@ class tasklist_caldav_driver extends tasklist_driver /** * Return data of a specific task * - * @param mixed Hash array with task properties or task UID - * @param int Bitmask defining filter criterias for folders. - * See FILTER_* constants for possible values. + * @param mixed $prop Hash array with task properties or task UID + * @param int $filter Bitmask defining filter criterias for folders. + * See FILTER_* constants for possible values. * - * @return array Hash array with task properties or false if not found + * @return array|false Hash array with task properties or false if not found */ public function get_task($prop, $filter = 0) { @@ -647,8 +650,8 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get all decendents of the given task record * - * @param mixed Hash array with task properties or task UID - * @param bool True if all childrens children should be fetched + * @param mixed $prop Hash array with task properties or task UID + * @param bool $recursive True if all childrens children should be fetched * * @return array List of all child task IDs */ @@ -693,7 +696,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Provide a list of revisions for the given task * - * @param array $task Hash array with task properties + * @param array $prop Hash array with task properties * * @return array|false List of changes, each as a hash array * @see tasklist_driver::get_task_changelog() @@ -704,12 +707,12 @@ class tasklist_caldav_driver extends tasklist_driver return false; } /* - list($uid, $mailbox, $msguid) = $this->_resolve_task_identity($prop); + list($uid, $mailbox, $msguid) = $this->_resolve_task_identity($prop); - $result = $uid && $mailbox ? $this->bonnie_api->changelog('task', $uid, $mailbox, $msguid) : null; - if (is_array($result) && $result['uid'] == $uid) { - return $result['changes']; - } + $result = $uid && $mailbox ? $this->bonnie_api->changelog('task', $uid, $mailbox, $msguid) : null; + if (is_array($result) && $result['uid'] == $uid) { + return $result['changes']; + } */ return false; } @@ -717,7 +720,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Return full data of a specific revision of an event * - * @param mixed $task UID string or hash array with task properties + * @param mixed $prop UID string or hash array with task properties * @param mixed $rev Revision number * * @return array Task object as hash array @@ -756,7 +759,7 @@ class tasklist_caldav_driver extends tasklist_driver * Command the backend to restore a certain revision of a task. * This shall replace the current object with an older version. * - * @param mixed $task UID string or hash array with task properties + * @param mixed $prop UID string or hash array with task properties * @param mixed $rev Revision number * * @return bool True on success, False on failure @@ -768,28 +771,28 @@ class tasklist_caldav_driver extends tasklist_driver return false; } /* - $this->_parse_id($prop); - $uid = $prop['uid']; - $list_id = $prop['list']; - list($uid, $mailbox, $msguid) = $this->_resolve_task_identity($prop); + $this->_parse_id($prop); + $uid = $prop['uid']; + $list_id = $prop['list']; + list($uid, $mailbox, $msguid) = $this->_resolve_task_identity($prop); - $folder = $this->get_folder($list_id); - $success = false; + $folder = $this->get_folder($list_id); + $success = false; - if ($folder && ($raw_msg = $this->bonnie_api->rawdata('task', $uid, $rev, $mailbox))) { - $imap = $this->rc->get_storage(); + if ($folder && ($raw_msg = $this->bonnie_api->rawdata('task', $uid, $rev, $mailbox))) { + $imap = $this->rc->get_storage(); - // insert $raw_msg as new message - if ($imap->save_message($folder->name, $raw_msg, null, false)) { - $success = true; + // insert $raw_msg as new message + if ($imap->save_message($folder->name, $raw_msg, null, false)) { + $success = true; - // delete old revision from imap and cache - $imap->delete_message($msguid, $folder->name); - $folder->cache->set($msguid, false); - } - } + // delete old revision from imap and cache + $imap->delete_message($msguid, $folder->name); + $folder->cache->set($msguid, false); + } + } - return $success; + return $success; */ return false; } @@ -797,8 +800,9 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get a list of property changes beteen two revisions of a task object * - * @param array $task Hash array with task properties - * @param mixed $rev Revisions: "from:to" + * @param array $prop Hash array with task properties + * @param mixed $rev1 Revision: "from" + * @param mixed $rev2 Revision: "to" * * @return array List of property changes, each as a hash array * @see tasklist_driver::get_task_diff() @@ -1103,7 +1107,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Extract uid + list identifiers from the given input * - * @param mixed array or string with task identifier(s) + * @param array|string $prop Array or a string with task identifier(s) */ private function _parse_id(&$prop) { @@ -1313,7 +1317,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Add a single task to the database * - * @param array Hash array with task properties (see header of tasklist_driver.php) + * @param array $task Hash array with task properties (see header of tasklist_driver.php) * * @return mixed New task ID on success, False on error */ @@ -1325,7 +1329,7 @@ class tasklist_caldav_driver extends tasklist_driver /** * Update a task entry with the given data * - * @param array Hash array with task properties (see header of tasklist_driver.php) + * @param array $task Hash array with task properties (see header of tasklist_driver.php) * * @return bool True on success, False on error */ @@ -1421,9 +1425,9 @@ class tasklist_caldav_driver extends tasklist_driver /** * Remove a single task from the database * - * @param array Hash array with task properties: - * id: Task identifier - * @param bool Remove record irreversible (mark as deleted otherwise, if supported by the backend) + * @param array $task Hash array with task properties: + * id: Task identifier + * @param bool $force Remove record irreversible (mark as deleted otherwise, if supported by the backend) * * @return bool True on success, False on error */ @@ -1443,9 +1447,9 @@ class tasklist_caldav_driver extends tasklist_driver /** * Restores a single deleted task (if supported) * - * @param array Hash array with task properties: + * @param array $prop Hash array with task properties: * id: Task identifier - * @return boolean True on success, False on error + * @return bool True on success, False on error */ public function undelete_task($prop) { @@ -1457,8 +1461,8 @@ class tasklist_caldav_driver extends tasklist_driver /** * Get attachment properties * - * @param string $id Attachment identifier - * @param array $task Hash array with event properties: + * @param string $id Attachment identifier + * @param array $task Hash array with event properties: * id: Task identifier * list: List identifier * rev: Revision (optional) diff --git a/plugins/tasklist/drivers/database/tasklist_database_driver.php b/plugins/tasklist/drivers/database/tasklist_database_driver.php index 189a48f6..81475956 100644 --- a/plugins/tasklist/drivers/database/tasklist_database_driver.php +++ b/plugins/tasklist/drivers/database/tasklist_database_driver.php @@ -204,8 +204,8 @@ class tasklist_database_driver extends tasklist_driver /** * Search for shared or otherwise not listed tasklists the user has access * - * @param string Search string - * @param string Section/source to search + * @param string $query Search string + * @param string $source Section/source to search * * @return array List of tasklists */