From 49451046b27f8560bbc318a2775fa48e762f5dcd Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 16 Sep 2020 10:55:03 +0200 Subject: [PATCH] Minor - flint fixes --- .travis.yml | 2 +- public/main/admin/course_edit.php | 1 - public/main/admin/skill.php | 2 +- public/main/admin/user_list_consent.php | 5 ++--- public/main/document/create_audio.php | 1 - public/main/dropbox/dropbox_functions.inc.php | 2 -- public/main/extra/userInfoLib.php | 11 +++++----- public/main/forum/forumfunction.inc.php | 15 +++++--------- .../gradebook/lib/fe/displaygradebook.php | 2 -- public/main/inc/lib/AnnouncementManager.php | 2 -- .../main/inc/lib/ExerciseCategoryManager.php | 3 --- public/main/inc/lib/UnserializeApi.php | 1 - public/main/inc/lib/api.lib.php | 1 - public/main/inc/lib/attendance.lib.php | 5 +---- public/main/inc/lib/display.lib.php | 4 ---- public/main/inc/lib/document.lib.php | 14 ++++++------- public/main/inc/lib/fileUpload.lib.php | 2 -- .../main/inc/lib/formvalidator/Rule/HTML.php | 6 ++---- .../lib/formvalidator/Rule/MaxFileSize.php | 3 --- public/main/inc/lib/groupmanager.lib.php | 20 +++++-------------- .../main/inc/lib/internationalization.lib.php | 7 ++----- public/main/inc/lib/message.lib.php | 1 - public/main/inc/lib/pdf.lib.php | 1 - public/main/inc/lib/plugin.lib.php | 2 -- public/main/inc/lib/search/ChamiloQuery.php | 2 -- public/main/inc/lib/security.lib.php | 2 -- public/main/inc/lib/template.lib.php | 3 --- public/main/inc/lib/text.lib.php | 2 -- public/main/inc/lib/thematic.lib.php | 3 +-- public/main/lp/learnpath.class.php | 3 --- .../permissions/permissions_functions.inc.php | 3 --- public/main/session/resume_session.php | 3 +-- src/CourseBundle/Entity/CQuiz.php | 2 +- 33 files changed, 33 insertions(+), 103 deletions(-) diff --git a/.travis.yml b/.travis.yml index a145ffffa5..ffa52c65d5 100755 --- a/.travis.yml +++ b/.travis.yml @@ -101,8 +101,8 @@ script: # Set to APP_ENV to test - sed -i "s/APP_ENV='dev'/APP_ENV='test'/g" .env.local - cd tests/behat - - ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature -vvv - ../../vendor/behat/behat/bin/behat features/actionUserLogin.feature -vvv + - ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature -vvv - ../../vendor/behat/behat/bin/behat features/adminSettings.feature -vvv - ../../vendor/behat/behat/bin/behat features/career.feature -vvv - ../../vendor/behat/behat/bin/behat features/class.feature -vvv diff --git a/public/main/admin/course_edit.php b/public/main/admin/course_edit.php index 05ea79157c..ea80f116ac 100644 --- a/public/main/admin/course_edit.php +++ b/public/main/admin/course_edit.php @@ -2,7 +2,6 @@ /* For licensing terms, see /license.txt */ -use Chamilo\CoreBundle\Entity\User; use Chamilo\CoreBundle\Framework\Container; $cidReset = true; diff --git a/public/main/admin/skill.php b/public/main/admin/skill.php index c744e53577..4c470dc47a 100644 --- a/public/main/admin/skill.php +++ b/public/main/admin/skill.php @@ -1,8 +1,8 @@ diff --git a/public/main/dropbox/dropbox_functions.inc.php b/public/main/dropbox/dropbox_functions.inc.php index 6b57d73c2c..2868fefc61 100644 --- a/public/main/dropbox/dropbox_functions.inc.php +++ b/public/main/dropbox/dropbox_functions.inc.php @@ -1155,8 +1155,6 @@ function feedback($array, $url) /** * This function returns the html code to display the feedback messages on a given dropbox file. * - * @param $feedback_array an array that contains all the feedback messages about the given document - * * @return string code * * @todo add the form for adding new comment (if the other party has not deleted it yet). diff --git a/public/main/extra/userInfoLib.php b/public/main/extra/userInfoLib.php index f161cd3a6e..44310ed67b 100644 --- a/public/main/extra/userInfoLib.php +++ b/public/main/extra/userInfoLib.php @@ -86,12 +86,11 @@ function edit_cat_def($id, $title, $comment, $nbline) * @author - Hugues peeters * @author - Christophe Gesche * - * @param int $id - id of the category - * or "ALL" for all category - * @param bool $force - FALSE (default) : prevents removal if users have - * already fill this category - * TRUE : bypass user content existence check - * @param int $nbline - lines number for the field the user will fill + * @param int $id - id of the category + * or "ALL" for all category + * @param bool $force - FALSE (default) : prevents removal if users have + * already fill this category + * TRUE : bypass user content existence check * * @return bool - TRUE if succeed, ELSE otherwise */ diff --git a/public/main/forum/forumfunction.inc.php b/public/main/forum/forumfunction.inc.php index e2e019a427..18fcdf9fe6 100644 --- a/public/main/forum/forumfunction.inc.php +++ b/public/main/forum/forumfunction.inc.php @@ -239,8 +239,7 @@ function handleForum($url) /** * This function displays the form that is used to add a forum category. * - * @param array $inputvalues (deprecated, set to null when calling) - * @param int $lp_id Learning path ID + * @param int $lp_id Learning path ID * * @return string * @@ -1430,7 +1429,6 @@ function get_forums_in_category($categoryId, $courseId = 0) * Since it does not take the forum category into account there probably * will be two or more forums that have forum_order=1, ... * - * @param int $id forum id * @param bool $includeGroupsForum * @param int $sessionId * @@ -1800,7 +1798,6 @@ function get_last_post_information($forum_id, $show_invisibles = false, $course_ /** * Retrieve all the threads of a given forum. * - * @param int $forum_id * @param int|null $courseId Optional If is null then it is considered the current course * @param int|null $sessionId Optional. If is null then it is considered the current session * @@ -5775,8 +5772,7 @@ function get_name_thread_by_id($thread_id) /** * This function gets all the post written by an user. * - * @param int $user_id - * @param string $course_code + * @param int $user_id * * @return string */ @@ -5856,10 +5852,9 @@ function get_all_post_from_user($user_id, $courseId) } /** - * @param string $course_code - * @param int $thread_id - * @param int $user_id - * @param int $limit + * @param int $thread_id + * @param int $user_id + * @param int $limit * * @return array */ diff --git a/public/main/gradebook/lib/fe/displaygradebook.php b/public/main/gradebook/lib/fe/displaygradebook.php index 5abdce22b5..6e28379719 100644 --- a/public/main/gradebook/lib/fe/displaygradebook.php +++ b/public/main/gradebook/lib/fe/displaygradebook.php @@ -12,8 +12,6 @@ class DisplayGradebook * * @param Evaluation $evalobj * @param $selectcat - * @param $shownavbar 1=show navigation bar - * @param $forpdf only output for pdf file */ public static function display_header_result($evalobj, $selectcat, $page) { diff --git a/public/main/inc/lib/AnnouncementManager.php b/public/main/inc/lib/AnnouncementManager.php index a0430d61cc..3bcf3971c6 100644 --- a/public/main/inc/lib/AnnouncementManager.php +++ b/public/main/inc/lib/AnnouncementManager.php @@ -450,8 +450,6 @@ class AnnouncementManager /** * Displays one specific announcement. * - * @param int $id, the id of the announcement you want to display - * * @return string */ public static function displayAnnouncement($id) diff --git a/public/main/inc/lib/ExerciseCategoryManager.php b/public/main/inc/lib/ExerciseCategoryManager.php index f852ff38de..27c71142d3 100644 --- a/public/main/inc/lib/ExerciseCategoryManager.php +++ b/public/main/inc/lib/ExerciseCategoryManager.php @@ -29,9 +29,6 @@ class ExerciseCategoryManager extends Model /** * Formats the necessary elements for the given datatype. * - * @param string $type The type of data to which this extra field - * applies (user, course, session, ...) - * * @assert (-1) === false */ public function __construct() diff --git a/public/main/inc/lib/UnserializeApi.php b/public/main/inc/lib/UnserializeApi.php index c6ad68690b..dce9e908b3 100644 --- a/public/main/inc/lib/UnserializeApi.php +++ b/public/main/inc/lib/UnserializeApi.php @@ -13,7 +13,6 @@ class UnserializeApi * * @param string $type * @param string $serialized - * @param bool $ignoreErrors. Optional. * * @return mixed */ diff --git a/public/main/inc/lib/api.lib.php b/public/main/inc/lib/api.lib.php index 213626d7f7..2c2b1940c2 100644 --- a/public/main/inc/lib/api.lib.php +++ b/public/main/inc/lib/api.lib.php @@ -8637,7 +8637,6 @@ function api_get_relative_path($from, $to) * * @param string $type * @param string $serialized - * @param bool $ignoreErrors. Optional. * * @return mixed */ diff --git a/public/main/inc/lib/attendance.lib.php b/public/main/inc/lib/attendance.lib.php index 4e5003e707..e7d0ec430a 100644 --- a/public/main/inc/lib/attendance.lib.php +++ b/public/main/inc/lib/attendance.lib.php @@ -59,8 +59,6 @@ class Attendance /** * Get the total number of attendance inside current course and current session. * - * @param int $active - * * @return int * * @see SortableTable#get_total_number_of_items() @@ -2804,8 +2802,7 @@ class Attendance /** * It's used to print attendance sheet. * - * @param string $action - * @param int $attendance_id + * @param int $attendance_id */ public function attendance_sheet_export_to_pdf( $attendance_id, diff --git a/public/main/inc/lib/display.lib.php b/public/main/inc/lib/display.lib.php index 5f348ee5b7..15f3f072a5 100644 --- a/public/main/inc/lib/display.lib.php +++ b/public/main/inc/lib/display.lib.php @@ -315,7 +315,6 @@ class Display * 'page_nr' = The page to display * 'hide_navigation' = true to hide the navigation * @param array $query_vars Additional variables to add in the query-string - * @param array $form actions Additional variables to add in the query-string * @param mixed An array with bool values to know which columns show. * i.e: $visibility_options= array(true, false) we will only show the first column * Can be also only a bool value. TRUE: show all columns, FALSE: show nothing @@ -357,7 +356,6 @@ class Display * 'page_nr' = The page to display * 'hide_navigation' = true to hide the navigation * @param array $query_vars Additional variables to add in the query-string - * @param array $form actions Additional variables to add in the query-string * @param mixed An array with bool values to know which columns show. i.e: * $visibility_options= array(true, false) we will only show the first column * Can be also only a bool value. TRUE: show all columns, FALSE: show nothing @@ -637,8 +635,6 @@ class Display /** * Prints an