Completed
Pull Request — master (#1233)
by Dan
07:34
created
widgets/widget-woothemes-sensei-course-component.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -167,8 +167,6 @@
 block discarded – undo
167 167
 
168 168
 	/**
169 169
 	 * Load the desired component, if a method is available for it.
170
-	 * @param  string $component The component to potentially be loaded.
171
-     *
172 170
 	 * @since  1.0.0
173 171
 	 * @return void
174 172
 	 */
Please login to merge, or discard this patch.
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-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-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.
includes/admin/class-sensei-learner-management.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -21,6 +21,7 @@
 block discarded – undo
21 21
 	/**
22 22
 	 * Constructor
23 23
 	 * @since  1.6.0
24
+	 * @param string $file
24 25
 	 * @return  void
25 26
 	 */
26 27
 	public function __construct ( $file ) {
Please login to merge, or discard this patch.
includes/class-sensei-modules.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -21,6 +21,9 @@  discard block
 block discarded – undo
21 21
     private $order_page_slug;
22 22
     public $taxonomy;
23 23
 
24
+    /**
25
+     * @param string $file
26
+     */
24 27
     public function __construct( $file )
25 28
     {
26 29
         $this->file = $file;
@@ -1942,6 +1945,7 @@  discard block
 block discarded – undo
1942 1945
      * Hooked into 'get_terms'
1943 1946
      *
1944 1947
      * @since 1.8.0
1948
+     * @param string[] $taxonomies
1945 1949
      */
1946 1950
     public function append_teacher_name_to_module( $terms, $taxonomies, $args )
1947 1951
     {
Please login to merge, or discard this patch.
includes/class-sensei.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
     /**
404 404
      * Disable guest checkout if a course product is in the cart
405 405
      * @param  boolean $guest_checkout Current guest checkout setting
406
-     * @return boolean                 Modified guest checkout setting
406
+     * @return string|boolean                 Modified guest checkout setting
407 407
      */
408 408
     public function disable_guest_checkout( $guest_checkout ) {
409 409
         global $woocommerce;
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
      * @since  1.0.0
643 643
      * @param  int 			$course_id  (default: 0)
644 644
      * @param  array/Object $order_user (default: array()) Specific user's data.
645
-     * @return bool|int
645
+     * @return boolean|string
646 646
      */
647 647
     public function woocommerce_course_update ( $course_id = 0, $order_user = array()  ) {
648 648
         global $current_user;
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
      *
1242 1242
      * @since 1.4.5
1243 1243
      * @access public
1244
-     * @param mixed $image_size
1244
+     * @param string $image_size
1245 1245
      * @return string
1246 1246
      */
1247 1247
     public function get_image_size( $image_size ) {
Please login to merge, or discard this patch.