Completed
Push — 1.10.x ( 9e3317...fcbc7e )
by Angel Fernando Quiroz
31:56
created
main/inc/lib/fileUpload.lib.php 1 patch
Doc Comments   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,6 +17,7 @@  discard block
 block discarded – undo
17 17
  *
18 18
  * @author - Hugues Peeters <[email protected]>
19 19
  * @param  - file_name (string) name of a file
20
+ * @param string $file_name
20 21
  * @return - the filenam phps'ized
21 22
  */
22 23
 function php2phps($file_name) {
@@ -73,7 +74,7 @@  discard block
 block discarded – undo
73 74
  * Returns the name without extension, used for the title
74 75
  *
75 76
  * @param string $name
76
- * @return name without the extension
77
+ * @return string without the extension
77 78
  */
78 79
 function get_document_title($name) {
79 80
     // If they upload .htaccess...
@@ -86,7 +87,7 @@  discard block
 block discarded – undo
86 87
  * This function checks if the upload succeeded
87 88
  *
88 89
  * @param array $uploaded_file ($_FILES)
89
- * @return true if upload succeeded
90
+ * @return boolean if upload succeeded
90 91
  */
91 92
 function process_uploaded_file($uploaded_file, $show_output = true)
92 93
 {
@@ -738,6 +739,8 @@  discard block
 block discarded – undo
738 739
  * @param  - dir (string) - Path of the directory
739 740
  *           whe the file should be added
740 741
  * @param  - max_dir_space (int) - maximum size of the diretory in byte
742
+ * @param string $dir
743
+ * @param integer $max_dir_space
741 744
  * @return - boolean true if there is enough space,
742 745
  *				boolean false otherwise
743 746
  *
@@ -1062,7 +1065,7 @@  discard block
 block discarded – undo
1062 1065
  * @param array  $courseInfo
1063 1066
  * @param array  $userInfo
1064 1067
  * @param array  $uploaded_file - follows the $_FILES Structure
1065
- * @param string $upload_path   - destination of the upload.
1068
+ * @param string $uploadPath   - destination of the upload.
1066 1069
  *                               This path is to append to $base_work_dir
1067 1070
  * @param string $base_work_dir  - base working directory of the module
1068 1071
  * @param int    $maxFilledSpace  - amount of bytes to not exceed in the base
@@ -1243,7 +1246,7 @@  discard block
 block discarded – undo
1243 1246
  * @param int $session_id Session ID, if any
1244 1247
  * @param int $userId creator id
1245 1248
  *
1246
- * @return int id if inserted document
1249
+ * @return string|false id if inserted document
1247 1250
  */
1248 1251
 function add_document(
1249 1252
     $_course,
@@ -1377,7 +1380,7 @@  discard block
 block discarded – undo
1377 1380
  *
1378 1381
  * @author	Olivier Cauberghe <[email protected]>
1379 1382
  * @param	path+filename eg: /main/document/document.php
1380
- * @return	The directory depth
1383
+ * @return	integer directory depth
1381 1384
  */
1382 1385
 function get_levels($filename) {
1383 1386
     $levels = explode('/', $filename);
@@ -1394,6 +1397,7 @@  discard block
 block discarded – undo
1394 1397
  * @author	Olivier Cauberghe <[email protected]>
1395 1398
  * @param	path,filename
1396 1399
  * action:	Adds an entry to the document table with the default settings.
1400
+ * @param string $upload_path
1397 1401
  */
1398 1402
 function set_default_settings($upload_path, $filename, $filetype = 'file')
1399 1403
 {
@@ -1818,6 +1822,7 @@  discard block
 block discarded – undo
1818 1822
 
1819 1823
 @author Roan Embrechts
1820 1824
 @version 0.6
1825
+ * @param string $buffer
1821 1826
  */
1822 1827
 function api_replace_links_in_string($upload_path, $buffer) {
1823 1828
     // Search for hyperlinks
@@ -2053,7 +2058,6 @@  discard block
 block discarded – undo
2053 2058
  * @param int $groupId
2054 2059
  * @param bool $output
2055 2060
  * @param array $parent
2056
- * @param string $uploadPath
2057 2061
  *
2058 2062
  */
2059 2063
 function add_all_documents_in_folder_to_database(
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/checkbox.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
      * @param     object    &$caller calling object
235 235
      * @since     1.0
236 236
      * @access    public
237
-     * @return    void
237
+     * @return    boolean
238 238
      */
239 239
     function onQuickFormEvent($event, $arg, &$caller)
240 240
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/image.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * Freeze the element so that only its value is returned
62 62
      *
63 63
      * @access    public
64
-     * @return    void
64
+     * @return    boolean
65 65
      */
66 66
     function freeze()
67 67
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/reset.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * Freeze the element so that only its value is returned
62 62
      *
63 63
      * @access    public
64
-     * @return    void
64
+     * @return    boolean
65 65
      */
66 66
     function freeze()
67 67
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/static.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
      * @param     object    &$caller calling object
162 162
      * @since     1.0
163 163
      * @access    public
164
-     * @return    void
164
+     * @return    boolean
165 165
      * @throws
166 166
      */
167 167
     function onQuickFormEvent($event, $arg, &$caller)
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/submit.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * Freeze the element so that only its value is returned
62 62
      *
63 63
      * @access    public
64
-     * @return    void
64
+     * @return    boolean
65 65
      */
66 66
     function freeze()
67 67
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/Table/Storage.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     /**
166 166
      * Returns the autoFill value
167 167
      * @access   public
168
-     * @return   mixed
168
+     * @return   string
169 169
      */
170 170
     public function getAutoFill()
171 171
     {
@@ -174,7 +174,6 @@  discard block
 block discarded – undo
174 174
 
175 175
     /**
176 176
      * Sets the autoGrow value
177
-     * @param    bool   $fill
178 177
      * @access   public
179 178
      */
180 179
     public function setAutoGrow($grow)
@@ -185,7 +184,7 @@  discard block
 block discarded – undo
185 184
     /**
186 185
      * Returns the autoGrow value
187 186
      * @access   public
188
-     * @return   mixed
187
+     * @return   boolean
189 188
      */
190 189
     public function getAutoGrow()
191 190
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/Pager/Sliding.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
      *
113 113
      * @param integer $pageid PageID to get offsets for
114 114
      *
115
-     * @return array  First and last offsets
115
+     * @return integer[]  First and last offsets
116 116
      * @access public
117 117
      */
118 118
     function getPageRangeByPageId($pageid = null)
Please login to merge, or discard this patch.
main/inc/lib/usermanager.lib.php 1 patch
Doc Comments   +31 added lines, -15 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     }
87 87
 
88 88
     /**
89
-     * @return bool|mixed
89
+     * @return string
90 90
      */
91 91
     public static function getPasswordEncryption()
92 92
     {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      * @param string $raw
162 162
      * @param User   $user
163 163
      *
164
-     * @return bool
164
+     * @return string
165 165
      */
166 166
     public static function encryptPassword($raw, User $user)
167 167
     {
@@ -960,6 +960,7 @@  discard block
 block discarded – undo
960 960
      * Disables or enables a user
961 961
      * @param int user_id
962 962
      * @param int Enable or disable
963
+     * @param integer $active
963 964
      * @return void
964 965
      * @assert (-1,0) === false
965 966
      * @assert (1,1) === true
@@ -990,6 +991,7 @@  discard block
 block discarded – undo
990 991
     /**
991 992
      * Disables a user
992 993
      * @param int User id
994
+     * @param integer $user_id
993 995
      * @return bool
994 996
      * @uses UserManager::change_active_state() to actually disable the user
995 997
      * @assert (0) === false
@@ -1006,6 +1008,7 @@  discard block
 block discarded – undo
1006 1008
     /**
1007 1009
      * Enable a user
1008 1010
      * @param int User id
1011
+     * @param integer $user_id
1009 1012
      * @return bool
1010 1013
      * @uses UserManager::change_active_state() to actually disable the user
1011 1014
      * @assert (0) === false
@@ -1170,6 +1173,7 @@  discard block
 block discarded – undo
1170 1173
      * Checks whether the user id exists in the database
1171 1174
      *
1172 1175
      * @param int User id
1176
+     * @param integer $userId
1173 1177
      * @return bool True if user id was found, false otherwise
1174 1178
      */
1175 1179
     public static function is_user_id_valid($userId)
@@ -1375,7 +1379,7 @@  discard block
 block discarded – undo
1375 1379
      * @param   array $userInfo user information to avoid query the DB
1376 1380
      * returns the /main/img/unknown.jpg image set it at true
1377 1381
      *
1378
-     * @return    array     Array of 2 elements: 'dir' and 'file' which contain
1382
+     * @return    integer     Array of 2 elements: 'dir' and 'file' which contain
1379 1383
      * the dir and file as the name implies if image does not exist it will
1380 1384
      * return the unknow image if anonymous parameter is true if not it returns an empty array
1381 1385
      */
@@ -1746,7 +1750,7 @@  discard block
 block discarded – undo
1746 1750
      * @param    int $user_id    User id
1747 1751
      * @param    $force    Optional parameter to force building after a removal request
1748 1752
      *
1749
-     * @return    A string containing the XHTML code to dipslay the production list, or FALSE
1753
+     * @return    boolean|string string containing the XHTML code to dipslay the production list, or FALSE
1750 1754
      */
1751 1755
     public static function build_production_list($user_id, $force = false, $showdelete = false)
1752 1756
     {
@@ -1782,7 +1786,7 @@  discard block
 block discarded – undo
1782 1786
     /**
1783 1787
      * Returns an array with the user's productions.
1784 1788
      *
1785
-     * @param    $user_id    User id
1789
+     * @param    integer $user_id    User id
1786 1790
      * @return   array  An array containing the user's productions
1787 1791
      */
1788 1792
     public static function get_user_productions($user_id)
@@ -1937,7 +1941,7 @@  discard block
 block discarded – undo
1937 1941
 
1938 1942
     /**
1939 1943
      * Build a list of extra file already uploaded in $user_folder/{$extra_field}/
1940
-     * @param $user_id
1944
+     * @param integer $user_id
1941 1945
      * @param $extra_field
1942 1946
      * @param bool $force
1943 1947
      * @param bool $showdelete
@@ -2042,7 +2046,7 @@  discard block
 block discarded – undo
2042 2046
      * @param    int       $fieldType  Field's type
2043 2047
      * @param    string    $displayText Field's language var name
2044 2048
      * @param    string    $default Field's default value
2045
-     * @return int
2049
+     * @return boolean
2046 2050
      */
2047 2051
     public static function create_extra_field($variable, $fieldType, $displayText, $default)
2048 2052
     {
@@ -2076,6 +2080,7 @@  discard block
 block discarded – undo
2076 2080
      * @param    boolean    Whether to prefix the fields indexes with "extra_" (might be used by formvalidator)
2077 2081
      * @param    boolean    Whether to return invisible fields as well
2078 2082
      * @param    boolean    Whether to split multiple-selection fields or not
2083
+     * @param boolean $field_filter
2079 2084
      * @return    array    Array of fields => value for the given user
2080 2085
      */
2081 2086
     public static function get_extra_user_data(
@@ -2262,7 +2267,6 @@  discard block
 block discarded – undo
2262 2267
     /**
2263 2268
      * Get all the extra field information of a certain field (also the options)
2264 2269
      *
2265
-     * @param int $field_name the name of the field we want to know everything of
2266 2270
      * @return array $return containing all th information about the extra profile field
2267 2271
      * @author Julio Montoya
2268 2272
      * @deprecated
@@ -2307,6 +2311,7 @@  discard block
 block discarded – undo
2307 2311
     /**
2308 2312
      * Get extra user data by field variable
2309 2313
      * @param string    field variable
2314
+     * @param string $field_variable
2310 2315
      * @return array    data
2311 2316
      */
2312 2317
     public static function get_extra_user_data_by_field_variable($field_variable)
@@ -2865,7 +2870,7 @@  discard block
 block discarded – undo
2865 2870
      * @param    string    User ID
2866 2871
      * @param   string  course directory
2867 2872
      * @param   string  resourcetype: images, all
2868
-     * @return    int        User ID (or false if not found)
2873
+     * @return    string        User ID (or false if not found)
2869 2874
      */
2870 2875
     public static function get_user_upload_files_by_course($user_id, $course, $resourcetype = 'all')
2871 2876
     {
@@ -2945,7 +2950,7 @@  discard block
 block discarded – undo
2945 2950
     /**
2946 2951
      * Adds a new API key to the users' account
2947 2952
      * @param   int     Optional user ID (defaults to the results of api_get_user_id())
2948
-     * @return  boolean True on success, false on failure
2953
+     * @return  false|string True on success, false on failure
2949 2954
      */
2950 2955
     public static function add_api_key($user_id = null, $api_service = 'dokeos')
2951 2956
     {
@@ -3000,6 +3005,7 @@  discard block
 block discarded – undo
3000 3005
      * Regenerate an API key from the user's account
3001 3006
      * @param   int     user ID (defaults to the results of api_get_user_id())
3002 3007
      * @param   string  API key's internal ID
3008
+     * @param string $api_service
3003 3009
      * @return  int        num
3004 3010
      */
3005 3011
     public static function update_api_key($user_id, $api_service)
@@ -3029,6 +3035,7 @@  discard block
 block discarded – undo
3029 3035
     /**
3030 3036
      * @param   int     user ID (defaults to the results of api_get_user_id())
3031 3037
      * @param   string    API key's internal ID
3038
+     * @param string $api_service
3032 3039
      * @return  int    row ID, or return false if not found
3033 3040
      */
3034 3041
     public static function get_api_key_id($user_id, $api_service)
@@ -3240,7 +3247,8 @@  discard block
 block discarded – undo
3240 3247
      * @param int user_id
3241 3248
      * @param int field_id
3242 3249
      * @param bool show links or not
3243
-     * @return array
3250
+     * @param integer $user_id
3251
+     * @return string
3244 3252
      */
3245 3253
     public static function get_user_tags_to_string($user_id, $field_id, $show_links = true)
3246 3254
     {
@@ -3285,6 +3293,8 @@  discard block
 block discarded – undo
3285 3293
      * Get the tag id
3286 3294
      * @param int tag
3287 3295
      * @param int field_id
3296
+     * @param string $tag
3297
+     * @param integer $field_id
3288 3298
      * @return int returns 0 if fails otherwise the tag id
3289 3299
      */
3290 3300
     public static function get_tag_id($tag, $field_id)
@@ -3331,7 +3341,7 @@  discard block
 block discarded – undo
3331 3341
      * @param mixed tag
3332 3342
      * @param int The user id
3333 3343
      * @param int field id of the tag
3334
-     * @return bool
3344
+     * @return boolean|null
3335 3345
      */
3336 3346
     public static function add_tag($tag, $user_id, $field_id)
3337 3347
     {
@@ -4151,7 +4161,7 @@  discard block
 block discarded – undo
4151 4161
      * Add subscribed users to a user by relation type
4152 4162
      * @param int $userId The user id
4153 4163
      * @param array $subscribedUsersId The id of suscribed users
4154
-     * @param action $relationType The relation type
4164
+     * @param integer $relationType The relation type
4155 4165
      */
4156 4166
     public static function subscribeUsersToUser($userId, $subscribedUsersId, $relationType, $deleteUsersBeforeInsert = false)
4157 4167
     {
@@ -4216,6 +4226,8 @@  discard block
 block discarded – undo
4216 4226
      * This function check if an user is followed by human resources manager
4217 4227
      * @param     int     User id
4218 4228
      * @param    int        Human resources manager
4229
+     * @param integer $user_id
4230
+     * @param integer $hr_dept_id
4219 4231
      * @return    bool
4220 4232
      */
4221 4233
     public static function is_user_followed_by_drh($user_id, $hr_dept_id)
@@ -4288,6 +4300,8 @@  discard block
 block discarded – undo
4288 4300
      * Determines if a user is a gradebook certified
4289 4301
      * @param int The category id of gradebook
4290 4302
      * @param int The user id
4303
+     * @param integer $cat_id
4304
+     * @param integer $user_id
4291 4305
      * @return boolean
4292 4306
      */
4293 4307
     public static function is_user_certified($cat_id, $user_id)
@@ -4310,6 +4324,8 @@  discard block
 block discarded – undo
4310 4324
      * Gets the info about a gradebook certificate for a user by course
4311 4325
      * @param string The course code
4312 4326
      * @param int The user id
4327
+     * @param integer $course_code
4328
+     * @param integer $user_id
4313 4329
      * @return array  if there is not information return false
4314 4330
      */
4315 4331
     public static function get_info_gradebook_certificate($course_code, $user_id)
@@ -4773,7 +4789,7 @@  discard block
 block discarded – undo
4773 4789
     }
4774 4790
 
4775 4791
     /**
4776
-     * @return array
4792
+     * @return string[]
4777 4793
      */
4778 4794
     static function get_user_field_types()
4779 4795
     {
@@ -5093,7 +5109,7 @@  discard block
 block discarded – undo
5093 5109
      * Get either a Gravatar URL or complete image tag for a specified email address.
5094 5110
      *
5095 5111
      * @param string $email The email address
5096
-     * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ]
5112
+     * @param integer $s Size in pixels, defaults to 80px [ 1 - 2048 ]
5097 5113
      * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ]
5098 5114
      * @param string $r Maximum rating (inclusive) [ g | pg | r | x ]
5099 5115
      * @param boole $img True to return a complete IMG tag False for just the URL
Please login to merge, or discard this patch.