Completed
Push — master ( 7d92ba...201c1b )
by Dwain
05:05
created
includes/class-sensei-utils.php 1 patch
Doc Comments   +32 added lines, -29 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @access public
30 30
 	 * @since  1.0.2
31 31
 	 * @static
32
-	 * @return void
32
+	 * @return boolean
33 33
 	 */
34 34
 	public static function sensei_is_woocommerce_present () {
35 35
 		if ( class_exists( 'Woocommerce' ) ) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
      * @param  string $customer_email
350 350
      * @param  int $user_id
351 351
      * @param  int $product_id
352
-     * @return bool
352
+     * @return boolean|null
353 353
      */
354 354
     public static function sensei_customer_bought_product ( $customer_email, $user_id, $product_id ) {
355 355
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	/**
405 405
 	 * Save quiz answers submitted by users
406 406
 	 * @param  boolean $submitted User's quiz answers
407
-	 * @return boolean            Whether the answers were saved or not
407
+	 * @return null|false            Whether the answers were saved or not
408 408
 	 */
409 409
 	public static function sensei_save_quiz_answers( $submitted = false, $user_id = 0 ) {
410 410
 		if( intval( $user_id ) == 0 ) {
@@ -467,6 +467,9 @@  discard block
 block discarded – undo
467 467
 
468 468
 	} // End sensei_save_quiz_answers()
469 469
 
470
+	/**
471
+	 * @return string
472
+	 */
470 473
 	public static function upload_file( $file = array() ) {
471 474
 
472 475
 		require_once( ABSPATH . 'wp-admin/includes/admin.php' );
@@ -731,8 +734,8 @@  discard block
 block discarded – undo
731 734
 	/**
732 735
 	 * Remove user from lesson, deleting all data from the corresponding quiz
733 736
 	 *
734
-	 * @param type $lesson_id
735
-	 * @param type $user_id
737
+	 * @param integer $lesson_id
738
+	 * @param integer $user_id
736 739
 	 * @return boolean
737 740
 	 */
738 741
 	public static function sensei_remove_user_from_lesson( $lesson_id = 0, $user_id = 0, $from_course = false ) {
@@ -769,8 +772,8 @@  discard block
 block discarded – undo
769 772
 	/**
770 773
 	 * Remove a user from a course, deleting all activities across all lessons
771 774
 	 *
772
-	 * @param type $course_id
773
-	 * @param type $user_id
775
+	 * @param integer $course_id
776
+	 * @param integer $user_id
774 777
 	 * @return boolean
775 778
 	 */
776 779
 	public static function sensei_remove_user_from_course( $course_id = 0, $user_id = 0 ) {
@@ -835,7 +838,7 @@  discard block
 block discarded – undo
835 838
 	/**
836 839
 	 * Returns the user_grade for a specific question and user, or sensei_user_answer entry
837 840
 	 *
838
-	 * @param mixed $question
841
+	 * @param integer $question
839 842
 	 * @param int $user_id
840 843
 	 * @return string
841 844
 	 */
@@ -863,7 +866,7 @@  discard block
 block discarded – undo
863 866
 	 * Returns the answer_notes for a specific question and user, or sensei_user_answer entry
864 867
 	 *
865 868
      * @deprecated since 1.7.5 use Sensei()->quiz->get_user_question_feedback instead
866
-	 * @param mixed $question
869
+	 * @param integer $question
867 870
 	 * @param int $user_id
868 871
 	 * @return string
869 872
 	 */
@@ -975,7 +978,7 @@  discard block
 block discarded – undo
975 978
 	 * sort_array_by_key sorts array by key
976 979
 	 * @since  1.3.0
977 980
 	 * @param  $array by ref
978
-	 * @param  $key string column name in array
981
+	 * @param  string $key string column name in array
979 982
 	 * @return void
980 983
 	 */
981 984
 	public static function sort_array_by_key( $array, $key ) {
@@ -1022,7 +1025,7 @@  discard block
 block discarded – undo
1022 1025
 	/**
1023 1026
 	 * Get pass mark for course
1024 1027
 	 * @param  integer $course_id ID of course
1025
-	 * @return integer            Pass mark for course
1028
+	 * @return double            Pass mark for course
1026 1029
 	 */
1027 1030
 	public static function sensei_course_pass_grade( $course_id = 0 ) {
1028 1031
 
@@ -1063,7 +1066,7 @@  discard block
 block discarded – undo
1063 1066
 	 * Get user total grade for course
1064 1067
 	 * @param  integer $course_id ID of course
1065 1068
 	 * @param  integer $user_id   ID of user
1066
-	 * @return integer            User's total grade
1069
+	 * @return double            User's total grade
1067 1070
 	 */
1068 1071
 	public static function sensei_course_user_grade( $course_id = 0, $user_id = 0 ) {
1069 1072
 
@@ -1355,9 +1358,9 @@  discard block
 block discarded – undo
1355 1358
 	 * Check if a user has started a course or not
1356 1359
 	 *
1357 1360
 	 * @since  1.7.0
1358
-	 * @param type $course_id
1359
-	 * @param type $user_id
1360
-	 * @return mixed false or comment_ID
1361
+	 * @param integer $course_id
1362
+	 * @param integer $user_id
1363
+	 * @return false|string false or comment_ID
1361 1364
 	 */
1362 1365
 	public static function user_started_course( $course_id = 0, $user_id = 0 ) {
1363 1366
 
@@ -1384,7 +1387,7 @@  discard block
 block discarded – undo
1384 1387
 	 * @since  1.7.0
1385 1388
 	 * @param  integer $course_id Course ID
1386 1389
 	 * @param  integer $user_id   User ID
1387
-	 * @return int
1390
+	 * @return null|false
1388 1391
 	 */
1389 1392
 	public static function user_complete_course( $course_id = 0, $user_id = 0 ) {
1390 1393
 		global  $wp_version;
@@ -1491,7 +1494,7 @@  discard block
 block discarded – undo
1491 1494
 	/**
1492 1495
 	 * Check if a user has completed a course or not
1493 1496
 	 *
1494
-	 * @param mixed $course course_id or sensei_course_status entry
1497
+	 * @param integer $course course_id or sensei_course_status entry
1495 1498
 	 * @param int $user_id
1496 1499
 	 * @return boolean
1497 1500
 	 */
@@ -1530,9 +1533,9 @@  discard block
 block discarded – undo
1530 1533
 	 * Check if a user has started a lesson or not
1531 1534
 	 *
1532 1535
 	 * @since  1.7.0
1533
-	 * @param type $lesson_id
1534
-	 * @param type $user_id
1535
-	 * @return mixed false or comment_ID
1536
+	 * @param integer $lesson_id
1537
+	 * @param integer $user_id
1538
+	 * @return string|false false or comment_ID
1536 1539
 	 */
1537 1540
 	public static function user_started_lesson( $lesson_id = 0, $user_id = 0 ) {
1538 1541
 
@@ -1553,7 +1556,7 @@  discard block
 block discarded – undo
1553 1556
 	 * Check if a user has completed a lesson or not
1554 1557
 	 *
1555 1558
      * @uses  Sensei()
1556
-	 * @param mixed $lesson lesson_id or sensei_lesson_status entry
1559
+	 * @param integer $lesson lesson_id or sensei_lesson_status entry
1557 1560
 	 * @param int $user_id
1558 1561
 	 * @return boolean
1559 1562
 	 */
@@ -1626,9 +1629,9 @@  discard block
 block discarded – undo
1626 1629
 	 * Returns the requested course status
1627 1630
 	 *
1628 1631
 	 * @since 1.7.0
1629
-	 * @param type $course_id
1630
-	 * @param type $user_id
1631
-	 * @return object
1632
+	 * @param integer $course_id
1633
+	 * @param integer $user_id
1634
+	 * @return integer
1632 1635
 	 */
1633 1636
 	public static function user_course_status( $course_id = 0, $user_id = 0 ) {
1634 1637
 
@@ -1651,7 +1654,7 @@  discard block
 block discarded – undo
1651 1654
 	 * @since 1.7.0
1652 1655
 	 * @param int $lesson_id
1653 1656
 	 * @param int $user_id
1654
-	 * @return object | bool
1657
+	 * @return integer | bool
1655 1658
 	 */
1656 1659
 	public static function user_lesson_status( $lesson_id = 0, $user_id = 0 ) {
1657 1660
 
@@ -1710,11 +1713,11 @@  discard block
 block discarded – undo
1710 1713
 	 * @since  1.7.0
1711 1714
      *
1712 1715
 	 * @param int|string $user_id
1713
-	 * @param int|string $lesson_id
1716
+	 * @param integer $lesson_id
1714 1717
 	 * @param string $status
1715 1718
 	 * @param array $metadata
1716 1719
      *
1717
-	 * @return mixed false or comment_ID
1720
+	 * @return null|false false or comment_ID
1718 1721
 	 */
1719 1722
 	public static function update_lesson_status( $user_id, $lesson_id, $status = 'in-progress', $metadata = array() ) {
1720 1723
 		$comment_id = false;
@@ -1752,7 +1755,7 @@  discard block
 block discarded – undo
1752 1755
 	 * @param type $course_id
1753 1756
 	 * @param type $status
1754 1757
 	 * @param type $metadata
1755
-	 * @return mixed false or comment_ID
1758
+	 * @return null|false false or comment_ID
1756 1759
 	 */
1757 1760
 	public static function update_course_status( $user_id, $course_id, $status = 'in-progress', $metadata = array() ) {
1758 1761
 		$comment_id = false;
@@ -1941,7 +1944,7 @@  discard block
 block discarded – undo
1941 1944
      *
1942 1945
      * @since 1.7.4
1943 1946
      *
1944
-     * @param $data_key
1947
+     * @param string $data_key
1945 1948
      * @param $post_id
1946 1949
      * @param int $user_id
1947 1950
      *
Please login to merge, or discard this patch.
includes/class-sensei-wc.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -817,7 +817,7 @@
 block discarded – undo
817 817
      * @param  int $user_id
818 818
      * @param  int $product_id
819 819
      *
820
-     * @return bool
820
+     * @return boolean|null
821 821
      */
822 822
     public static function has_customer_bought_product ( $user_id, $product_id ){
823 823
 
Please login to merge, or discard this patch.
includes/template-functions.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,8 +143,8 @@
 block discarded – undo
143 143
 	 * sensei_check_if_product_is_in_cart function.
144 144
 	 *
145 145
 	 * @deprecated since 1.9.0
146
-	 * @param int $wc_post_id (default: 0)
147
-	 * @return void
146
+	 * @param int $wc_product_id (default: 0)
147
+	 * @return boolean
148 148
 	 */
149 149
 	function sensei_check_if_product_is_in_cart( $wc_product_id = 0 ) {
150 150
         return Sensei_WC::is_product_in_cart( $wc_product_id );
Please login to merge, or discard this patch.