Skip to content

Commit 0ad4eae

Browse files
committed
Scrutinizer Auto-Fixes (#1170)
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
1 parent 9d8f25d commit 0ad4eae

File tree

65 files changed

+347
-187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+347
-187
lines changed

main/auth/external_login/ldap.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function extldap_purify_string($string)
2828
/**
2929
* Establishes a connection to the LDAP server and sets the protocol version
3030
*
31-
* @return resource ldap link identifier or false
31+
* @return boolean ldap link identifier or false
3232
* @author ndiechburg <[email protected]>
3333
* */
3434
function extldap_connect()
@@ -77,6 +77,7 @@ function extldap_connect()
7777
/**
7878
* Authenticate user on external ldap server and return user ldap entry if that succeeds
7979
*
80+
* @param string $password
8081
* @return mixed false if user cannot authenticate on ldap, user ldap entry if tha succeeds
8182
* @author ndiechburg <[email protected]>
8283
* Modified by [email protected]
@@ -237,7 +238,7 @@ function extldap_get_user_search_string($username)
237238

238239
/**
239240
* Imports all LDAP users into Chamilo
240-
* @return bool false on error, true otherwise
241+
* @return false|null false on error, true otherwise
241242
*/
242243
function extldap_import_all_users()
243244
{

main/auth/shibboleth/db/shibboleth_upgrade.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function update()
3535
* Creates the 'shibb_unique_id' field in the table 'user' of the main Chamilo database if it doesn't exist yet
3636
*
3737
* @author Nicolas Rod
38-
* @return void
38+
* @return false|null
3939
*/
4040
public static function create_shibb_unique_id_field_if_missing()
4141
{

main/auth/shibboleth/lib/store.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ protected function query($sql)
346346
return $result;
347347
}
348348

349+
/**
350+
* @param string $sql
351+
*/
349352
protected function execute($sql)
350353
{
351354
return Database::query($sql, null, __FILE__);

main/auth/sso/sso.Drupal.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function ask_master()
9090

9191
/**
9292
* Validates the received active connection data with the database
93-
* @return bool Return the loginFailed variable value to local.inc.php
93+
* @return null|false Return the loginFailed variable value to local.inc.php
9494
*/
9595
public function check_user()
9696
{

main/coursecopy/classes/Course.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ public function to_system_encoding()
327327

328328
/**
329329
* Serialize the course with the best serializer available
330+
* @return string
330331
*/
331332
public static function serialize($course)
332333
{
@@ -339,6 +340,7 @@ public static function serialize($course)
339340

340341
/**
341342
* Unserialize the course with the best serializer available
343+
* @param string $course
342344
*/
343345
public static function unserialize($course)
344346
{

main/coursecopy/classes/CourseBuilder.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function get_course()
123123
* @param string $courseCode
124124
* @param bool true if you want to get the elements that exists in the course and
125125
* in the session, (session_id = 0 or session_id = X)
126-
* @return object The course object structure
126+
* @return Course The course object structure
127127
*/
128128
public function build(
129129
$session_id = 0,

main/coursecopy/classes/CourseRestorer.class.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class CourseRestorer
8484

8585
/**
8686
* CourseRestorer constructor.
87-
* @param array $course
87+
* @param Course $course
8888
*/
8989
public function __construct($course)
9090
{
@@ -133,7 +133,7 @@ public function set_tool_copy_settings($array)
133133
* @param int $session_id
134134
* @param bool $update_course_settings Course settings are going to be restore?
135135
* @param bool $respect_base_content
136-
* @return bool
136+
* @return false|null
137137
*/
138138
public function restore(
139139
$destination_course_code = '',
@@ -1154,6 +1154,7 @@ public function restore_forum_category($my_id = null, $sessionId = 0)
11541154

11551155
/**
11561156
* Restore a forum-topic
1157+
* @param false|string $forum_id
11571158
*/
11581159
public function restore_topic($thread_id, $forum_id, $sessionId = 0)
11591160
{
@@ -1210,6 +1211,7 @@ public function restore_topic($thread_id, $forum_id, $sessionId = 0)
12101211
/**
12111212
* Restore a forum-post
12121213
* @TODO Restore tree-structure of posts. For example: attachments to posts.
1214+
* @param false|string $topic_id
12131215
*/
12141216
public function restore_post($id, $topic_id, $forum_id, $sessionId = 0)
12151217
{
@@ -2306,6 +2308,7 @@ public function restore_surveys($sessionId = 0)
23062308

23072309
/**
23082310
* Check availability of a survey code
2311+
* @param string $survey_code
23092312
*/
23102313
public function is_survey_code_available($survey_code)
23112314
{
@@ -2320,6 +2323,7 @@ public function is_survey_code_available($survey_code)
23202323

23212324
/**
23222325
* Restore survey-questions
2326+
* @param string $survey_id
23232327
*/
23242328
public function restore_survey_question($id, $survey_id)
23252329
{
@@ -2776,6 +2780,8 @@ public function restore_student_publication($sessionId = 0)
27762780
* @param string The path origin
27772781
* @param string The path destination
27782782
* @param boolean Option Overwrite
2783+
* @param string $source
2784+
* @param string $dest
27792785
* @return void()
27802786
* @deprecated
27812787
*/

main/coursecopy/classes/CourseSelectForm.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CourseSelectForm
1313
{
1414
/**
1515
* Display the form
16-
* @param array $hidden_fiels Hidden fields to add to the form.
16+
* @param array $hidden_fields Hidden fields to add to the form.
1717
* @param boolean the document array will be serialize. This is used in the course_copy.php file
1818
*/
1919
static function display_form($course, $hidden_fields = null, $avoid_serialize = false)
@@ -570,7 +570,7 @@ public static function get_posted_course($from = '', $session_id = 0, $course_co
570570

571571
/**
572572
* Display the form session export
573-
* @param array $hidden_fiels Hidden fields to add to the form.
573+
* @param array $hidden_fields Hidden fields to add to the form.
574574
* @param boolean the document array will be serialize. This is used in the course_copy.php file
575575
*/
576576
public static function display_form_session_export($list_course, $hidden_fields = null, $avoid_serialize = false)

main/coursecopy/classes/Event.class.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ class CalendarEvent extends Coursecopy\Resource
5050
* @param int $id
5151
* @param string $title
5252
* @param string $content
53-
* @param string $date
54-
* @param string $hour
55-
* @param int $duration
5653
*/
5754
public function __construct(
5855
$id,

main/coursecopy/classes/QuizQuestion.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ public function add_answer(
115115
$this->answers[] = $answer;
116116
}
117117

118+
/**
119+
* @param QuizQuestionOption $option_obj
120+
*/
118121
public function add_option($option_obj)
119122
{
120123
$this->question_options[$option_obj->obj->id] = $option_obj;

0 commit comments

Comments
 (0)