Passed
Push — 1.10.x ( 08890a...2189d7 )
by Yannick
116:38 queued 75:46
created
main/exercice/hotpotatoes_exercise_result.class.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -18,6 +18,7 @@
 block discarded – undo
18 18
 	 * Gets the results of all students (or just one student if access is limited)
19 19
 	 * @param	string		The document path (for HotPotatoes retrieval)
20 20
 	 * @param	integer		User ID. Optional. If no user ID is provided, we take all the results. Defauts to null
21
+	 * @param string $document_path
21 22
 	 */
22 23
 	public function getExercisesReporting($document_path, $hotpotato_name)
23 24
     {
Please login to merge, or discard this patch.
main/exercice/hotspot.class.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 	/**
53 53
 	 * @param FormValidator $form
54 54
 	 * @param null $objExercise
55
-	 * @return bool
55
+	 * @return null|false
56 56
 	 */
57 57
 	public function processCreation($form, $objExercise = null)
58 58
 	{
Please login to merge, or discard this patch.
main/exercice/oral_expression.class.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      * @param null $feedback_type
59 59
      * @param null $counter
60 60
      * @param null $score
61
-     * @return null|string
61
+     * @return string
62 62
      */
63 63
     function return_header($feedback_type = null, $counter = null, $score = null)
64 64
     {
Please login to merge, or discard this patch.
main/exercice/question.class.php 1 patch
Doc Comments   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     }
266 266
 
267 267
     /**
268
-     * @return bool|string
268
+     * @return string|false
269 269
      */
270 270
     public function selectPicturePath()
271 271
     {
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
      * @param string $Dimension - Resizing happens proportional according to given dimension: height|width|any
591 591
      * @param integer $Max - Maximum size
592 592
      *
593
-     * @return boolean - true if success, false if failed
593
+     * @return boolean|null - true if success, false if failed
594 594
      *
595 595
      * @author Toon Keppens
596 596
      */
@@ -751,6 +751,7 @@  discard block
 block discarded – undo
751 751
 
752 752
     /**
753 753
      * Sets extra info
754
+     * @param string $extra
754 755
      */
755 756
     public function setExtra($extra)
756 757
     {
@@ -1261,7 +1262,7 @@  discard block
 block discarded – undo
1261 1262
      *
1262 1263
      * @author Olivier Brouckaert
1263 1264
      * @param  array   Course info of the destination course
1264
-     * @return int     ID of the new question
1265
+     * @return false|string     ID of the new question
1265 1266
      */
1266 1267
     public function duplicate($course_info = null)
1267 1268
     {
@@ -1636,7 +1637,7 @@  discard block
 block discarded – undo
1636 1637
      * @param string $name
1637 1638
      * @param int $course_id
1638 1639
      * @param int $position
1639
-     * @return bool|int
1640
+     * @return false|string
1640 1641
      */
1641 1642
     static function saveQuestionOption($question_id, $name, $course_id, $position = 0)
1642 1643
     {
@@ -1775,6 +1776,7 @@  discard block
 block discarded – undo
1775 1776
      * @param   int     Maximum result for the question
1776 1777
      * @param   int     Type of question (see constants at beginning of question.class.php)
1777 1778
      * @param   int     Question level/category
1779
+     * @param string $quiz_id
1778 1780
      */
1779 1781
     public function create_question(
1780 1782
         $quiz_id,
@@ -1857,6 +1859,7 @@  discard block
 block discarded – undo
1857 1859
     /**
1858 1860
      * Get course medias
1859 1861
      * @param int course id
1862
+     * @param integer $course_id
1860 1863
      */
1861 1864
     static function get_course_medias(
1862 1865
         $course_id,
@@ -1922,7 +1925,7 @@  discard block
 block discarded – undo
1922 1925
     }
1923 1926
 
1924 1927
     /**
1925
-     * @return array
1928
+     * @return integer[]
1926 1929
      */
1927 1930
     public static function get_default_levels()
1928 1931
     {
Please login to merge, or discard this patch.
main/exercice/TestCategory.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -474,6 +474,7 @@  discard block
 block discarded – undo
474 474
 
475 475
 	/**
476 476
 	 * return a tab of $in_number random elements of $in_tab
477
+	 * @param integer $in_number
477 478
 	 */
478 479
     public static function getNElementsFromArray($in_tab, $in_number)
479 480
     {
@@ -650,7 +651,6 @@  discard block
 block discarded – undo
650 651
     /**
651 652
      * Return the id of the test category with title = $in_title
652 653
      * @param $in_title
653
-     * @param int $in_c_id
654 654
      *
655 655
      * @return int is id of test category
656 656
      */
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
      * @param int $questionId
679 679
      * @param int $courseId
680 680
 	 *
681
-	 * @return int
681
+	 * @return string|false
682 682
      */
683 683
     public static function add_category_for_question_id($categoryId, $questionId, $courseId)
684 684
     {
Please login to merge, or discard this patch.
main/exercice/unique_answer.class.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -417,8 +417,8 @@
 block discarded – undo
417 417
      * @param int $question_id  The question ID (to which the answer is attached)
418 418
      * @param string $title The text of the answer
419 419
      * @param string $comment The feedback for the answer
420
-     * @param float|null $score  The score you get when picking this answer
421
-     * @param int|null $correct  Whether this answer is considered *the* correct one (this is the unique answer type)
420
+     * @param double $score  The score you get when picking this answer
421
+     * @param integer $correct  Whether this answer is considered *the* correct one (this is the unique answer type)
422 422
      */
423 423
     public function addAnswer(
424 424
         $id,
Please login to merge, or discard this patch.
main/forum/forumfunction.inc.php 1 patch
Doc Comments   +16 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
  * an up and down icon except for the first (no up icon) and the last (no down icon)
1059 1059
  *          The key of this $list array is the id of the item.
1060 1060
  *
1061
- * @return void HTML
1061
+ * @return string HTML
1062 1062
  **/
1063 1063
 function return_up_down_icon($content, $id, $list)
1064 1064
 {
@@ -2011,7 +2011,7 @@  discard block
 block discarded – undo
2011 2011
  * This function retrieves forum thread users details
2012 2012
  * @param   int Thread ID
2013 2013
  * @param   string  Course DB name (optional)
2014
- * @return  resource array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
2014
+ * @return  Doctrine\DBAL\Driver\Statement|null array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
2015 2015
  * @author Christian Fasanando <[email protected]>,
2016 2016
  * @todo     this function need to be improved
2017 2017
  * @version octubre 2008, dokeos 1.8
@@ -2066,7 +2066,7 @@  discard block
 block discarded – undo
2066 2066
  * This function retrieves forum thread users qualify
2067 2067
  * @param   int Thread ID
2068 2068
  * @param   string  Course DB name (optional)
2069
- * @return  array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
2069
+ * @return  Doctrine\DBAL\Driver\Statement|null Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
2070 2070
  * @author Jhon Hinojosa
2071 2071
  * @todo     this function need to be improved
2072 2072
  */
@@ -2133,7 +2133,7 @@  discard block
 block discarded – undo
2133 2133
  * This function retrieves forum thread users not qualify
2134 2134
  * @param   int Thread ID
2135 2135
  * @param   string  Course DB name (optional)
2136
- * @return  array Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
2136
+ * @return  Doctrine\DBAL\Driver\Statement|null Array of type ([user_id=>w,lastname=>x,firstname=>y,thread_id=>z],[])
2137 2137
  * @author   Jhon Hinojosa<[email protected]>,
2138 2138
  * @version oct 2008, dokeos 1.8
2139 2139
  */
@@ -3163,6 +3163,10 @@  discard block
 block discarded – undo
3163 3163
  * @param integer contains the information the current user id
3164 3164
  * @param integer contains the information the current thread id
3165 3165
  * @param integer contains the information the current qualify
3166
+ * @param string $option
3167
+ * @param integer $course_id
3168
+ * @param integer $user_id
3169
+ * @param integer $thread_id
3166 3170
  * @return void
3167 3171
  * <code>$option=1 obtained the qualification of the current thread</code>
3168 3172
  * @author Isaac Flores <[email protected]>, U.N.A.S University
@@ -3722,6 +3726,8 @@  discard block
 block discarded – undo
3722 3726
  *
3723 3727
  * @author Patrick Cool <[email protected]>, Ghent University
3724 3728
  * @version february 2006, dokeos 1.8
3729
+ * @param string $last_post_id
3730
+ * @param string $post_date
3725 3731
  */
3726 3732
 function updateThreadInfo($thread_id, $last_post_id, $post_date)
3727 3733
 {
@@ -4025,6 +4031,8 @@  discard block
 block discarded – undo
4025 4031
  *
4026 4032
  * @param string  Content type (post, thread, forum, forum_category)
4027 4033
  * @param int     Item DB ID
4034
+ * @param string $content
4035
+ * @param integer $id
4028 4036
  * @return string language variable
4029 4037
  * @author Patrick Cool <[email protected]>, Ghent University
4030 4038
  * @version february 2006, dokeos 1.8
@@ -4461,6 +4469,7 @@  discard block
 block discarded – undo
4461 4469
 /**
4462 4470
  * Display the search results
4463 4471
  * @param string
4472
+ * @param string $search_term
4464 4473
  * @return void display the results
4465 4474
  * @author Patrick Cool <[email protected]>, Ghent University, Belgium
4466 4475
  * @version march 2008, dokeos 1.8.5
@@ -4590,7 +4599,7 @@  discard block
 block discarded – undo
4590 4599
  * This function adds an attachment file into a forum
4591 4600
  * @param string $file_comment  a comment about file
4592 4601
  * @param int $last_id from forum_post table
4593
- * @return int|bool
4602
+ * @return false|null
4594 4603
  */
4595 4604
 function add_forum_attachment_file($file_comment, $last_id)
4596 4605
 {
@@ -4801,7 +4810,7 @@  discard block
 block discarded – undo
4801 4810
  * @param post id
4802 4811
  * @param int $id_attach
4803 4812
  * @param bool $display to show or not result message
4804
- * @return void
4813
+ * @return integer
4805 4814
  * @author Julio Montoya Dokeos
4806 4815
  * @version october 2014, chamilo 1.9.8
4807 4816
  */
@@ -5083,7 +5092,7 @@  discard block
 block discarded – undo
5083 5092
  * @param integer $forum_id the id of the forum
5084 5093
  * @param integer $thread_id the id of the thread
5085 5094
  * @param integer $post_id the id of the post
5086
- * @return bool
5095
+ * @return false|null
5087 5096
  *
5088 5097
  * @author Patrick Cool <[email protected]>, Ghent University, Belgium
5089 5098
  * @version May 2008, dokeos 1.8.5
Please login to merge, or discard this patch.
main/gradebook/lib/be/abstractlink.class.php 1 patch
Doc Comments   +15 added lines, -4 removed lines patch added patch discarded remove patch
@@ -193,6 +193,9 @@  discard block
 block discarded – undo
193 193
         $this->visible = $visible;
194 194
     }
195 195
 
196
+    /**
197
+     * @param integer $id
198
+     */
196 199
     public function set_session_id($id)
197 200
     {
198 201
         $this->session_id = $id;
@@ -217,6 +220,12 @@  discard block
 block discarded – undo
217 220
     /**
218 221
      * Retrieve links and return them as an array of extensions of AbstractLink.
219 222
      * To keep consistency, do not call this method but LinkFactory::load instead.
223
+     * @param integer $id
224
+     * @param integer $type
225
+     * @param integer $user_id
226
+     * @param string $course_code
227
+     * @param integer $category_id
228
+     * @param integer $visible
220 229
      */
221 230
     public static function load(
222 231
         $id = null,
@@ -288,7 +297,7 @@  discard block
 block discarded – undo
288 297
     }
289 298
 
290 299
     /**
291
-     * @param $result
300
+     * @param Doctrine\DBAL\Driver\Statement|null $result
292 301
      * @return array
293 302
      */
294 303
     private static function create_objects_from_sql_result($result)
@@ -463,6 +472,7 @@  discard block
 block discarded – undo
463 472
 
464 473
     /**
465 474
      * Internal function used by get_target_categories()
475
+     * @param integer $level
466 476
      */
467 477
     private function add_target_subcategories($targets, $level, $catid)
468 478
     {
@@ -492,6 +502,7 @@  discard block
 block discarded – undo
492 502
      * Find links by name
493 503
      * To keep consistency, do not call this method but LinkFactory::find_links instead.
494 504
      * @todo can be written more efficiently using a new (but very complex) sql query
505
+     * @param string $name_mask
495 506
      */
496 507
     public function find_links ($name_mask,$selectcat)
497 508
     {
@@ -559,21 +570,21 @@  discard block
 block discarded – undo
559 570
     }
560 571
 
561 572
     /**
562
-     * @param $name
573
+     * @param string $name
563 574
      */
564 575
     public function set_name($name)
565 576
     {
566 577
     }
567 578
 
568 579
     /**
569
-     * @param $description
580
+     * @param string $description
570 581
      */
571 582
     public function set_description($description)
572 583
     {
573 584
     }
574 585
 
575 586
     /**
576
-     * @param $max
587
+     * @param integer $max
577 588
      */
578 589
     public function set_max($max)
579 590
     {
Please login to merge, or discard this patch.
main/gradebook/lib/be/category.class.php 1 patch
Doc Comments   +22 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     }
78 78
 
79 79
     /**
80
-     * @return float
80
+     * @return integer|null
81 81
      */
82 82
     public function get_certificate_min_score()
83 83
     {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     }
98 98
 
99 99
     /**
100
-     * @return mixed
100
+     * @return integer
101 101
      */
102 102
     public function get_parent_id()
103 103
     {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     }
106 106
 
107 107
     /**
108
-     * @return mixed
108
+     * @return integer
109 109
      */
110 110
     public function get_weight()
111 111
     {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     }
122 122
 
123 123
     /**
124
-     * @return mixed
124
+     * @return boolean
125 125
      */
126 126
     public function is_visible()
127 127
     {
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     }
245 245
 
246 246
     /**
247
-     * @return null
247
+     * @return null|integer
248 248
      */
249 249
     public function get_grade_model_id()
250 250
     {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
     }
488 488
 
489 489
     /**
490
-     * @param $result
490
+     * @param Doctrine\DBAL\Driver\Statement|null $result
491 491
      *
492 492
      * @return array
493 493
      */
@@ -863,7 +863,8 @@  discard block
 block discarded – undo
863 863
 
864 864
     /**
865 865
      * Calculate the score of this category
866
-     * @param $stud_id student id (default: all students - then the average is returned)
866
+     * @param integer $stud_id student id (default: all students - then the average is returned)
867
+     * @param integer $session_id
867 868
      * @return    array (score sum, weight sum)
868 869
      *             or null if no scores available
869 870
      */
@@ -1122,6 +1123,9 @@  discard block
 block discarded – undo
1122 1123
      * @param int       student id
1123 1124
      * @param string    Course code
1124 1125
      * @param int       Session id
1126
+     * @param integer $stud_id
1127
+     * @param string $course_code
1128
+     * @param integer $session_id
1125 1129
      */
1126 1130
     public function get_root_categories_for_student($stud_id, $course_code = null, $session_id = null)
1127 1131
     {
@@ -1202,6 +1206,9 @@  discard block
 block discarded – undo
1202 1206
      * @param int user id (to return everything, use 'null' here)
1203 1207
      * @param string course code (optional)
1204 1208
      * @param int session id (optional)
1209
+     * @param integer $user_id
1210
+     * @param string $course_code
1211
+     * @param integer $session_id
1205 1212
      */
1206 1213
     public function get_root_categories_for_teacher($user_id, $course_code = null, $session_id = null)
1207 1214
     {
@@ -1300,6 +1307,7 @@  discard block
 block discarded – undo
1300 1307
 
1301 1308
     /**
1302 1309
      * Internal function used by get_target_categories()
1310
+     * @param integer $level
1303 1311
      */
1304 1312
     private function add_target_subcategories($targets, $level, $catid)
1305 1313
     {
@@ -1399,6 +1407,8 @@  discard block
 block discarded – undo
1399 1407
 
1400 1408
     /**
1401 1409
      * Internal function used by get_tree()
1410
+     * @param integer $level
1411
+     * @param null|integer $visible
1402 1412
      */
1403 1413
     private function add_subtree ($targets, $level, $catid, $visible)
1404 1414
     {
@@ -1416,6 +1426,7 @@  discard block
 block discarded – undo
1416 1426
 
1417 1427
     /**
1418 1428
      * Generate an array of courses that a teacher hasn't created a category for.
1429
+     * @param integer $user_id
1419 1430
      * @return array 2-dimensional array - every element contains 2 subelements (code, title)
1420 1431
      */
1421 1432
     public function get_not_created_course_categories ($user_id)
@@ -1450,6 +1461,7 @@  discard block
 block discarded – undo
1450 1461
 
1451 1462
     /**
1452 1463
      * Generate an array of all courses that a teacher is admin of.
1464
+     * @param integer $user_id
1453 1465
      * @return array 2-dimensional array - every element contains 2 subelements (code, title)
1454 1466
      */
1455 1467
     public function get_all_courses ($user_id)
@@ -1530,7 +1542,7 @@  discard block
 block discarded – undo
1530 1542
     /**
1531 1543
      * Retrieve all categories inside a course independent category
1532 1544
      * that should be visible to a student.
1533
-     * @param $cat_id parent category
1545
+     * @param integer $cat_id parent category
1534 1546
      * @param $stud_id student id
1535 1547
      * @param $cats optional: if defined, the categories will be added to this array
1536 1548
      */
@@ -1851,7 +1863,7 @@  discard block
 block discarded – undo
1851 1863
      * the platform administrator.
1852 1864
      * @param int locked 1 or unlocked 0
1853 1865
 
1854
-     * @return bool
1866
+     * @return boolean|null
1855 1867
      * */
1856 1868
     public function lock($locked)
1857 1869
     {
@@ -2282,7 +2294,7 @@  discard block
 block discarded – undo
2282 2294
      * @param float $score The achieved score
2283 2295
      * @param int $userId The user id
2284 2296
      * @param int $categoryId The gradebook category
2285
-     * @return int The insert id
2297
+     * @return false|string The insert id
2286 2298
      */
2287 2299
     public static function registerCurrentScore($score, $userId, $categoryId)
2288 2300
     {
Please login to merge, or discard this patch.