Completed
Pull Request — 1.11.x (#1238)
by José
164:28 queued 111:03
created
main/inc/lib/glossary.lib.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      *
96 96
      * @param array  $values  Array of title + description (name => $title, description => $comment)
97 97
      *
98
-     * @return mixed   Term id on success, false on failure
98
+     * @return false|string   Term id on success, false on failure
99 99
      *
100 100
      */
101 101
     public static function save_glossary($values, $showMessage = true)
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 
449 449
     /**
450 450
      * Display the glossary terms in a list
451
-     * @return bool true
451
+     * @return string true
452 452
      */
453 453
     public static function displayGlossaryList()
454 454
     {
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
      * Update action icons column
586 586
      *
587 587
      * @param integer $glossary_id
588
-     * @param array   $url_params Parameters to use to affect links
588
+     * @param string   $url_params Parameters to use to affect links
589 589
      * @param array   $row The line of results from a query on the glossary table
590 590
      *
591 591
      * @return string HTML string for the action icons columns
Please login to merge, or discard this patch.
main/inc/lib/extra_field.lib.php 1 patch
Doc Comments   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     }
139 139
 
140 140
     /**
141
-     * @return array
141
+     * @return string[]
142 142
      */
143 143
     public static function getValidExtraFieldTypes()
144 144
     {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
     /**
216 216
      * @param array $conditions
217
-     * @param null  $order_field_options_by
217
+     * @param string  $order_field_options_by
218 218
      *
219 219
      * @return array
220 220
      */
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     /**
340 340
      * @param string $handler
341 341
      *
342
-     * @return array
342
+     * @return string[]
343 343
      */
344 344
     public static function get_extra_fields_by_handler($handler)
345 345
     {
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
     }
535 535
 
536 536
     /**
537
-     * @return array
537
+     * @return string[]
538 538
      */
539 539
     public function get_field_types()
540 540
     {
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
     /**
545 545
      * @param int $id
546 546
      *
547
-     * @return null
547
+     * @return string|null
548 548
      */
549 549
     public function get_field_type_by_id($id)
550 550
     {
@@ -739,7 +739,6 @@  discard block
 block discarded – undo
739 739
      * @param FormValidator $form
740 740
      * @param array $extraData
741 741
      * @param bool $admin_permissions
742
-     * @param int $user_id
743 742
      * @param array $extra
744 743
      * @param int $itemId
745 744
      * @param array $exclude variables of extra field to exclude
@@ -1784,7 +1783,7 @@  discard block
 block discarded – undo
1784 1783
     }
1785 1784
 
1786 1785
     /**
1787
-     * @return array
1786
+     * @return string[]
1788 1787
      */
1789 1788
     public function getJqgridColumnNames()
1790 1789
     {
@@ -2044,7 +2043,7 @@  discard block
 block discarded – undo
2044 2043
     }
2045 2044
 
2046 2045
     /**
2047
-     * @param array $columns
2046
+     * @param string[] $columns
2048 2047
      * @param array  $column_model
2049 2048
      * @param array  $extraFields
2050 2049
      * @return array
Please login to merge, or discard this patch.
main/inc/lib/usermanager.lib.php 1 patch
Doc Comments   +29 added lines, -15 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     /**
139 139
      * Validates the password
140 140
      *
141
-     * @param $encoded
141
+     * @param string $encoded
142 142
      * @param $raw
143 143
      * @param $salt
144 144
      * @return bool
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      * @param string $raw
156 156
      * @param User   $user
157 157
      *
158
-     * @return bool
158
+     * @return string
159 159
      */
160 160
     public static function encryptPassword($raw, User $user)
161 161
     {
@@ -1003,6 +1003,7 @@  discard block
 block discarded – undo
1003 1003
      * Disables or enables a user
1004 1004
      * @param int user_id
1005 1005
      * @param int Enable or disable
1006
+     * @param integer $active
1006 1007
      * @return void
1007 1008
      * @assert (-1,0) === false
1008 1009
      * @assert (1,1) === true
@@ -1033,6 +1034,7 @@  discard block
 block discarded – undo
1033 1034
     /**
1034 1035
      * Disables a user
1035 1036
      * @param int User id
1037
+     * @param integer $user_id
1036 1038
      * @return bool
1037 1039
      * @uses UserManager::change_active_state() to actually disable the user
1038 1040
      * @assert (0) === false
@@ -1049,6 +1051,7 @@  discard block
 block discarded – undo
1049 1051
     /**
1050 1052
      * Enable a user
1051 1053
      * @param int User id
1054
+     * @param integer $user_id
1052 1055
      * @return bool
1053 1056
      * @uses UserManager::change_active_state() to actually disable the user
1054 1057
      * @assert (0) === false
@@ -1213,6 +1216,7 @@  discard block
 block discarded – undo
1213 1216
      * Checks whether the user id exists in the database
1214 1217
      *
1215 1218
      * @param int User id
1219
+     * @param integer $userId
1216 1220
      * @return bool True if user id was found, false otherwise
1217 1221
      */
1218 1222
     public static function is_user_id_valid($userId)
@@ -1410,7 +1414,7 @@  discard block
 block discarded – undo
1410 1414
      * @param   array $userInfo user information to avoid query the DB
1411 1415
      * returns the /main/img/unknown.jpg image set it at true
1412 1416
      *
1413
-     * @return    array     Array of 2 elements: 'dir' and 'file' which contain
1417
+     * @return    integer     Array of 2 elements: 'dir' and 'file' which contain
1414 1418
      * the dir and file as the name implies if image does not exist it will
1415 1419
      * return the unknow image if anonymous parameter is true if not it returns an empty array
1416 1420
      */
@@ -1778,7 +1782,7 @@  discard block
 block discarded – undo
1778 1782
      * @param    int $user_id    User id
1779 1783
      * @param    $force    Optional parameter to force building after a removal request
1780 1784
      *
1781
-     * @return    A string containing the XHTML code to dipslay the production list, or FALSE
1785
+     * @return    boolean|string string containing the XHTML code to dipslay the production list, or FALSE
1782 1786
      */
1783 1787
     public static function build_production_list($user_id, $force = false, $showdelete = false)
1784 1788
     {
@@ -1814,7 +1818,7 @@  discard block
 block discarded – undo
1814 1818
     /**
1815 1819
      * Returns an array with the user's productions.
1816 1820
      *
1817
-     * @param    $user_id    User id
1821
+     * @param    integer $user_id    User id
1818 1822
      * @return   array  An array containing the user's productions
1819 1823
      */
1820 1824
     public static function get_user_productions($user_id)
@@ -1969,7 +1973,7 @@  discard block
 block discarded – undo
1969 1973
 
1970 1974
     /**
1971 1975
      * Build a list of extra file already uploaded in $user_folder/{$extra_field}/
1972
-     * @param $user_id
1976
+     * @param integer $user_id
1973 1977
      * @param $extra_field
1974 1978
      * @param bool $force
1975 1979
      * @param bool $showdelete
@@ -2074,7 +2078,7 @@  discard block
 block discarded – undo
2074 2078
      * @param    int       $fieldType  Field's type
2075 2079
      * @param    string    $displayText Field's language var name
2076 2080
      * @param    string    $default Field's default value
2077
-     * @return int
2081
+     * @return boolean
2078 2082
      */
2079 2083
     public static function create_extra_field($variable, $fieldType, $displayText, $default)
2080 2084
     {
@@ -2108,6 +2112,7 @@  discard block
 block discarded – undo
2108 2112
      * @param    boolean    Whether to prefix the fields indexes with "extra_" (might be used by formvalidator)
2109 2113
      * @param    boolean    Whether to return invisible fields as well
2110 2114
      * @param    boolean    Whether to split multiple-selection fields or not
2115
+     * @param boolean $field_filter
2111 2116
      * @return    array    Array of fields => value for the given user
2112 2117
      */
2113 2118
     public static function get_extra_user_data(
@@ -2350,6 +2355,7 @@  discard block
 block discarded – undo
2350 2355
     /**
2351 2356
      * Get extra user data by field variable
2352 2357
      * @param string    field variable
2358
+     * @param string $field_variable
2353 2359
      * @return array    data
2354 2360
      */
2355 2361
     public static function get_extra_user_data_by_field_variable($field_variable)
@@ -2899,7 +2905,7 @@  discard block
 block discarded – undo
2899 2905
      * @param    string    User ID
2900 2906
      * @param   string  course directory
2901 2907
      * @param   string  resourcetype: images, all
2902
-     * @return    int        User ID (or false if not found)
2908
+     * @return    string        User ID (or false if not found)
2903 2909
      */
2904 2910
     public static function get_user_upload_files_by_course($user_id, $course, $resourcetype = 'all')
2905 2911
     {
@@ -2979,7 +2985,7 @@  discard block
 block discarded – undo
2979 2985
     /**
2980 2986
      * Adds a new API key to the users' account
2981 2987
      * @param   int     Optional user ID (defaults to the results of api_get_user_id())
2982
-     * @return  boolean True on success, false on failure
2988
+     * @return  false|string True on success, false on failure
2983 2989
      */
2984 2990
     public static function add_api_key($user_id = null, $api_service = 'dokeos')
2985 2991
     {
@@ -3034,6 +3040,7 @@  discard block
 block discarded – undo
3034 3040
      * Regenerate an API key from the user's account
3035 3041
      * @param   int     user ID (defaults to the results of api_get_user_id())
3036 3042
      * @param   string  API key's internal ID
3043
+     * @param string $api_service
3037 3044
      * @return  int        num
3038 3045
      */
3039 3046
     public static function update_api_key($user_id, $api_service)
@@ -3063,6 +3070,7 @@  discard block
 block discarded – undo
3063 3070
     /**
3064 3071
      * @param   int     user ID (defaults to the results of api_get_user_id())
3065 3072
      * @param   string    API key's internal ID
3073
+     * @param string $api_service
3066 3074
      * @return  int    row ID, or return false if not found
3067 3075
      */
3068 3076
     public static function get_api_key_id($user_id, $api_service)
@@ -3277,7 +3285,7 @@  discard block
 block discarded – undo
3277 3285
      * @param int $field_id
3278 3286
      * @param bool $show_links show links or not
3279 3287
      *
3280
-     * @return array
3288
+     * @return string
3281 3289
      */
3282 3290
     public static function get_user_tags_to_string($user_id, $field_id, $show_links = true)
3283 3291
     {
@@ -3374,7 +3382,7 @@  discard block
 block discarded – undo
3374 3382
      * @param mixed $tag
3375 3383
      * @param int $user_id
3376 3384
      * @param int $field_id field id of the tag
3377
-     * @return bool
3385
+     * @return boolean|null
3378 3386
      */
3379 3387
     public static function add_tag($tag, $user_id, $field_id)
3380 3388
     {
@@ -4190,7 +4198,7 @@  discard block
 block discarded – undo
4190 4198
      * Add subscribed users to a user by relation type
4191 4199
      * @param int $userId The user id
4192 4200
      * @param array $subscribedUsersId The id of suscribed users
4193
-     * @param action $relationType The relation type
4201
+     * @param integer $relationType The relation type
4194 4202
      */
4195 4203
     public static function subscribeUsersToUser($userId, $subscribedUsersId, $relationType, $deleteUsersBeforeInsert = false)
4196 4204
     {
@@ -4255,6 +4263,8 @@  discard block
 block discarded – undo
4255 4263
      * This function check if an user is followed by human resources manager
4256 4264
      * @param     int     User id
4257 4265
      * @param    int        Human resources manager
4266
+     * @param integer $user_id
4267
+     * @param integer $hr_dept_id
4258 4268
      * @return    bool
4259 4269
      */
4260 4270
     public static function is_user_followed_by_drh($user_id, $hr_dept_id)
@@ -4327,6 +4337,8 @@  discard block
 block discarded – undo
4327 4337
      * Determines if a user is a gradebook certified
4328 4338
      * @param int The category id of gradebook
4329 4339
      * @param int The user id
4340
+     * @param integer $cat_id
4341
+     * @param integer $user_id
4330 4342
      * @return boolean
4331 4343
      */
4332 4344
     public static function is_user_certified($cat_id, $user_id)
@@ -4349,6 +4361,8 @@  discard block
 block discarded – undo
4349 4361
      * Gets the info about a gradebook certificate for a user by course
4350 4362
      * @param string The course code
4351 4363
      * @param int The user id
4364
+     * @param integer $course_code
4365
+     * @param integer $user_id
4352 4366
      * @return array  if there is not information return false
4353 4367
      */
4354 4368
     public static function get_info_gradebook_certificate($course_code, $user_id)
@@ -4812,7 +4826,7 @@  discard block
 block discarded – undo
4812 4826
     }
4813 4827
 
4814 4828
     /**
4815
-     * @return array
4829
+     * @return string[]
4816 4830
      */
4817 4831
     static function get_user_field_types()
4818 4832
     {
@@ -5105,7 +5119,7 @@  discard block
 block discarded – undo
5105 5119
 
5106 5120
     /**
5107 5121
      * Get the boss user ID from a followed user id
5108
-     * @param $userId
5122
+     * @param integer $userId
5109 5123
      * @return bool
5110 5124
      */
5111 5125
     public static function getStudentBossList($userId)
@@ -5157,7 +5171,7 @@  discard block
 block discarded – undo
5157 5171
      * Get either a Gravatar URL or complete image tag for a specified email address.
5158 5172
      *
5159 5173
      * @param string $email The email address
5160
-     * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ]
5174
+     * @param integer $s Size in pixels, defaults to 80px [ 1 - 2048 ]
5161 5175
      * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ]
5162 5176
      * @param string $r Maximum rating (inclusive) [ g | pg | r | x ]
5163 5177
      * @param boole $img True to return a complete IMG tag False for just the URL
Please login to merge, or discard this patch.