Completed
Push — master ( 78b9e3...efb4fd )
by Dwain
04:49
created
includes/class-sensei-utils.php 1 patch
Doc Comments   +20 added lines, -17 removed lines patch added patch discarded remove patch
@@ -463,6 +463,9 @@  discard block
 block discarded – undo
463 463
 
464 464
 	} // End sensei_save_quiz_answers()
465 465
 
466
+	/**
467
+	 * @return string
468
+	 */
466 469
 	public static function upload_file( $file = array() ) {
467 470
 
468 471
 		require_once( ABSPATH . 'wp-admin/includes/admin.php' );
@@ -635,7 +638,7 @@  discard block
 block discarded – undo
635 638
      * @param integer $lesson_id
636 639
      * @param bool $complete
637 640
      *
638
-     * @return mixed boolean or comment_ID
641
+     * @return boolean|string boolean or comment_ID
639 642
      */
640 643
     public static function user_start_lesson(  $user_id = 0, $lesson_id = 0, $complete = false ) {
641 644
 
@@ -654,7 +657,7 @@  discard block
 block discarded – undo
654 657
 	 * @param int| string $user_id default 0
655 658
      * @param bool $complete default false
656 659
      *
657
-     * @return mixed boolean or comment_ID
660
+     * @return boolean|string boolean or comment_ID
658 661
 	 */
659 662
 	public static function sensei_start_lesson( $lesson_id = 0, $user_id = 0, $complete = false ) {
660 663
 
@@ -833,7 +836,7 @@  discard block
 block discarded – undo
833 836
 	/**
834 837
 	 * Returns the user_grade for a specific question and user, or sensei_user_answer entry
835 838
 	 *
836
-	 * @param mixed $question
839
+	 * @param integer $question
837 840
 	 * @param int $user_id
838 841
 	 * @return string
839 842
 	 */
@@ -861,7 +864,7 @@  discard block
 block discarded – undo
861 864
 	 * Returns the answer_notes for a specific question and user, or sensei_user_answer entry
862 865
 	 *
863 866
      * @deprecated since 1.7.5 use Sensei()->quiz->get_user_question_feedback instead
864
-	 * @param mixed $question
867
+	 * @param integer $question
865 868
 	 * @param int $user_id
866 869
 	 * @return string
867 870
 	 */
@@ -974,7 +977,7 @@  discard block
 block discarded – undo
974 977
 	 * sort_array_by_key sorts array by key
975 978
 	 * @since  1.3.0
976 979
 	 * @param  array $array by ref
977
-	 * @param  $key string column name in array
980
+	 * @param  string $key string column name in array
978 981
 	 * @return void
979 982
 	 */
980 983
 	public static function sort_array_by_key( $array, $key ) {
@@ -1021,7 +1024,7 @@  discard block
 block discarded – undo
1021 1024
 	/**
1022 1025
 	 * Get pass mark for course
1023 1026
 	 * @param  integer $course_id ID of course
1024
-	 * @return integer            Pass mark for course
1027
+	 * @return double            Pass mark for course
1025 1028
 	 */
1026 1029
 	public static function sensei_course_pass_grade( $course_id = 0 ) {
1027 1030
 
@@ -1062,7 +1065,7 @@  discard block
 block discarded – undo
1062 1065
 	 * Get user total grade for course
1063 1066
 	 * @param  integer $course_id ID of course
1064 1067
 	 * @param  integer $user_id   ID of user
1065
-	 * @return integer            User's total grade
1068
+	 * @return double            User's total grade
1066 1069
 	 */
1067 1070
 	public static function sensei_course_user_grade( $course_id = 0, $user_id = 0 ) {
1068 1071
 
@@ -1322,7 +1325,7 @@  discard block
 block discarded – undo
1322 1325
 	 * @since  1.4.8
1323 1326
 	 * @param  integer $user_id   User ID
1324 1327
 	 * @param  integer $course_id Course ID
1325
-	 * @return mixed boolean or comment_ID
1328
+	 * @return string|boolean boolean or comment_ID
1326 1329
 	 */
1327 1330
 	public static function user_start_course( $user_id = 0, $course_id = 0 ) {
1328 1331
 
@@ -1358,7 +1361,7 @@  discard block
 block discarded – undo
1358 1361
 	 * @since  1.7.0
1359 1362
 	 * @param int $course_id
1360 1363
 	 * @param int $user_id
1361
-	 * @return mixed false or comment_ID
1364
+	 * @return false|string false or comment_ID
1362 1365
 	 */
1363 1366
 	public static function user_started_course( $course_id = 0, $user_id = 0 ) {
1364 1367
 
@@ -1385,7 +1388,7 @@  discard block
 block discarded – undo
1385 1388
 	 * @since  1.7.0
1386 1389
 	 * @param  integer $course_id Course ID
1387 1390
 	 * @param  integer $user_id   User ID
1388
-	 * @return int
1391
+	 * @return boolean
1389 1392
 	 */
1390 1393
 	public static function user_complete_course( $course_id = 0, $user_id = 0 ) {
1391 1394
 		global  $wp_version;
@@ -1534,7 +1537,7 @@  discard block
 block discarded – undo
1534 1537
 	 * @since  1.7.0
1535 1538
 	 * @param int $lesson_id
1536 1539
 	 * @param int $user_id
1537
-	 * @return mixed false or comment_ID
1540
+	 * @return string|false false or comment_ID
1538 1541
 	 */
1539 1542
 	public static function user_started_lesson( $lesson_id = 0, $user_id = 0 ) {
1540 1543
 
@@ -1561,7 +1564,7 @@  discard block
 block discarded – undo
1561 1564
 	 * Check if a user has completed a lesson or not
1562 1565
 	 *
1563 1566
      * @uses  Sensei()
1564
-	 * @param mixed $lesson lesson_id or sensei_lesson_status entry
1567
+	 * @param integer $lesson lesson_id or sensei_lesson_status entry
1565 1568
 	 * @param int $user_id
1566 1569
 	 * @return boolean
1567 1570
 	 */
@@ -1659,7 +1662,7 @@  discard block
 block discarded – undo
1659 1662
 	 * @since 1.7.0
1660 1663
 	 * @param int $lesson_id
1661 1664
 	 * @param int $user_id
1662
-	 * @return object | bool
1665
+	 * @return integer | bool
1663 1666
 	 */
1664 1667
 	public static function user_lesson_status( $lesson_id = 0, $user_id = 0 ) {
1665 1668
 
@@ -1718,11 +1721,11 @@  discard block
 block discarded – undo
1718 1721
 	 * @since  1.7.0
1719 1722
      *
1720 1723
 	 * @param int|string $user_id
1721
-	 * @param int|string $lesson_id
1724
+	 * @param integer $lesson_id
1722 1725
 	 * @param string $status
1723 1726
 	 * @param array $metadata
1724 1727
      *
1725
-	 * @return mixed false or comment_ID
1728
+	 * @return boolean false or comment_ID
1726 1729
 	 */
1727 1730
 	public static function update_lesson_status( $user_id, $lesson_id, $status = 'in-progress', $metadata = array() ) {
1728 1731
 		$comment_id = false;
@@ -1760,7 +1763,7 @@  discard block
 block discarded – undo
1760 1763
 	 * @param int $course_id
1761 1764
 	 * @param string $status
1762 1765
 	 * @param array $metadata
1763
-	 * @return mixed false or comment_ID
1766
+	 * @return boolean false or comment_ID
1764 1767
 	 */
1765 1768
 	public static function update_course_status( $user_id, $course_id, $status = 'in-progress', $metadata = array() ) {
1766 1769
 		$comment_id = false;
@@ -1950,7 +1953,7 @@  discard block
 block discarded – undo
1950 1953
      *
1951 1954
      * @since 1.7.4
1952 1955
      *
1953
-     * @param $data_key
1956
+     * @param string $data_key
1954 1957
      * @param $post_id
1955 1958
      * @param int $user_id
1956 1959
      *
Please login to merge, or discard this patch.
includes/class-sensei-wc.php 1 patch
Doc Comments   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
      * @since   1.2.0
974 974
      * @since  1.9.0 move to class Sensei_WC
975 975
      *
976
-     * @param   WC_Order $order
976
+     * @param   integer $order
977 977
      *
978 978
      * @return  void
979 979
      */
@@ -1191,6 +1191,7 @@  discard block
 block discarded – undo
1191 1191
      * @since   1.2.0
1192 1192
      * @since   1.9.0 Move function to the Sensei_WC class
1193 1193
      * @param   integer| WC_Order $order_id order ID
1194
+     * @param integer $order_id
1194 1195
      * @return  void
1195 1196
      */
1196 1197
     public static function cancel_order ( $order_id ) {
@@ -1309,7 +1310,7 @@  discard block
 block discarded – undo
1309 1310
      * @param  int 			$course_id  (default: 0)
1310 1311
      * @param  array/Object $order_user (default: array()) Specific user's data.
1311 1312
      *
1312
-     * @return bool|int
1313
+     * @return boolean|string
1313 1314
      */
1314 1315
     public static function course_update ( $course_id = 0, $order_user = array()  ) {
1315 1316
 
@@ -1381,7 +1382,7 @@  discard block
 block discarded – undo
1381 1382
      *
1382 1383
      * @param  boolean $guest_checkout Current guest checkout setting
1383 1384
      *
1384
-     * @return boolean                 Modified guest checkout setting
1385
+     * @return string|boolean                 Modified guest checkout setting
1385 1386
      */
1386 1387
     public static function disable_guest_checkout( $guest_checkout ) {
1387 1388
 
@@ -1555,7 +1556,7 @@  discard block
 block discarded – undo
1555 1556
      * Get all the valid subscription types.
1556 1557
      *
1557 1558
      * @since 1.9.0
1558
-     * @return array
1559
+     * @return string[]
1559 1560
      */
1560 1561
     public static function get_subscription_types(){
1561 1562
 
@@ -1573,8 +1574,8 @@  discard block
 block discarded – undo
1573 1574
      *
1574 1575
      * @since 1.9.0
1575 1576
      *
1576
-     * @param $user_id
1577
-     * @param $product_id
1577
+     * @param integer $user_id
1578
+     * @param string $product_id
1578 1579
      * @param $course_id
1579 1580
      *
1580 1581
      * @return bool
@@ -1638,7 +1639,7 @@  discard block
 block discarded – undo
1638 1639
 	 * Get all the orders for a specific user and product combination
1639 1640
 	 *
1640 1641
 	 * @param int $user_id
1641
-	 * @param $product_id
1642
+	 * @param integer $product_id
1642 1643
 	 *
1643 1644
 	 * @return array $orders
1644 1645
 	 */
Please login to merge, or discard this patch.
includes/class-sensei.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
      *
826 826
      * @since 1.4.5
827 827
      * @access public
828
-     * @param mixed $image_size
828
+     * @param string $image_size
829 829
      * @return string
830 830
      */
831 831
     public function get_image_size( $image_size ) {
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
      * @since  1.0.0
1052 1052
      * @param  int 			$course_id  (default: 0)
1053 1053
      * @param  array/Object $order_user (default: array()) Specific user's data.
1054
-     * @return bool|int
1054
+     * @return boolean|string
1055 1055
      */
1056 1056
     public function woocommerce_course_update ( $course_id = 0, $order_user = array()  ) {
1057 1057
 
@@ -1070,7 +1070,7 @@  discard block
 block discarded – undo
1070 1070
      * @param   integer $wc_product_id Product ID or Variation ID
1071 1071
      * @param   string  $product_type  '' or 'variation'
1072 1072
      *
1073
-     * @return   WC_Product $wc_product_object
1073
+     * @return   integer $wc_product_object
1074 1074
      */
1075 1075
     public function sensei_get_woocommerce_product_object ( $wc_product_id = 0, $product_type = '' ) {
1076 1076
 
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
      * Disable guest checkout if a course product is in the cart
1095 1095
      * @deprecated since 1.9.0
1096 1096
      * @param  boolean $guest_checkout Current guest checkout setting
1097
-     * @return boolean                 Modified guest checkout setting
1097
+     * @return string|boolean                 Modified guest checkout setting
1098 1098
      */
1099 1099
     public function disable_guest_checkout( $guest_checkout ) {
1100 1100
 
Please login to merge, or discard this patch.