Completed
Pull Request — 1.11.x (#1312)
by José
159:33 queued 120:14
created
main/inc/lib/document.lib.php 1 patch
Doc Comments   +23 added lines, -18 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     /**
278 278
      *  @param string
279 279
      *  @param string
280
-     * 	@return true if the user is allowed to see the document, false otherwise
280
+     * 	@return boolean if the user is allowed to see the document, false otherwise
281 281
      * 	@author Sergio A Kessler, first version
282 282
      * 	@author Roan Embrechts, bugfix
283 283
      *  @todo not only check if a file is visible, but also check if the user is allowed to see the file??
@@ -1529,7 +1529,7 @@  discard block
 block discarded – undo
1529 1529
      * Return true if the documentpath have visibility=1 as
1530 1530
      * item_property (you should use the is_visible_by_id)
1531 1531
      *
1532
-     * @param string $document_path the relative complete path of the document
1532
+     * @param string $doc_path the relative complete path of the document
1533 1533
      * @param array  $course the _course array info of the document's course
1534 1534
      * @param int
1535 1535
      * @param string
@@ -1615,6 +1615,8 @@  discard block
 block discarded – undo
1615 1615
      * @param   int
1616 1616
      * @param   int
1617 1617
      * @param bool
1618
+     * @param integer $session_id
1619
+     * @param integer $user_id
1618 1620
      * @return  bool
1619 1621
      */
1620 1622
     public static function is_visible_by_id(
@@ -1966,7 +1968,7 @@  discard block
 block discarded – undo
1966 1968
      * Remove default certificate
1967 1969
      * @param string $course_id The course code
1968 1970
      * @param int $default_certificate_id The document id of the default certificate
1969
-     * @return void
1971
+     * @return false|null
1970 1972
      */
1971 1973
     public static function remove_attach_certificate($course_id, $default_certificate_id)
1972 1974
     {
@@ -2101,6 +2103,7 @@  discard block
 block discarded – undo
2101 2103
      * @param	bool  	is file or string html
2102 2104
      * @param	string	type (one of the app tools) - optional (otherwise takes the current item's type)
2103 2105
      * @param	int		level of recursivity we're in
2106
+     * @param string $source_html
2104 2107
      * @return	array	List of file paths. An additional field containing 'local' or 'remote' helps determine
2105 2108
      * if the file should be copied into the zip or just linked
2106 2109
      */
@@ -2940,6 +2943,7 @@  discard block
 block discarded – undo
2940 2943
 
2941 2944
     /**
2942 2945
      * Obtains the text inside the file with the right parser
2946
+     * @param string $doc_path
2943 2947
      */
2944 2948
     public static function get_text_content($doc_path, $doc_mime)
2945 2949
     {
@@ -3191,6 +3195,7 @@  discard block
 block discarded – undo
3191 3195
      * Shows a play icon next to the document title in the document list
3192 3196
      * @param int
3193 3197
      * @param string
3198
+     * @param integer|null $i
3194 3199
      * @return string	html content
3195 3200
      */
3196 3201
     public static function generate_media_preview($i, $type = 'simple')
@@ -4089,7 +4094,7 @@  discard block
 block discarded – undo
4089 4094
     }
4090 4095
 
4091 4096
     /**
4092
-     * @return array
4097
+     * @return string[]
4093 4098
      */
4094 4099
     public static function get_web_odf_extension_list()
4095 4100
     {
@@ -4098,10 +4103,10 @@  discard block
 block discarded – undo
4098 4103
 
4099 4104
     /**
4100 4105
      * Set of extension allowed to use Jodconverter
4101
-     * @param $mode 'from'
4106
+     * @param string $mode 'from'
4102 4107
      *              'to'
4103 4108
      *              'all'
4104
-     * @param $format   'text'
4109
+     * @param string $format   'text'
4105 4110
      *                  'spreadsheet'
4106 4111
      *                  'presentation'
4107 4112
      *                  'drawing'
@@ -4305,7 +4310,7 @@  discard block
 block discarded – undo
4305 4310
     }
4306 4311
 
4307 4312
     /**
4308
-     * @return array
4313
+     * @return string[]
4309 4314
      */
4310 4315
     public static function get_system_folders()
4311 4316
     {
@@ -4323,7 +4328,7 @@  discard block
 block discarded – undo
4323 4328
     }
4324 4329
 
4325 4330
     /**
4326
-     * @return array
4331
+     * @return string[]
4327 4332
      */
4328 4333
     public static function getProtectedFolderFromStudent()
4329 4334
     {
@@ -4479,7 +4484,7 @@  discard block
 block discarded – undo
4479 4484
      * Requires the ffmpeg lib. In ubuntu: sudo apt-get install ffmpeg
4480 4485
      * @param string $wavFile
4481 4486
      * @param bool $removeWavFileIfSuccess
4482
-     * @return bool
4487
+     * @return string|false
4483 4488
      */
4484 4489
     public static function convertWavToMp3($wavFile, $removeWavFileIfSuccess = false)
4485 4490
     {
@@ -5055,6 +5060,8 @@  discard block
 block discarded – undo
5055 5060
      * @param string	The current folder (path inside of the "document" directory, including the prefix "/")
5056 5061
      * @param string	Group directory, if empty, prevents documents to be uploaded (because group documents cannot be uploaded in root)
5057 5062
      * @param	boolean	Whether to change the renderer (this will add a template <span> to the QuickForm object displaying the form)
5063
+     * @param string $document_id
5064
+     * @param FormValidator $form
5058 5065
 
5059 5066
      * @return string html form
5060 5067
      */
@@ -5560,9 +5567,6 @@  discard block
 block discarded – undo
5560 5567
     /**
5561 5568
      * Creates the row of edit icons for a file/folder
5562 5569
      *
5563
-     * @param string $curdirpath current path (cfr open folder)
5564
-     * @param string $type (file/folder)
5565
-     * @param string $path dbase path of file/folder
5566 5570
      * @param int $visibility (1/0)
5567 5571
      * @param int $id dbase id of the document
5568 5572
      * @return string html img tags with hyperlinks
@@ -5896,7 +5900,7 @@  discard block
 block discarded – undo
5896 5900
     /**
5897 5901
      * Gets the path translated with title of docs and folders
5898 5902
      * @param string $path the real path
5899
-     * @return the path which should be displayed
5903
+     * @return string path which should be displayed
5900 5904
      */
5901 5905
     public static function get_titles_of_path($path)
5902 5906
     {
@@ -5952,7 +5956,8 @@  discard block
 block discarded – undo
5952 5956
 
5953 5957
     /**
5954 5958
      * Checks whether the user is in shared folder
5955
-     * @return return bool Return true when user is into shared folder
5959
+     * @param integer $current_session_id
5960
+     * @return boolean bool Return true when user is into shared folder
5956 5961
      */
5957 5962
     public static function is_shared_folder($curdirpath, $current_session_id)
5958 5963
     {
@@ -5968,7 +5973,7 @@  discard block
 block discarded – undo
5968 5973
 
5969 5974
     /**
5970 5975
      * Checks whether the user is into any user shared folder
5971
-     * @return return bool Return true when user is in any user shared folder
5976
+     * @return boolean bool Return true when user is in any user shared folder
5972 5977
      */
5973 5978
     public static function is_any_user_shared_folder($path, $current_session_id)
5974 5979
     {
@@ -6182,7 +6187,7 @@  discard block
 block discarded – undo
6182 6187
      * @param int $id
6183 6188
      * @param array $courseInfo
6184 6189
      * @param int $sessionId
6185
-     * @return bool
6190
+     * @return boolean|null
6186 6191
      */
6187 6192
     public static function downloadDeletedDocument($id, $courseInfo, $sessionId)
6188 6193
     {
@@ -6201,7 +6206,7 @@  discard block
 block discarded – undo
6201 6206
      * @param array $courseInfo
6202 6207
      * @param int $sessionId
6203 6208
      *
6204
-     * @return bool
6209
+     * @return false|null
6205 6210
      */
6206 6211
     public static function downloadAllDeletedDocument($courseInfo, $sessionId)
6207 6212
     {
@@ -6240,7 +6245,7 @@  discard block
 block discarded – undo
6240 6245
      * @param array $courseInfo
6241 6246
      * @param int $sessionId
6242 6247
      *
6243
-     * @return bool
6248
+     * @return false|null
6244 6249
      */
6245 6250
     public static function deleteDocumentsFromSession($courseInfo, $sessionId)
6246 6251
     {
Please login to merge, or discard this patch.
main/inc/lib/internationalization.lib.php 1 patch
Doc Comments   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -422,6 +422,7 @@  discard block
 block discarded – undo
422 422
  * If null, the timezone will be determined based on user preference,
423 423
  * or timezone chosen by the admin for the platform.
424 424
  * @param string The timezone to be converted from. If null, UTC will be assumed.
425
+ * @param string $to_timezone
425 426
  * @return string The converted time formatted as Y-m-d H:i:s
426 427
  *
427 428
  * @author Guillaume Viguier <[email protected]>
@@ -670,6 +671,7 @@  discard block
 block discarded – undo
670 671
  * @param mixed The time to be converted
671 672
  * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG)
672 673
  * @param string Timezone to be converted from. If null, UTC will be assumed.
674
+ * @param string $from_timezone
673 675
  * @return string Converted and localized date
674 676
  *
675 677
  * @author Guillaume Viguier <[email protected]>
@@ -739,7 +741,7 @@  discard block
 block discarded – undo
739 741
  * @param int|string $format (optional)	The person name format. It may be a pattern-string (for example '%t %l, %f' or '%T %F %L', ...) or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER.
740 742
  * @param string $language (optional)	The language id. If it is omitted, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only.
741 743
  * @param string $encoding (optional)	The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
742
- * @return bool							The result is sort of full name of the person.
744
+ * @return string							The result is sort of full name of the person.
743 745
  * Sample results:
744 746
  * Peter Ustinoff or Dr. Peter Ustinoff     - the Western order
745 747
  * Ustinoff Peter or Dr. Ustinoff Peter     - the Eastern order
@@ -1058,8 +1060,8 @@  discard block
 block discarded – undo
1058 1060
 
1059 1061
 /**
1060 1062
  * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value.
1061
- * @param mixed $search					String or array of strings to be found.
1062
- * @param mixed $replace				String or array of strings used for replacement.
1063
+ * @param string $search					String or array of strings to be found.
1064
+ * @param string $replace				String or array of strings used for replacement.
1063 1065
  * @param mixed $subject				String or array of strings being searched.
1064 1066
  * @param int $count (optional)			The number of matched and replaced needles will be returned in count, which is passed by reference.
1065 1067
  * @param string $encoding (optional)	The used internally by this function character encoding.
@@ -1122,10 +1124,10 @@  discard block
 block discarded – undo
1122 1124
 /**
1123 1125
  * Finds first occurrence of a string within another, case insensitive.
1124 1126
  * @param string $haystack					The string from which to get the first occurrence.
1125
- * @param mixed $needle						The string to be found.
1127
+ * @param string $needle						The string to be found.
1126 1128
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1127 1129
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1128
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1130
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1129 1131
  * Notes:
1130 1132
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1131 1133
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1181,7 +1183,7 @@  discard block
 block discarded – undo
1181 1183
  * @param mixed $needle						The string which first character is to be found.
1182 1184
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1183 1185
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1184
- * @return mixed							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1186
+ * @return false|string							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1185 1187
  * Notes:
1186 1188
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1187 1189
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence.
@@ -1248,7 +1250,7 @@  discard block
 block discarded – undo
1248 1250
  * @param mixed $needle						The string to be found.
1249 1251
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1250 1252
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1251
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1253
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1252 1254
  * Notes:
1253 1255
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1254 1256
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1429,8 +1431,8 @@  discard block
 block discarded – undo
1429 1431
 
1430 1432
 /**
1431 1433
  * Performs a regular expression search and replace, UTF-8 aware when it is applicable.
1432
- * @param string|array $pattern			The pattern to search for. It can be either a string or an array with strings.
1433
- * @param string|array $replacement		The string or an array with strings to replace.
1434
+ * @param string $pattern			The pattern to search for. It can be either a string or an array with strings.
1435
+ * @param string $replacement		The string or an array with strings to replace.
1434 1436
  * @param string|array $subject			The string or an array with strings to search and replace.
1435 1437
  * @param int $limit					The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit).
1436 1438
  * @param int &$count					If specified, this variable will be filled with the number of replacements done.
@@ -1578,7 +1580,7 @@  discard block
 block discarded – undo
1578 1580
 
1579 1581
 /**
1580 1582
  * This function checks whether two $encoding are equal (same, equvalent).
1581
- * @param string|array $encoding1		The first encoding
1583
+ * @param string $encoding1		The first encoding
1582 1584
  * @param string|array $encoding2		The second encoding
1583 1585
  * @param bool $strict					When this parameter is TRUE the comparison ignores aliases of encodings.
1584 1586
  * When the parameter is FALSE, aliases are taken into account.
@@ -1682,6 +1684,7 @@  discard block
 block discarded – undo
1682 1684
 /**
1683 1685
  * Checks a string for UTF-8 validity.
1684 1686
  *
1687
+ * @param string $string
1685 1688
  */
1686 1689
 function api_is_valid_utf8(&$string)
1687 1690
 {
@@ -1824,7 +1827,7 @@  discard block
 block discarded – undo
1824 1827
 /**
1825 1828
  * Replaces non-valid formats for person names with the default (English) format.
1826 1829
  * @param string $format	The input format to be verified.
1827
- * @return bool				Returns the same format if is is valid, otherwise returns a valid English format.
1830
+ * @return string				Returns the same format if is is valid, otherwise returns a valid English format.
1828 1831
  */
1829 1832
 function _api_validate_person_name_format($format) {
1830 1833
     if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) {
@@ -1951,6 +1954,9 @@  discard block
 block discarded – undo
1951 1954
 
1952 1955
 // This function checks whether the function _api_convert_encoding() (the php-
1953 1956
 // implementation) is able to convert from/to a given encoding.
1957
+/**
1958
+ * @param string $encoding
1959
+ */
1954 1960
 function _api_convert_encoding_supports($encoding) {
1955 1961
     static $supports = array();
1956 1962
     if (!isset($supports[$encoding])) {
@@ -1961,7 +1967,7 @@  discard block
 block discarded – undo
1961 1967
 
1962 1968
 /**
1963 1969
  * Given a date object, return a human or ISO format, with or without h:m:s
1964
- * @param object $date The Date object
1970
+ * @param DateTime $date The Date object
1965 1971
  * @param bool $showTime Whether to show the time and date (true) or only the date (false)
1966 1972
  * @param bool $humanForm Whether to show day-month-year (true) or year-month-day (false)
1967 1973
  * @return string Formatted date
Please login to merge, or discard this patch.
main/inc/lib/userportal.lib.php 1 patch
Doc Comments   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -682,6 +682,7 @@  discard block
 block discarded – undo
682 682
     * retrieves all the courses that the user has already subscribed to
683 683
     * @author Patrick Cool <[email protected]>, Ghent University, Belgium
684 684
     * @param int $user_id: the id of the user
685
+    * @param integer $user_id
685 686
     * @return array an array containing all the information of the courses of the given user
686 687
     */
687 688
     public function get_courses_of_user($user_id)
@@ -732,8 +733,8 @@  discard block
 block discarded – undo
732 733
 
733 734
     /**
734 735
      * @todo use the template system
735
-     * @param $title
736
-     * @param $content
736
+     * @param string|null $title
737
+     * @param string $content
737 738
      * @param string $id
738 739
      * @param array $params
739 740
      * @param string $idAccordion
@@ -1704,8 +1705,8 @@  discard block
 block discarded – undo
1704 1705
 
1705 1706
     /**
1706 1707
      * Return HTML code for personal user course category
1707
-     * @param $id
1708
-     * @param $title
1708
+     * @param integer $id
1709
+     * @param string $title
1709 1710
      * @return string
1710 1711
      */
1711 1712
     private static function getHtmlForUserCategory($id, $title)
@@ -1726,7 +1727,7 @@  discard block
 block discarded – undo
1726 1727
     /**
1727 1728
      * return HTML code for course display in session view
1728 1729
      * @param array $courseInfo
1729
-     * @param $userCategoryId
1730
+     * @param integer $userCategoryId
1730 1731
      * @param bool $displayButton
1731 1732
      * @param $loadDirs
1732 1733
      * @return string
Please login to merge, or discard this patch.
main/lp/learnpathItem.class.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1869,7 +1869,7 @@  discard block
 block discarded – undo
1869 1869
 
1870 1870
     /**
1871 1871
      * Get the extra terms (tags) that identify this item
1872
-     * @return mixed
1872
+     * @return string
1873 1873
      */
1874 1874
     public function get_terms()
1875 1875
     {
@@ -2069,7 +2069,7 @@  discard block
 block discarded – undo
2069 2069
 
2070 2070
     /**
2071 2071
      * Opens/launches the item. Initialises runtime values.
2072
-     * @return    boolean    True on success, false on failure.
2072
+     * @return    boolean|null    True on success, false on failure.
2073 2073
      */
2074 2074
     public function open($allow_new_attempt = false)
2075 2075
     {
@@ -3504,7 +3504,7 @@  discard block
 block discarded – undo
3504 3504
 
3505 3505
     /**
3506 3506
      * Checks if the current status is part of the list of status given
3507
-     * @param  array  $list  An array of status to check for.
3507
+     * @param  string[]  $list  An array of status to check for.
3508 3508
      * If the current status is one of the strings, return true
3509 3509
      *
3510 3510
      * @return boolean True if the status was one of the given strings,
@@ -3681,7 +3681,7 @@  discard block
 block discarded – undo
3681 3681
     /**
3682 3682
      * Write objectives to DB. This method is separate from write_to_db() because otherwise
3683 3683
      * objectives are lost as a side effect to AJAX and session concurrent access
3684
-     * @return    boolean        True or false on error
3684
+     * @return    boolean|null        True or false on error
3685 3685
      */
3686 3686
     public function write_objectives_to_db()
3687 3687
     {
@@ -4322,7 +4322,7 @@  discard block
 block discarded – undo
4322 4322
      * Removes the relation between the current item and an audio file. The file
4323 4323
      * is only removed from the lp_item table, but remains in the document table
4324 4324
      * and directory
4325
-     * @return bool
4325
+     * @return false|null
4326 4326
      */
4327 4327
     public function remove_audio()
4328 4328
     {
Please login to merge, or discard this patch.
main/work/work.lib.php 1 patch
Doc Comments   +13 added lines, -11 removed lines patch added patch discarded remove patch
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
  * @author Bert Vanderkimpen
697 697
  * @author Yannick Warnier <[email protected]> Adaptation for work tool
698 698
  * @param   string $base_work_dir Base work dir (.../work)
699
- * @param   string $desiredDirName complete path of the desired name
699
+ * @param   string $desired_dir_name complete path of the desired name
700 700
  *
701 701
  * @return  string actual directory name if it succeeds, boolean false otherwise
702 702
  */
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 /**
719 719
  * Delete a work-tool directory
720 720
  * @param   int  $id work directory id to delete
721
- * @return  integer -1 on error
721
+ * @return  boolean|null -1 on error
722 722
  */
723 723
 function deleteDirWork($id)
724 724
 {
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
  * Update the url of a dir in the student_publication table
862 862
  * @param  array $work_data work original data
863 863
  * @param  string $newPath Example: "folder1"
864
- * @return bool
864
+ * @return boolean|null
865 865
  */
866 866
 function updateDirName($work_data, $newPath)
867 867
 {
@@ -922,6 +922,7 @@  discard block
 block discarded – undo
922 922
 /**
923 923
  * Transform an all directory structure (only directories) in an array
924 924
  * @param   string path of the directory
925
+ * @param string $directory
925 926
  * @return  array the directory structure into an array
926 927
  * @author  Julio Montoya Dokeos
927 928
  * @version April 2008
@@ -991,7 +992,7 @@  discard block
 block discarded – undo
991 992
  * @param   string the path of the directory
992 993
  * @param   boolean true if we want the total quantity of files
993 994
  * include in others child directories, false only  files in the directory
994
- * @return  array the first element is an integer with the number of files
995
+ * @return  integer[] the first element is an integer with the number of files
995 996
  * in the folder, the second element is the number of directories
996 997
  * @author  Julio Montoya
997 998
  * @version April 2008
@@ -2724,7 +2725,7 @@  discard block
 block discarded – undo
2724 2725
  * @param int $userId
2725 2726
  * @param int $workId
2726 2727
  * @param int $courseId
2727
- * @return bool
2728
+ * @return boolean|null
2728 2729
  */
2729 2730
 function allowOnlySubscribedUser($userId, $workId, $courseId)
2730 2731
 {
@@ -2998,6 +2999,7 @@  discard block
 block discarded – undo
2998 2999
  * @param int $parentId
2999 3000
  * @param array $courseInfo
3000 3001
  * @param int $sessionId
3002
+ * @param integer $userId
3001 3003
  * @return int
3002 3004
  */
3003 3005
 function getLastWorkStudentFromParentByUser(
@@ -4140,7 +4142,7 @@  discard block
 block discarded – undo
4140 4142
 }
4141 4143
 
4142 4144
 /**
4143
- * @return array
4145
+ * @return string[]
4144 4146
  */
4145 4147
 function getUploadDocumentType()
4146 4148
 {
@@ -4513,7 +4515,7 @@  discard block
 block discarded – undo
4513 4515
  * @param int Session ID
4514 4516
  * @param $correction
4515 4517
  *
4516
- * @return array|bool
4518
+ * @return boolean
4517 4519
  */
4518 4520
 function getFileContents($id, $course_info, $sessionId = 0, $correction = false)
4519 4521
 {
@@ -4631,7 +4633,7 @@  discard block
 block discarded – undo
4631 4633
  * @param int $userId
4632 4634
  * @param array $courseInfo
4633 4635
  * @param string $format
4634
- * @return bool
4636
+ * @return false|null
4635 4637
  */
4636 4638
 function exportAllWork($userId, $courseInfo, $format = 'pdf')
4637 4639
 {
@@ -4677,7 +4679,7 @@  discard block
 block discarded – undo
4677 4679
  * @param array $courseInfo
4678 4680
  * @param int $sessionId
4679 4681
  * @param string $format
4680
- * @return bool
4682
+ * @return false|null
4681 4683
  */
4682 4684
 function exportAllStudentWorkFromPublication(
4683 4685
     $workId,
@@ -4815,7 +4817,7 @@  discard block
 block discarded – undo
4815 4817
  * Downloads all user files per user
4816 4818
  * @param int $userId
4817 4819
  * @param array $courseInfo
4818
- * @return bool
4820
+ * @return false|null
4819 4821
  */
4820 4822
 function downloadAllFilesPerUser($userId, $courseInfo)
4821 4823
 {
@@ -4929,7 +4931,7 @@  discard block
 block discarded – undo
4929 4931
 /**
4930 4932
  * @param array $courseInfo
4931 4933
  * @param int $workId
4932
- * @return bool
4934
+ * @return boolean|null
4933 4935
  */
4934 4936
 function protectWork($courseInfo, $workId)
4935 4937
 {
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/Session.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
     }
373 373
 
374 374
     /**
375
-     * @param $courses
375
+     * @param ArrayCollection $courses
376 376
      */
377 377
     public function setCourses($courses)
378 378
     {
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
      * Set description
515 515
      *
516 516
      * @param string $description
517
-     * @return Groups
517
+     * @return Session
518 518
      */
519 519
     public function setDescription($description)
520 520
     {
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
     }
848 848
 
849 849
     /**
850
-     * @return array
850
+     * @return string[]
851 851
      */
852 852
     public static function getStatusList()
853 853
     {
Please login to merge, or discard this patch.
src/Chamilo/PageBundle/Entity/User.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
     /**
908 908
      * Get pictureUri
909 909
      *
910
-     * @return Media
910
+     * @return string
911 911
      */
912 912
     public function getPictureUri()
913 913
     {
@@ -1284,7 +1284,7 @@  discard block
 block discarded – undo
1284 1284
     }
1285 1285
 
1286 1286
     /**
1287
-     * @return Media
1287
+     * @return string
1288 1288
      */
1289 1289
     public function getAvatar()
1290 1290
     {
@@ -2051,7 +2051,7 @@  discard block
 block discarded – undo
2051 2051
       /**
2052 2052
      * Returns the user roles
2053 2053
      *
2054
-     * @return array The roles
2054
+     * @return string[] The roles
2055 2055
      */
2056 2056
     public function getRoles()
2057 2057
     {
Please login to merge, or discard this patch.
src/Chamilo/UserBundle/Entity/User.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
     /**
996 996
      * Get pictureUri
997 997
      *
998
-     * @return Media
998
+     * @return string
999 999
      */
1000 1000
     public function getPictureUri()
1001 1001
     {
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
     }
1304 1304
 
1305 1305
     /**
1306
-     * @return Media
1306
+     * @return string
1307 1307
      */
1308 1308
     public function getAvatar()
1309 1309
     {
@@ -2078,7 +2078,7 @@  discard block
 block discarded – undo
2078 2078
       /**
2079 2079
      * Returns the user roles
2080 2080
      *
2081
-     * @return array The roles
2081
+     * @return string[] The roles
2082 2082
      */
2083 2083
     public function getRoles()
2084 2084
     {
@@ -2403,7 +2403,7 @@  discard block
 block discarded – undo
2403 2403
     /**
2404 2404
      * Check if the user has the skill
2405 2405
      * @param Skill $skill The skill
2406
-     * @return boolean
2406
+     * @return boolean|null
2407 2407
      */
2408 2408
     public function hasSkill(Skill $skill)
2409 2409
     {
Please login to merge, or discard this patch.
main/lp/learnpath.class.php 1 patch
Doc Comments   +25 added lines, -22 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @param   string $course Course code
88 88
      * @param   integer $lp_id
89 89
      * @param   integer $user_id
90
-     * @return  mixed True on success, false on error
90
+     * @return  boolean True on success, false on error
91 91
      */
92 92
     public function __construct($course, $lp_id, $user_id)
93 93
     {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
      * @param int $max_time_allowed
492 492
      * @param int $userId
493 493
      *
494
-     * @return int
494
+     * @return false|string
495 495
      */
496 496
     public function add_item(
497 497
         $parent,
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
      * @param	array $courseInfo
1044 1044
      * @param	integer	Learnpath ID
1045 1045
      * @param	string	Whether to delete data or keep it (default: 'keep', others: 'remove')
1046
-     * @return	boolean	True on success, false on failure (might change that to return number of elements deleted)
1046
+     * @return	false|null	True on success, false on failure (might change that to return number of elements deleted)
1047 1047
      */
1048 1048
     public function delete($courseInfo = null, $id = null, $delete = 'keep')
1049 1049
     {
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
      * @param	integer	$id Elem ID (0 if first)
1183 1183
      * @param	integer	$remove Whether to remove the resource/data from the
1184 1184
      * system or leave it (default: 'keep', others 'remove')
1185
-     * @return	integer	Number of elements moved
1185
+     * @return	false|null	Number of elements moved
1186 1186
      * @todo implement resource removal
1187 1187
      */
1188 1188
     public function delete_item($id, $remove = 'keep')
@@ -1264,7 +1264,7 @@  discard block
 block discarded – undo
1264 1264
      * @param   array   $audio The array resulting of the $_FILES[mp3] element
1265 1265
      * @param   int     $max_time_allowed
1266 1266
      * @param   string  $url
1267
-     * @return  boolean True on success, false on error
1267
+     * @return  false|null True on success, false on error
1268 1268
      */
1269 1269
     public function edit_item(
1270 1270
         $id,
@@ -1783,7 +1783,7 @@  discard block
 block discarded – undo
1783 1783
 
1784 1784
     /**
1785 1785
      * Gets the first element URL.
1786
-     * @return	string	URL to load into the viewer
1786
+     * @return	false|null	URL to load into the viewer
1787 1787
      */
1788 1788
     public function first()
1789 1789
     {
@@ -2297,6 +2297,7 @@  discard block
 block discarded – undo
2297 2297
      * @param int $student_id
2298 2298
      * @param string Course code (optional)
2299 2299
      * @param int $sessionId
2300
+     * @param string $courseCode
2300 2301
      * @return	bool
2301 2302
      */
2302 2303
     public static function is_lp_visible_for_student(
@@ -2594,7 +2595,7 @@  discard block
 block discarded – undo
2594 2595
 
2595 2596
     /**
2596 2597
      * Gets the learnpath session id
2597
-     * @return	string	Learnpath theme
2598
+     * @return	integer	Learnpath theme
2598 2599
      */
2599 2600
     public function get_lp_session_id()
2600 2601
     {
@@ -2627,7 +2628,7 @@  discard block
 block discarded – undo
2627 2628
     /**
2628 2629
      * @param string $size
2629 2630
      * @param string $path_type
2630
-     * @return bool|string
2631
+     * @return string|false
2631 2632
      */
2632 2633
     public function get_preview_image_path($size = null, $path_type = 'web')
2633 2634
     {
@@ -2773,6 +2774,8 @@  discard block
 block discarded – undo
2773 2774
      * Returns the XML DOM document's node
2774 2775
      * @param	resource	Reference to a list of objects to search for the given ITEM_*
2775 2776
      * @param	string		The identifier to look for
2777
+     * @param DOMNodeList $children
2778
+     * @param string $id
2776 2779
      * @return	mixed		The reference to the element found with that identifier. False if not found
2777 2780
      */
2778 2781
     public function get_scorm_xml_node(& $children, $id)
@@ -3020,7 +3023,7 @@  discard block
 block discarded – undo
3020 3023
     /**
3021 3024
      * Generate and return the table of contents for this learnpath. The (flat) table returned can be
3022 3025
      * used by get_html_toc() to be ready to display
3023
-     * @return	array	TOC as a table with 4 elements per row: title, link, status and level
3026
+     * @return	boolean	TOC as a table with 4 elements per row: title, link, status and level
3024 3027
      */
3025 3028
     public function get_toc()
3026 3029
     {
@@ -3156,7 +3159,7 @@  discard block
 block discarded – undo
3156 3159
     }
3157 3160
 
3158 3161
     /**
3159
-     * @return array
3162
+     * @return string[]
3160 3163
      */
3161 3164
     public static function getChapterTypes()
3162 3165
     {
@@ -4062,7 +4065,7 @@  discard block
 block discarded – undo
4062 4065
      * Open a resource = initialise all local variables relative to this resource. Depending on the child
4063 4066
      * class, this might be redefined to allow several behaviours depending on the document type.
4064 4067
      * @param integer Resource ID
4065
-     * @return boolean True on success, false otherwise
4068
+     * @return boolean|null True on success, false otherwise
4066 4069
      */
4067 4070
     public function open($id)
4068 4071
     {
@@ -4191,7 +4194,7 @@  discard block
 block discarded – undo
4191 4194
      * Can be used as abstract
4192 4195
      * @param	integer	$lp_id Learnpath id
4193 4196
      * @param	string	$set_visibility New visibility (v/i - visible/invisible)
4194
-     * @return bool
4197
+     * @return false|null
4195 4198
      */
4196 4199
     public static function toggle_publish($lp_id, $set_visibility = 'v')
4197 4200
     {
@@ -4276,7 +4279,7 @@  discard block
 block discarded – undo
4276 4279
      * Make sure the results are saved with anoter method. This method should probably be
4277 4280
      * redefined in children classes.
4278 4281
      * To use a similar method  statically, use the create_new_attempt() method
4279
-     * @return string URL to load in the viewer
4282
+     * @return boolean URL to load in the viewer
4280 4283
      */
4281 4284
     public function restart()
4282 4285
     {
@@ -4354,6 +4357,7 @@  discard block
 block discarded – undo
4354 4357
      * Saves the given item
4355 4358
      * @param	integer	$item_id. Optional (will take from $_REQUEST if null)
4356 4359
      * @param	boolean	$from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true
4360
+     * @param integer $item_id
4357 4361
      * @return	boolean
4358 4362
      */
4359 4363
     public function save_item($item_id = null, $from_outside = true)
@@ -4851,7 +4855,7 @@  discard block
 block discarded – undo
4851 4855
 
4852 4856
     /**
4853 4857
      * Sets use_max_score
4854
-     * @param   string  $use_max_score Optional string giving the new location of this learnpath
4858
+     * @param   integer  $use_max_score Optional string giving the new location of this learnpath
4855 4859
      * @return  boolean True on success / False on error
4856 4860
      */
4857 4861
     public function set_use_max_score($use_max_score = 1)
@@ -5254,6 +5258,7 @@  discard block
 block discarded – undo
5254 5258
      * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags
5255 5259
      *
5256 5260
      * @param string 'seriousgame', 'single' or 'multiple'
5261
+     * @param string $mode
5257 5262
      * @return boolean
5258 5263
      * @author ndiechburg <[email protected]>
5259 5264
      **/
@@ -5296,7 +5301,7 @@  discard block
 block discarded – undo
5296 5301
     /**
5297 5302
      * Switch between multiple attempt, single attempt or serious_game mode (only for scorm)
5298 5303
      *
5299
-     * @return boolean
5304
+     * @return boolean|null
5300 5305
      * @author ndiechburg <[email protected]>
5301 5306
      **/
5302 5307
     public function switch_attempt_mode()
@@ -5487,7 +5492,6 @@  discard block
 block discarded – undo
5487 5492
     /**
5488 5493
      * Function that creates a html list of learning path items so that we can add audio files to them
5489 5494
      * @author Kevin Van Den Haute
5490
-     * @param int $lp_id
5491 5495
      * @return string
5492 5496
      */
5493 5497
     public function overview()
@@ -6501,7 +6505,7 @@  discard block
 block discarded – undo
6501 6505
     /**
6502 6506
      * Function that displays a list with al the resources that
6503 6507
      * could be added to the learning path
6504
-     * @return string
6508
+     * @return boolean
6505 6509
      */
6506 6510
     public function display_resources()
6507 6511
     {
@@ -10046,7 +10050,7 @@  discard block
 block discarded – undo
10046 10050
 
10047 10051
     /**
10048 10052
      * @param int $lp_id
10049
-     * @return bool
10053
+     * @return false|null
10050 10054
      */
10051 10055
     public function scorm_export_to_pdf($lp_id)
10052 10056
     {
@@ -10581,7 +10585,7 @@  discard block
 block discarded – undo
10581 10585
 
10582 10586
     /**
10583 10587
      * @param int $itemId
10584
-     * @return learnpathItem|false
10588
+     * @return string
10585 10589
      */
10586 10590
     public function getItem($itemId)
10587 10591
     {
@@ -10631,7 +10635,6 @@  discard block
 block discarded – undo
10631 10635
     /**
10632 10636
      * Set whether this is a learning path with the possibility to subscribe
10633 10637
      * users or not
10634
-     * @param int $subscribeUsers (0 = false, 1 = true)
10635 10638
      */
10636 10639
     public function setSubscribeUsers($value)
10637 10640
     {
@@ -10756,7 +10759,7 @@  discard block
 block discarded – undo
10756 10759
 
10757 10760
     /**
10758 10761
      * Get the item of exercise type (evaluation type)
10759
-     * @return array The final evaluation. Otherwise return false
10762
+     * @return integer The final evaluation. Otherwise return false
10760 10763
      */
10761 10764
     public function getFinalEvaluationItem()
10762 10765
     {
@@ -10980,7 +10983,7 @@  discard block
 block discarded – undo
10980 10983
     /**
10981 10984
      * Create a forum for this learning path
10982 10985
      * @param type $forumCategoryId
10983
-     * @return int The forum ID if was created. Otherwise return false
10986
+     * @return false|string The forum ID if was created. Otherwise return false
10984 10987
      */
10985 10988
     public function createForum($forumCategoryId)
10986 10989
     {
Please login to merge, or discard this patch.