Completed
Push — master ( 201c1b...d51ce1 )
by Dwain
04:57
created
includes/class-sensei-admin.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	 *
200 200
 	 * @access public
201 201
 	 * @param mixed $slug
202
-	 * @param mixed $option
202
+	 * @param string $option
203 203
 	 * @param string $page_title (default: '')
204 204
 	 * @param string $page_content (default: '')
205 205
 	 * @param int $post_parent (default: 0)
@@ -1047,6 +1047,9 @@  discard block
 block discarded – undo
1047 1047
 		?></div><?php
1048 1048
 	}
1049 1049
 
1050
+	/**
1051
+	 * @return string
1052
+	 */
1050 1053
 	public function get_course_order() {
1051 1054
 		return get_option( 'sensei_course_order', '' );
1052 1055
 	}
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/class-sensei.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     /**
399 399
      * Disable guest checkout if a course product is in the cart
400 400
      * @param  boolean $guest_checkout Current guest checkout setting
401
-     * @return boolean                 Modified guest checkout setting
401
+     * @return string|boolean                 Modified guest checkout setting
402 402
      */
403 403
     public function disable_guest_checkout( $guest_checkout ) {
404 404
         global $woocommerce;
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
      *
585 585
      * @access public
586 586
      * @param mixed $template
587
-     * @return void
587
+     * @return string
588 588
      * @deprecated
589 589
      */
590 590
     public function template_loader ( $template = '' ) {
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
      * Check if visitors have access permission. If the "access_permission" setting is active, do a log in check.
850 850
      * @since  1.0.0
851 851
      * @access public
852
-     * @return void
852
+     * @return boolean
853 853
      */
854 854
     public function access_settings () {
855 855
 
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
      *
1236 1236
      * @since 1.4.5
1237 1237
      * @access public
1238
-     * @param mixed $image_size
1238
+     * @param string $image_size
1239 1239
      * @return string
1240 1240
      */
1241 1241
     public function get_image_size( $image_size ) {
Please login to merge, or discard this patch.
includes/class-sensei-course.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -848,7 +848,6 @@  discard block
 block discarded – undo
848 848
 	 * course_count function.
849 849
 	 *
850 850
 	 * @access public
851
-	 * @param array $exclude (default: array())
852 851
 	 * @param string $post_status (default: 'publish')
853 852
 	 * @return int
854 853
 	 */
@@ -1159,7 +1158,6 @@  discard block
 block discarded – undo
1159 1158
      *
1160 1159
 	 * @since  1.4.0
1161 1160
 	 * @param  object  $user   Queried user object
1162
-	 * @param  boolean $manage Whether the user has permission to manage the courses
1163 1161
 	 * @return string          HTML displayng course data
1164 1162
 	 */
1165 1163
 	public function load_user_courses_content( $user = false ) {
Please login to merge, or discard this patch.
includes/class-sensei-lesson.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 	 *
240 240
 	 * @access public
241 241
 	 * @param int $post_id
242
-	 * @return void
242
+	 * @return integer|null
243 243
 	 */
244 244
 	public function meta_box_save ( $post_id ) {
245 245
 
@@ -2418,7 +2418,7 @@  discard block
 block discarded – undo
2418 2418
 	 *
2419 2419
 	 * @access private
2420 2420
 	 * @param array $data (default: array())
2421
-	 * @return void
2421
+	 * @return boolean
2422 2422
 	 */
2423 2423
 	private function lesson_delete_question( $data = array() ) {
2424 2424
 
@@ -2884,7 +2884,7 @@  discard block
 block discarded – undo
2884 2884
      * @access public
2885 2885
      *
2886 2886
      * @param int $lesson_id
2887
-     * @return int|bool $course_id or bool when nothing is found.
2887
+     * @return integer $course_id or bool when nothing is found.
2888 2888
      */
2889 2889
      public function get_course_id( $lesson_id ){
2890 2890
 
Please login to merge, or discard this patch.
includes/class-sensei-utils.php 1 patch
Doc Comments   +21 added lines, -18 removed lines patch added patch discarded remove patch
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
      * @param  string $customer_email
346 346
      * @param  int $user_id
347 347
      * @param  int $product_id
348
-     * @return bool
348
+     * @return boolean|null
349 349
      */
350 350
     public static function sensei_customer_bought_product ( $customer_email, $user_id, $product_id ) {
351 351
 
@@ -464,6 +464,9 @@  discard block
 block discarded – undo
464 464
 
465 465
 	} // End sensei_save_quiz_answers()
466 466
 
467
+	/**
468
+	 * @return string
469
+	 */
467 470
 	public static function upload_file( $file = array() ) {
468 471
 
469 472
 		require_once( ABSPATH . 'wp-admin/includes/admin.php' );
@@ -636,7 +639,7 @@  discard block
 block discarded – undo
636 639
      * @param integer $lesson_id
637 640
      * @param bool $complete
638 641
      *
639
-     * @return mixed boolean or comment_ID
642
+     * @return boolean|string boolean or comment_ID
640 643
      */
641 644
     public static function user_start_lesson(  $user_id = 0, $lesson_id = 0, $complete = false ) {
642 645
 
@@ -655,7 +658,7 @@  discard block
 block discarded – undo
655 658
 	 * @param int| string $user_id default 0
656 659
      * @param bool $complete default false
657 660
      *
658
-     * @return mixed boolean or comment_ID
661
+     * @return boolean|string boolean or comment_ID
659 662
 	 */
660 663
 	public static function sensei_start_lesson( $lesson_id = 0, $user_id = 0, $complete = false ) {
661 664
 
@@ -834,7 +837,7 @@  discard block
 block discarded – undo
834 837
 	/**
835 838
 	 * Returns the user_grade for a specific question and user, or sensei_user_answer entry
836 839
 	 *
837
-	 * @param mixed $question
840
+	 * @param integer $question
838 841
 	 * @param int $user_id
839 842
 	 * @return string
840 843
 	 */
@@ -862,7 +865,7 @@  discard block
 block discarded – undo
862 865
 	 * Returns the answer_notes for a specific question and user, or sensei_user_answer entry
863 866
 	 *
864 867
      * @deprecated since 1.7.5 use Sensei()->quiz->get_user_question_feedback instead
865
-	 * @param mixed $question
868
+	 * @param integer $question
866 869
 	 * @param int $user_id
867 870
 	 * @return string
868 871
 	 */
@@ -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 $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
 
@@ -1323,7 +1326,7 @@  discard block
 block discarded – undo
1323 1326
 	 * @since  1.4.8
1324 1327
 	 * @param  integer $user_id   User ID
1325 1328
 	 * @param  integer $course_id Course ID
1326
-	 * @return mixed boolean or comment_ID
1329
+	 * @return string|boolean boolean or comment_ID
1327 1330
 	 */
1328 1331
 	public static function user_start_course( $user_id = 0, $course_id = 0 ) {
1329 1332
 
@@ -1359,7 +1362,7 @@  discard block
 block discarded – undo
1359 1362
 	 * @since  1.7.0
1360 1363
 	 * @param int $course_id
1361 1364
 	 * @param int $user_id
1362
-	 * @return mixed false or comment_ID
1365
+	 * @return false|string false or comment_ID
1363 1366
 	 */
1364 1367
 	public static function user_started_course( $course_id = 0, $user_id = 0 ) {
1365 1368
 
@@ -1386,7 +1389,7 @@  discard block
 block discarded – undo
1386 1389
 	 * @since  1.7.0
1387 1390
 	 * @param  integer $course_id Course ID
1388 1391
 	 * @param  integer $user_id   User ID
1389
-	 * @return int
1392
+	 * @return boolean
1390 1393
 	 */
1391 1394
 	public static function user_complete_course( $course_id = 0, $user_id = 0 ) {
1392 1395
 		global  $wp_version;
@@ -1535,7 +1538,7 @@  discard block
 block discarded – undo
1535 1538
 	 * @since  1.7.0
1536 1539
 	 * @param int $lesson_id
1537 1540
 	 * @param int $user_id
1538
-	 * @return mixed false or comment_ID
1541
+	 * @return string|false false or comment_ID
1539 1542
 	 */
1540 1543
 	public static function user_started_lesson( $lesson_id = 0, $user_id = 0 ) {
1541 1544
 
@@ -1562,7 +1565,7 @@  discard block
 block discarded – undo
1562 1565
 	 * Check if a user has completed a lesson or not
1563 1566
 	 *
1564 1567
      * @uses  Sensei()
1565
-	 * @param mixed $lesson lesson_id or sensei_lesson_status entry
1568
+	 * @param integer $lesson lesson_id or sensei_lesson_status entry
1566 1569
 	 * @param int $user_id
1567 1570
 	 * @return boolean
1568 1571
 	 */
@@ -1660,7 +1663,7 @@  discard block
 block discarded – undo
1660 1663
 	 * @since 1.7.0
1661 1664
 	 * @param int $lesson_id
1662 1665
 	 * @param int $user_id
1663
-	 * @return object | bool
1666
+	 * @return integer | bool
1664 1667
 	 */
1665 1668
 	public static function user_lesson_status( $lesson_id = 0, $user_id = 0 ) {
1666 1669
 
@@ -1719,11 +1722,11 @@  discard block
 block discarded – undo
1719 1722
 	 * @since  1.7.0
1720 1723
      *
1721 1724
 	 * @param int|string $user_id
1722
-	 * @param int|string $lesson_id
1725
+	 * @param integer $lesson_id
1723 1726
 	 * @param string $status
1724 1727
 	 * @param array $metadata
1725 1728
      *
1726
-	 * @return mixed false or comment_ID
1729
+	 * @return boolean false or comment_ID
1727 1730
 	 */
1728 1731
 	public static function update_lesson_status( $user_id, $lesson_id, $status = 'in-progress', $metadata = array() ) {
1729 1732
 		$comment_id = false;
@@ -1761,7 +1764,7 @@  discard block
 block discarded – undo
1761 1764
 	 * @param int $course_id
1762 1765
 	 * @param string $status
1763 1766
 	 * @param array $metadata
1764
-	 * @return mixed false or comment_ID
1767
+	 * @return boolean false or comment_ID
1765 1768
 	 */
1766 1769
 	public static function update_course_status( $user_id, $course_id, $status = 'in-progress', $metadata = array() ) {
1767 1770
 		$comment_id = false;
@@ -1951,7 +1954,7 @@  discard block
 block discarded – undo
1951 1954
      *
1952 1955
      * @since 1.7.4
1953 1956
      *
1954
-     * @param $data_key
1957
+     * @param string $data_key
1955 1958
      * @param $post_id
1956 1959
      * @param int $user_id
1957 1960
      *
Please login to merge, or discard this patch.
includes/template-functions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 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)
146
+	 * @param int $wc_product_id (default: 0)
147 147
 	 * @return bool
148 148
 	 */
149 149
 	function sensei_check_if_product_is_in_cart( $wc_product_id = 0 ) {
Please login to merge, or discard this patch.