Passed
Push — 1.10.x ( 88b3ac...12c7e7 )
by Angel Fernando Quiroz
46:55
created
main/survey/survey.lib.php 1 patch
Doc Comments   +18 added lines, -16 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * Deletes all survey invitations of a user
48 48
      * @param int $user_id
49 49
      *
50
-     * @return boolean
50
+     * @return false|null
51 51
      * @assert ('') === false
52 52
      */
53 53
     public static function delete_all_survey_invitations_by_user($user_id)
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * Retrieves all the survey information
105 105
      *
106 106
      * @param integer $survey_id the id of the survey
107
-     * @param boolean $shared this parameter determines if
107
+     * @param integer $shared this parameter determines if
108 108
      * we have to get the information of a survey from the central (shared) database or from the
109 109
      * 		  course database
110 110
      * @param string course code optional
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
      * This function deletes a survey (and also all the question in that survey
572 572
      *
573 573
      * @param int $survey_id id of the survey that has to be deleted
574
-     * @return true
574
+     * @return boolean
575 575
      *
576 576
      * @author Patrick Cool <[email protected]>, Ghent University
577 577
      * @version January 2007
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
      *
757 757
      * @param int $survey_id id of the survey that has to be duplicated
758 758
      * @param int $courseId id of the course which survey has to be duplicated
759
-     * @return true
759
+     * @return boolean
760 760
      *
761 761
      * @author Eric Marguin <[email protected]>, Elixir Interactive
762 762
      * @version October 2007
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
     /**
797 797
      * This function recalculates the number of people who have taken the survey (=filled at least one question)
798 798
      *
799
-     * @param int $survey_id the id of the survey somebody
799
+     * @param int $survey_data the id of the survey somebody
800 800
      * @return true
801 801
      *
802 802
      * @author Patrick Cool <[email protected]>, Ghent University
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
      * and all the options of all the questions.
842 842
      *
843 843
      * @param integer $survey_id the id of the survey
844
-     * @param boolean $shared this parameter determines if we have to get the
844
+     * @param integer $shared this parameter determines if we have to get the
845 845
      * information of a survey from the central (shared) database or from the
846 846
      * course database
847 847
      *
@@ -1387,7 +1387,7 @@  discard block
 block discarded – undo
1387 1387
      * This function deletes a shared survey question from the main database and all its options
1388 1388
      *
1389 1389
      * @param int $question_id the id of the question
1390
-     * @param int $shared
1390
+     * @param integer $survey_id
1391 1391
      *
1392 1392
      * @todo delete all the options of this question
1393 1393
      *
@@ -1514,8 +1514,8 @@  discard block
 block discarded – undo
1514 1514
      * This function deletes all the options of the questions of a given survey
1515 1515
      * This function is normally only called when a survey is deleted
1516 1516
      *
1517
-     * @param $survey_id the id of the survey that has to be deleted
1518
-     * @return true
1517
+     * @param integer $survey_id the id of the survey that has to be deleted
1518
+     * @return boolean
1519 1519
      *
1520 1520
      * @author Patrick Cool <[email protected]>, Ghent University
1521 1521
      * @version January 2007
@@ -1581,8 +1581,8 @@  discard block
 block discarded – undo
1581 1581
      * This function deletes all the answers anyone has given on this survey
1582 1582
      * This function is normally only called when a survey is deleted
1583 1583
      *
1584
-     * @param $survey_id the id of the survey that has to be deleted
1585
-     * @return true
1584
+     * @param integer $survey_id the id of the survey that has to be deleted
1585
+     * @return boolean
1586 1586
      *
1587 1587
      * @todo write the function
1588 1588
      *
@@ -1824,7 +1824,7 @@  discard block
 block discarded – undo
1824 1824
     /**
1825 1825
      * This function checks the parameters that are used in this page
1826 1826
      *
1827
-     * @return 	string 	The header, an error and the footer if any parameter fails, else it returns true
1827
+     * @return 	null|boolean 	The header, an error and the footer if any parameter fails, else it returns true
1828 1828
      * @author Patrick Cool <[email protected]>, Ghent University
1829 1829
      * @version February 2007
1830 1830
      */
@@ -2391,6 +2391,7 @@  discard block
 block discarded – undo
2391 2391
      * Display score data about a survey question
2392 2392
      * @param	array	Question info
2393 2393
      * @param	integer	The offset of results shown
2394
+     * @param integer $offset
2394 2395
      * @return	void 	(direct output)
2395 2396
      */
2396 2397
     public static function display_question_report_score($survey_data, $question, $offset)
@@ -3228,7 +3229,7 @@  discard block
 block discarded – undo
3228 3229
      * @param	array	User's answers
3229 3230
      * @param 	mixed	User ID or user details as string - Used as a string in the result string
3230 3231
      * @param	boolean	Whether to display user fields or not
3231
-     * @return	string	One line of the csv file
3232
+     * @return	string[]	One line of the csv file
3232 3233
      */
3233 3234
     static function export_complete_report_row_xls(
3234 3235
         $survey_data,
@@ -3821,7 +3822,7 @@  discard block
 block discarded – undo
3821 3822
 
3822 3823
     /**
3823 3824
      * @param $params
3824
-     * @return bool|int
3825
+     * @return false|string
3825 3826
      */
3826 3827
     public static function save_invitation($params)
3827 3828
     {
@@ -3875,6 +3876,7 @@  discard block
 block discarded – undo
3875 3876
      *
3876 3877
      * @param int invitedUser - the userId (course user) or emailaddress of additional user
3877 3878
      * $param string $invitation_code - the unique invitation code for the URL
3879
+     * @param string|null $invitation_text
3878 3880
      * @return	void
3879 3881
      */
3880 3882
     public static function send_invitation_mail($invitedUser, $invitation_code, $invitation_title, $invitation_text)
@@ -4803,7 +4805,7 @@  discard block
 block discarded – undo
4803 4805
     /**
4804 4806
      * @author Isaac Flores Paz <[email protected]>
4805 4807
      * @param int $user_id - User ID
4806
-     * @param int $user_id_answer - User in survey answer table (user id or anonymus)
4808
+     * @param int $user_answer - User in survey answer table (user id or anonymus)
4807 4809
      * @return boolean
4808 4810
      */
4809 4811
     static function show_link_available($user_id, $survey_code, $user_answer)
@@ -4849,7 +4851,7 @@  discard block
 block discarded – undo
4849 4851
      * Display survey question chart
4850 4852
      * @param	array	Chart data
4851 4853
      * @param	boolean	Tells if the chart has a serie. False by default
4852
-     * @return	void 	(direct output)
4854
+     * @return	string 	(direct output)
4853 4855
      */
4854 4856
     public static function drawChart($chartData, $hasSerie = false, $chartContainerId = 'chartContainer')
4855 4857
     {
Please login to merge, or discard this patch.
main/user/user.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -735,7 +735,6 @@
 block discarded – undo
735 735
  * lock = the user can no longer use this account
736 736
  * @author Patrick Cool <[email protected]>, Ghent University
737 737
  * @param int $active the current state of the account
738
- * @param int $user_id The user id
739 738
  * @param string $urlParams
740 739
  *
741 740
  * @return string Some HTML-code with the lock/unlock button
Please login to merge, or discard this patch.
main/webservices/additional_webservices.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 }
85 85
 
86 86
 /**
87
- * @param $directoryPath
87
+ * @param string $directoryPath
88 88
  * @return bool
89 89
  */
90 90
 function deleteDirectory($directoryPath)
Please login to merge, or discard this patch.
main/webservices/cm_webservice.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,6 +32,8 @@  discard block
 block discarded – undo
32 32
 	 *
33 33
 	 * @param int Error code
34 34
 	 * @param string Error message
35
+	 * @param integer $code
36
+	 * @param string $message
35 37
 	 */
36 38
 	public function __construct($code, $message) {
37 39
 		$this->code = $code;
@@ -42,6 +44,7 @@  discard block
 block discarded – undo
42 44
 	 * Sets the error handler
43 45
 	 *
44 46
 	 * @param WSErrorHandler Error handler
47
+	 * @param WSCMSoapErrorHandler $handler
45 48
 	 */
46 49
 	public static function setErrorHandler($handler) {
47 50
 		if($handler instanceof WSErrorHandler) {
@@ -76,6 +79,7 @@  discard block
 block discarded – undo
76 79
 	 * Handle method
77 80
 	 *
78 81
 	 * @param WSError Error
82
+	 * @return void
79 83
 	 */
80 84
 	public function handle($error);
81 85
 }
@@ -102,7 +106,7 @@  discard block
 block discarded – undo
102 106
 	 * Verifies the API key
103 107
 	 *
104 108
 	 * @param string Secret key
105
-	 * @return mixed WSError in case of failure, null in case of success
109
+	 * @return WSCMError|null WSError in case of failure, null in case of success
106 110
 	 */
107 111
 	protected function verifyKey($secret_key) {
108 112
 		$ip = trim($_SERVER['REMOTE_ADDR']);
Please login to merge, or discard this patch.
main/webservices/cm_webservice_inbox.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -204,6 +204,9 @@
 block discarded – undo
204 204
 
205 205
     }
206 206
 
207
+    /**
208
+     * @param integer $user_id
209
+     */
207 210
     protected function set_message_as_read($user_id, $message_id){
208 211
         $table_message = Database::get_main_table(TABLE_MESSAGE);
209 212
         $query = "UPDATE $table_message SET msg_status = '".MESSAGE_STATUS_NEW."' WHERE user_receiver_id=".$user_id." AND id='".$message_id."';";
Please login to merge, or discard this patch.
main/webservices/cm_webservice_user.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
     /**
138 138
     * Get a list of users of which the given conditions match with a LIKE '%cond%'
139 139
     * @param array $conditions a list of condition (exemple : status=>STUDENT)
140
-    * @param array $order_by a list of fields on which sort
140
+    * @param string[] $order_by a list of fields on which sort
141 141
     * @return array An array with all users of the platform.
142 142
     * @todo optional course code parameter, optional sorting parameters...
143 143
      *@todo Use the UserManager class
Please login to merge, or discard this patch.
main/webservices/lp.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 
21 21
 define('WS_ERROR_SECRET_KEY', 1);
22 22
 
23
+/**
24
+ * @param integer $code
25
+ */
23 26
 function return_error($code) {
24 27
     $fault = null;
25 28
     switch ($code) {
Please login to merge, or discard this patch.
main/webservices/registration.soap.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -2617,6 +2617,9 @@
 block discarded – undo
2617 2617
     )
2618 2618
 );
2619 2619
 
2620
+/**
2621
+ * @param string $type
2622
+ */
2620 2623
 function WSHelperActionOnUsers($params, $type) {
2621 2624
     if(!WSHelperVerifyKey($params)) {
2622 2625
         return returnError(WS_ERROR_SECRET_KEY);
Please login to merge, or discard this patch.
main/webservices/webservice.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,6 +37,8 @@  discard block
 block discarded – undo
37 37
 	 *
38 38
 	 * @param int Error code
39 39
 	 * @param string Error message
40
+	 * @param integer $code
41
+	 * @param string $message
40 42
 	 */
41 43
 	public function __construct($code, $message) {
42 44
 		$this->code = $code;
@@ -47,6 +49,7 @@  discard block
 block discarded – undo
47 49
 	 * Sets the error handler
48 50
 	 *
49 51
 	 * @param WSErrorHandler Error handler
52
+	 * @param WSSoapErrorHandler $handler
50 53
 	 */
51 54
 	public static function setErrorHandler($handler) {
52 55
 		if($handler instanceof WSErrorHandler) {
@@ -81,6 +84,7 @@  discard block
 block discarded – undo
81 84
 	 * Handle method
82 85
 	 *
83 86
 	 * @param WSError Error
87
+	 * @return void
84 88
 	 */
85 89
 	public function handle($error);
86 90
 }
@@ -107,7 +111,7 @@  discard block
 block discarded – undo
107 111
 	 * Verifies the API key
108 112
 	 *
109 113
 	 * @param string Secret key
110
-	 * @return mixed WSError in case of failure, null in case of success
114
+	 * @return WSError|null WSError in case of failure, null in case of success
111 115
 	 */
112 116
 	protected function verifyKey($secret_key) {
113 117
 		$ip = trim($_SERVER['REMOTE_ADDR']);
Please login to merge, or discard this patch.