From ed33e19f4ba954606d4f8fe580a0114d4f39bb52 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 17 Aug 2014 22:13:19 +0200 Subject: [PATCH 1/2] [ticket/314] Check incorrect copyright lines --- tests/unit/event/listener_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/event/listener_test.php b/tests/unit/event/listener_test.php index 4b683c04..9b112748 100644 --- a/tests/unit/event/listener_test.php +++ b/tests/unit/event/listener_test.php @@ -2,7 +2,7 @@ /** * * @package Quickedit -* @copyright (c) 2014 Marc Alexander ( www.m-a-styles.de ) +* @copyright (c) 2014 Board3 Group ( www.board3.de ) * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ From 39a14ea788ab09f52f29f9fd0d72a53fec408488 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 17 Aug 2014 22:26:21 +0200 Subject: [PATCH 2/2] [ticket/314] Fix function and method comments --- includes/functions.php | 8 +++++--- includes/modules_helper.php | 2 +- migrations/v210_beta1.php | 3 +++ modules/calendar.php | 4 ++-- portal/fetch_posts.php | 11 +++++++++++ 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index a65e1a38..3d5d4202 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -128,9 +128,11 @@ function character_limit(&$title, $limit = 0) /** * Cut post text to given length * -* @param $message string post text -* @param $bbcode_uid string bbcode uid -* @param $length int The desired length +* @param string $message post text +* @param string $bbcode_uid bbcode uid +* @param int $length The desired length +* +* @return string Shortened message */ function get_sub_taged_string($message, $bbcode_uid, $length) { diff --git a/includes/modules_helper.php b/includes/modules_helper.php index 71094100..10738891 100644 --- a/includes/modules_helper.php +++ b/includes/modules_helper.php @@ -49,6 +49,7 @@ class modules_helper * * @param bool $disallow_access Whether the array for disallowing access * should be filled + * @return array Array of forums the user is not allowed to access */ public function get_disallowed_forums($disallow_access) { @@ -123,7 +124,6 @@ class modules_helper * Store selected forums * * @param string $key Key name - * @param int $module_id Module ID * * @return null * @access public diff --git a/migrations/v210_beta1.php b/migrations/v210_beta1.php index fd28caf5..24205f16 100644 --- a/migrations/v210_beta1.php +++ b/migrations/v210_beta1.php @@ -530,6 +530,9 @@ class v210_beta1 extends \phpbb\db\migration\migration /** * Set config value. Creates missing config entry. * Only use this if your config value might exceed 255 characters, otherwise please use set_config + * + * @param string $config_name Name of config entry to add or update + * @param mixed $config_value Value of config entry to add or update */ private function set_portal_config($config_name, $config_value) { diff --git a/modules/calendar.php b/modules/calendar.php index 3e32efb0..0a1c5b7c 100644 --- a/modules/calendar.php +++ b/modules/calendar.php @@ -642,7 +642,7 @@ class calendar extends module_base * * @param string $date Date to convert * - * @return string Converted time + * @return int Converted time */ protected function make_timestamp($date) { @@ -749,7 +749,7 @@ class calendar extends module_base * date or date and time info. The string should * be in a similar format: 17.06.1990 18:06 * @return int|bool The timestamp of the given date or false if - * given daten does not match any known formats. + * given date does not match any known formats. */ public function date_to_time($date) { diff --git a/portal/fetch_posts.php b/portal/fetch_posts.php index fb3c3349..124428b8 100644 --- a/portal/fetch_posts.php +++ b/portal/fetch_posts.php @@ -119,6 +119,17 @@ class fetch_posts /** * Get posts defined by type and other settings * + * @param string $forum_from Forums from which the posts should be retrieved + * @param bool $permissions Whether permissions should be taken into account + * during retrieval + * @param int $number_of_posts Number of posts to get + * @param int $text_length Length the text should be shortened to + * @param int $time The amount of days ago the posts could have been posted + * @param string $type Type of posts to get + * @param int $start At which position the query should start + * @param bool $invert Whether the permissions should be inverted + * + * @return array An array containing the posts that were retrieved from the database */ public function get_posts($forum_from, $permissions, $number_of_posts, $text_length, $time, $type, $start = 0, $invert = false) {