@@ -345,7 +345,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | * |
@@ -143,7 +143,7 @@ |
||
| 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 ) { |
@@ -21,6 +21,7 @@ |
||
| 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 ) { |
@@ -21,6 +21,9 @@ discard block |
||
| 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 |
||
| 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 | { |
@@ -33,10 +33,6 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * |
| 35 | 35 | * |
| 36 | - * @param string $message |
|
| 37 | - * @param string $type defaults to alert options( alert, tick , download , info ) |
|
| 38 | - * |
|
| 39 | - * @return void |
|
| 40 | 36 | */ |
| 41 | 37 | |
| 42 | 38 | public function add_notice( $content , $type = 'alert' ){ |
@@ -47,10 +43,6 @@ discard block |
||
| 47 | 43 | /** |
| 48 | 44 | * Output all notices added |
| 49 | 45 | * |
| 50 | - * @param string $message |
|
| 51 | - * @param string $type |
|
| 52 | - * |
|
| 53 | - * @return void |
|
| 54 | 46 | */ |
| 55 | 47 | |
| 56 | 48 | public function print_notices(){ |
@@ -796,7 +796,7 @@ |
||
| 796 | 796 | * Return an array of field types expecting an array value returned. |
| 797 | 797 | * @access protected |
| 798 | 798 | * @since 1.0.0 |
| 799 | - * @return array |
|
| 799 | + * @return string[] |
|
| 800 | 800 | */ |
| 801 | 801 | protected function get_array_field_types () { |
| 802 | 802 | return array( 'multicheck' ); |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | * @since 1.8.0 |
| 453 | 453 | * @access public |
| 454 | 454 | * @parameters |
| 455 | - * @return array $users user id array |
|
| 455 | + * @return boolean $users user id array |
|
| 456 | 456 | */ |
| 457 | 457 | public function update_course_lessons_author ( $course_id, $new_author ){ |
| 458 | 458 | |
@@ -841,8 +841,7 @@ discard block |
||
| 841 | 841 | * This function hooks into wp_insert_post |
| 842 | 842 | * |
| 843 | 843 | * @since 1.8.0 |
| 844 | - * @param int $course_id |
|
| 845 | - * @return bool |
|
| 844 | + * @return false|null |
|
| 846 | 845 | */ |
| 847 | 846 | public function notify_admin_teacher_course_creation( $new_status, $old_status, $post ){ |
| 848 | 847 | |
@@ -1424,8 +1424,8 @@ discard block |
||
| 1424 | 1424 | * |
| 1425 | 1425 | * @global type $woothemes_sensei |
| 1426 | 1426 | * @global type $wpdb |
| 1427 | - * @param type $n |
|
| 1428 | - * @param type $offset |
|
| 1427 | + * @param integer $n |
|
| 1428 | + * @param integer $offset |
|
| 1429 | 1429 | * @return boolean |
| 1430 | 1430 | */ |
| 1431 | 1431 | function status_changes_repair_course_statuses( $n = 50, $offset = 0 ) { |
@@ -1669,8 +1669,8 @@ discard block |
||
| 1669 | 1669 | * Update the comment counts for all Courses and Lessons now that sensei comments will no longer be counted. |
| 1670 | 1670 | * |
| 1671 | 1671 | * @global type $wpdb |
| 1672 | - * @param type $n |
|
| 1673 | - * @param type $offset |
|
| 1672 | + * @param integer $n |
|
| 1673 | + * @param integer $offset |
|
| 1674 | 1674 | * @return boolean |
| 1675 | 1675 | */ |
| 1676 | 1676 | public function update_comment_course_lesson_comment_counts( $n = 50, $offset = 0 ) { |
@@ -850,7 +850,6 @@ discard block |
||
| 850 | 850 | * course_count function. |
| 851 | 851 | * |
| 852 | 852 | * @access public |
| 853 | - * @param array $exclude (default: array()) |
|
| 854 | 853 | * @param string $post_status (default: 'publish') |
| 855 | 854 | * @return int |
| 856 | 855 | */ |
@@ -1152,7 +1151,6 @@ discard block |
||
| 1152 | 1151 | * |
| 1153 | 1152 | * @since 1.4.0 |
| 1154 | 1153 | * @param object $user Queried user object |
| 1155 | - * @param boolean $manage Whether the user has permission to manage the courses |
|
| 1156 | 1154 | * @return string HTML displayng course data |
| 1157 | 1155 | */ |
| 1158 | 1156 | public function load_user_courses_content( $user = false ) { |
@@ -1879,7 +1877,7 @@ discard block |
||
| 1879 | 1877 | * |
| 1880 | 1878 | * @since 1.9 |
| 1881 | 1879 | * |
| 1882 | - * @param WP_Post $post |
|
| 1880 | + * @param WP_Post $post_id |
|
| 1883 | 1881 | */ |
| 1884 | 1882 | public function content_before_backwards_compatibility_hooks( $post_id ){ |
| 1885 | 1883 | |