diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 1686f6564a..ae687fb356 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -3,21 +3,24 @@ $finder = ( new PhpCsFixer\Finder() )->in( __DIR__ ); $rules = array( // Keep these rules for sure. - 'phpdoc_order' => array( + 'phpdoc_order' => array( 'order' => array( 'since', 'param', 'throws', 'return' ), ), - 'phpdoc_scalar' => true, - 'phpdoc_trim' => true, - 'phpdoc_var_without_name' => true, - 'phpdoc_indent' => true, - 'align_multiline_comment' => true, - 'short_scalar_cast' => true, - 'standardize_not_equals' => true, - 'echo_tag_syntax' => true, - 'semicolon_after_instruction' => true, - 'no_useless_else' => true, - 'no_superfluous_elseif' => true, - 'phpdoc_types_order' => array( + 'phpdoc_scalar' => true, + 'phpdoc_trim' => true, + 'phpdoc_var_without_name' => true, + 'phpdoc_separation' => true, + 'phpdoc_indent' => true, + 'align_multiline_comment' => true, + 'short_scalar_cast' => true, + 'standardize_not_equals' => true, + 'echo_tag_syntax' => true, + 'semicolon_after_instruction' => true, + 'no_useless_else' => true, + 'no_superfluous_elseif' => true, + 'elseif' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_types_order' => array( 'null_adjustment' => 'always_last', ), ); @@ -28,7 +31,6 @@ return $config->setFinder( $finder ); // Maybe include these. -// 'phpdoc_separation' => true, // 'phpdoc_summary' => true, // 'phpdoc_align' => true, // 'visibility_required' => true, diff --git a/classes/controllers/FrmAddonsController.php b/classes/controllers/FrmAddonsController.php index ec1b8501f2..5373a7e519 100644 --- a/classes/controllers/FrmAddonsController.php +++ b/classes/controllers/FrmAddonsController.php @@ -231,6 +231,7 @@ protected static function organize_and_get_categories() { * @since 6.15 * * @param array $addon The addon array that will be modified by reference. + * * @return void */ protected static function set_categories( &$addon ) { @@ -311,6 +312,7 @@ public static function get_addons_count() { * If the API is unable to connect, show something on the addons page * * @since 3.04.03 + * * @return array */ protected static function fallback_plugin_list() { @@ -409,6 +411,7 @@ protected static function fallback_plugin_list() { * If Pro is missing but has been authenticated, include a download URL * * @since 3.04.03 + * * @return string */ public static function get_pro_download_url() { @@ -454,6 +457,7 @@ public static function get_pro_license() { * @since 4.08 * * @param array $addons + * * @return array */ protected static function get_pro_from_addons( $addons ) { @@ -520,6 +524,7 @@ public static function get_primary_license_info() { * @since 3.04.03 * * @param mixed $transient + * * @return object */ public static function check_update( $transient ) { @@ -581,6 +586,7 @@ public static function check_update( $transient ) { * This means that trying to access FrmAppHelper::get_plugins when upgrading from a Lite version before v5.5 results in a one-off error. * * @since 5.5.2 + * * @return array */ protected static function get_plugins() { @@ -661,7 +667,9 @@ protected static function fill_update_addon_info( $installed_addons ) { * Get the action link for an addon that isn't active. * * @since 3.06.03 + * * @param string $plugin The plugin slug. + * * @return array */ public static function install_link( $plugin ) { @@ -700,7 +708,9 @@ public static function install_link( $plugin ) { /** * @since 4.09 + * * @param string $plugin The plugin slug. + * * @return array|false */ public static function get_addon( $plugin ) { @@ -717,6 +727,7 @@ public static function get_addon( $plugin ) { /** * @since 4.09 + * * @return string */ protected static function get_license_type() { @@ -898,6 +909,7 @@ protected static function set_addon_status( &$addon ) { * @param string $redirect * @param bool $network_wide * @param bool $silent + * * @return WP_Error|null Null on success, WP_Error on invalid file. */ protected static function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) { @@ -914,6 +926,7 @@ protected static function activate_plugin( $plugin, $redirect = '', $network_wid * * @param string $plugin * @param bool $silent + * * @return void */ protected static function deactivate_plugin( $plugin, $silent = false ) { @@ -929,6 +942,7 @@ protected static function deactivate_plugin( $plugin, $silent = false ) { * @since 6.8 * * @param string $plugin + * * @return true|WP_Error True on success, WP_Error on invalid file. */ protected static function uninstall_plugin( $plugin ) { @@ -1134,6 +1148,7 @@ function ( $plugin ) { * * @param callable $action_callback The specific add-on action to be executed. * @param callable|null $response_callback Optional. The response handling callback. Default null. + * * @return void */ private static function process_addon_action( $action_callback, $response_callback = null ) { @@ -1158,6 +1173,7 @@ private static function process_addon_action( $action_callback, $response_callba * * @param string $installed The plugin folder name with file name. * @param string $action The action type ('activate', 'deactivate', 'uninstall'). + * * @return array|void */ protected static function handle_addon_action( $installed, $action ) { @@ -1375,6 +1391,7 @@ private static function maybe_download_and_activate() { * * @param string $plugin * @param array|string $upgrade_link_args + * * @return void */ public static function conditional_action_button( $plugin, $upgrade_link_args ) { @@ -1411,6 +1428,7 @@ public static function conditional_action_button( $plugin, $upgrade_link_args ) * @type string $plan_required * @type string $upgrade_link * } + * * @return void */ public static function show_conditional_action_button( $atts ) { diff --git a/classes/controllers/FrmAntiSpamController.php b/classes/controllers/FrmAntiSpamController.php index b87d7dd76b..3d5524f6b3 100644 --- a/classes/controllers/FrmAntiSpamController.php +++ b/classes/controllers/FrmAntiSpamController.php @@ -3,6 +3,7 @@ * Anti-spam controller * * @package Formidable + * * @since 6.21 */ @@ -102,6 +103,7 @@ public static function get_default_spam_message() { * Extracts email addresses from values. * * @param array $values Values to check. + * * @return string[] */ public static function extract_emails_from_values( $values ) { diff --git a/classes/controllers/FrmAppController.php b/classes/controllers/FrmAppController.php index 2c76c759bf..e8b6a68113 100644 --- a/classes/controllers/FrmAppController.php +++ b/classes/controllers/FrmAppController.php @@ -51,6 +51,7 @@ private static function menu_icon() { * @since 3.0 * * @param string $classes + * * @return string */ public static function add_admin_class( $classes ) { @@ -204,6 +205,7 @@ private static function is_grey_page() { * @since 6.8 * * @param bool $is_grey_page + * * @return bool */ return apply_filters( 'frm_is_grey_page', $is_grey_page ); @@ -213,6 +215,7 @@ private static function is_grey_page() { * @since 6.8 * * @param array $pages A list of page names to check. + * * @return bool */ private static function is_page_in_list( $pages ) { @@ -271,6 +274,7 @@ private static function get_current_page() { /** * @param object $form + * * @return array */ private static function get_form_nav_items( $form ) { @@ -348,6 +352,7 @@ private static function get_form_nav_items( $form ) { * Adds a settings link to the plugins page * * @param array $links + * * @return array */ public static function settings_link( $links ) { @@ -460,6 +465,7 @@ public static function upgrade_overlay_html() { * @param string $form_key * @param string $title * @param string $description + * * @return void */ public static function api_email_form( $form_key, $title = '', $description = '' ) { @@ -518,6 +524,7 @@ public static function install_js_fallback() { * Check if the database is outdated * * @since 2.0.1 + * * @return bool */ public static function needs_update() { @@ -542,6 +549,7 @@ public static function needs_update() { * @since 3.0.04 * * @param array $atts + * * @return bool */ public static function compare_for_update( $atts ) { @@ -804,6 +812,7 @@ public static function admin_js() { * * @param string $plugin_url The plugin URL. * @param string $version The plugin version. + * * @return void */ private static function enqueue_builder_assets( $plugin_url, $version ) { @@ -838,6 +847,7 @@ private static function enqueue_global_settings_scripts( $page ) { * @since 6.11 * * @param string $page + * * @return void */ private static function maybe_enqueue_dropzone_css( $page ) { @@ -1297,6 +1307,7 @@ private static function should_show_footer_links() { * @since 6.7 * * @param bool $show_footer_links + * * @return bool */ return apply_filters( 'frm_show_footer_links', $show_footer_links ); @@ -1343,6 +1354,7 @@ public static function show_error_modal( $error_args ) { * * @param string $plugin_url URL of the plugin. * @param string $version Current version of the plugin. + * * @return void */ private static function enqueue_floating_links( $plugin_url, $version ) { @@ -1514,6 +1526,7 @@ private static function remember_custom_sort() { * * @param string &$orderby Reference to the current 'orderby' parameter. * @param string &$order Reference to the current 'order' parameter. + * * @return void */ public static function apply_saved_sort_preference( &$orderby, &$order ) { diff --git a/classes/controllers/FrmApplicationsController.php b/classes/controllers/FrmApplicationsController.php index 4f4904cd71..fb12d5e0e5 100644 --- a/classes/controllers/FrmApplicationsController.php +++ b/classes/controllers/FrmApplicationsController.php @@ -137,6 +137,7 @@ private static function get_prepared_template_data() { /** * @param array $total the accumulated array of reduced application data. * @param array $current data for the current template from the API. + * * @return array */ private static function reduce_template( $total, $current ) { @@ -154,6 +155,7 @@ private static function reduce_template( $total, $current ) { * Sort applications alphabetically. * * @param array $applications + * * @return array */ private static function sort_templates( $applications ) { @@ -220,6 +222,7 @@ public static function dequeue_scripts() { /** * @param string $title * @param string $context values include 'index', 'list', and 'edit'. + * * @return void */ public static function render_applications_header( $title, $context ) { diff --git a/classes/controllers/FrmDashboardController.php b/classes/controllers/FrmDashboardController.php index 40c6d836fc..97320b75a2 100644 --- a/classes/controllers/FrmDashboardController.php +++ b/classes/controllers/FrmDashboardController.php @@ -248,6 +248,7 @@ private static function view_args_payments() { * Init view args for entries placeholder. * * @param array $forms_count The total forms count. If there are no any forms yet, we'll have CTA pointing to creating a form. + * * @return array */ private static function view_args_entries_placeholder( $forms_count ) { @@ -290,6 +291,7 @@ private static function view_args_entries_placeholder( $forms_count ) { * @param string $counter_type * @param int $counter_value * @param false|object $latest_available_form The form object of the latest form available. If there are at least one form available we show "Add Entry" cta for entries counter. + * * @return array */ public static function display_counter_cta( $counter_type, $counter_value, $latest_available_form = false ) { @@ -345,6 +347,7 @@ public static function ajax_requests() { * Hook name: manage_formidable_page_formidable-dashboard_columns. * * @param array $columns An associative array of column headings. + * * @return array */ public static function entries_columns( $columns = array() ) { @@ -383,6 +386,7 @@ public static function is_dashboard_page() { * Detect if the logged user's email is subscribed. Used for inbox email subscribe. * * @param string $email The logged user's email. + * * @return bool */ public static function email_is_subscribed( $email ) { @@ -429,6 +433,7 @@ private static function view_args_inbox() { * Prepare inbox messages data. * * @param array $data + * * @return array */ private static function inbox_prepare_messages( $data ) { @@ -446,6 +451,7 @@ private static function inbox_prepare_messages( $data ) { * Clean messages CTA. * * @param string $cta + * * @return string */ private static function inbox_clean_messages_cta( $cta ) { @@ -459,6 +465,7 @@ private static function inbox_clean_messages_cta( $cta ) { * Get the embed YouTube video from YouTube feed api. If there are 0 entries we show the welcome video otherwise latest video from FF YouTube channel is displayed. * * @param int $entries_count The total entries available. + * * @return string|null The YouTube video ID. */ private static function get_youtube_embed_video( $entries_count ) { @@ -484,6 +491,7 @@ private static function get_youtube_embed_video( $entries_count ) { * Used for Inbox widget - email subscribe. * * @param string $email The user email address. + * * @return void */ private static function save_subscribed_email( $email ) { @@ -516,6 +524,7 @@ private static function get_subscribed_emails() { * Get the dashboard options from db. * * @param string|null $option_name The dashboard option name. If null it will return all dashboard options. + * * @return array */ private static function get_dashboard_options( $option_name = null ) { diff --git a/classes/controllers/FrmDeactivationFeedbackController.php b/classes/controllers/FrmDeactivationFeedbackController.php index 0f0a8ddc49..1d3613b23e 100644 --- a/classes/controllers/FrmDeactivationFeedbackController.php +++ b/classes/controllers/FrmDeactivationFeedbackController.php @@ -3,6 +3,7 @@ * Deactivation feedback controller * * @package Formidable + * * @since 6.15 */ diff --git a/classes/controllers/FrmEmailStylesController.php b/classes/controllers/FrmEmailStylesController.php index bbc4fcc292..ef0e94ff4d 100644 --- a/classes/controllers/FrmEmailStylesController.php +++ b/classes/controllers/FrmEmailStylesController.php @@ -63,6 +63,7 @@ public static function get_email_styles() { * @since 6.25 * * @param array[] $email_styles The email styles. + * * @return array */ return apply_filters( 'frm_email_styles', $email_styles ); @@ -72,6 +73,7 @@ public static function get_email_styles() { * Gets email style preview URL. * * @param string $style_key Style key. + * * @return string */ public static function get_email_style_preview_url( $style_key ) { @@ -103,6 +105,7 @@ public static function get_default_email_style() { * Gets the test email content. * * @param false|string $style_key Default is `false`, using the one in settings. + * * @return string */ private static function get_test_email_content( $style_key = false ) { @@ -147,6 +150,7 @@ private static function get_test_email_content( $style_key = false ) { * * @param string $style_key Style key. * @param array $table_rows Table rows. + * * @return string */ private static function get_test_rich_text_email_content( $style_key, $table_rows ) { @@ -211,6 +215,7 @@ private static function get_test_rich_text_email_content( $style_key, $table_row * * @param string $label Field label. * @param string $value Prepared field value. + * * @return string */ public static function get_content_for_one_column_cell( $label, $value ) { @@ -221,6 +226,7 @@ public static function get_content_for_one_column_cell( $label, $value ) { * Gets table generator object for an email style. * * @param false|string $email_style Email style. Default is `false`: using the one in global settings. + * * @return FrmTableHTMLGenerator */ public static function get_table_generator( $email_style = false ) { @@ -321,6 +327,7 @@ public static function ajax_send_test_email() { * Gets Content-Type header. * * @param string $email_style Email style. + * * @return string */ private static function get_content_type_header( $email_style ) { @@ -372,6 +379,7 @@ public static function get_email_style_settings() { * Wraps email message with new settings. * * @param string $message Email message. + * * @return string */ public static function wrap_email_message( $message ) { @@ -438,6 +446,7 @@ public static function wrap_email_message( $message ) { * @param string $tag Tag name. * @param string $css CSS code. * @param string $content The content. + * * @return string */ private static function add_inline_css( $tag, $css, $content ) { @@ -465,6 +474,7 @@ private static function add_inline_css( $tag, $css, $content ) { * @param string $tag Tag name. * @param string $css CSS code. * @param string $html The HTML tag. + * * @return string */ private static function add_css_to_style_attr( $tag, $css, $html ) { diff --git a/classes/controllers/FrmEmailSummaryController.php b/classes/controllers/FrmEmailSummaryController.php index 16acc64c25..f5d4ec387d 100644 --- a/classes/controllers/FrmEmailSummaryController.php +++ b/classes/controllers/FrmEmailSummaryController.php @@ -3,6 +3,7 @@ * In-plugin summary emails controller * * @since 6.7 + * * @package Formidable */ diff --git a/classes/controllers/FrmEntriesAJAXSubmitController.php b/classes/controllers/FrmEntriesAJAXSubmitController.php index e48ab6343b..3be13cc39b 100644 --- a/classes/controllers/FrmEntriesAJAXSubmitController.php +++ b/classes/controllers/FrmEntriesAJAXSubmitController.php @@ -160,6 +160,7 @@ private static function print_ajax_scripts() { * @param string $field_id * @param stdClass $form the form being submitted (not necessarily the field's form when embedded/repeated). * @param array $errors all errors that were caught in this form submission, passed into the frm_before_replace_shortcodes filter for reference. + * * @return string */ private static function maybe_modify_ajax_error( $error, $field_id, $form, $errors ) { @@ -192,6 +193,7 @@ private static function maybe_modify_ajax_error( $error, $field_id, $form, $erro * * @param array $response * @param int|string $form_id + * * @return array */ private static function check_for_failed_form_submission( $response, $form_id ) { diff --git a/classes/controllers/FrmEntriesController.php b/classes/controllers/FrmEntriesController.php index 6c81efeb00..bbc1f63af7 100644 --- a/classes/controllers/FrmEntriesController.php +++ b/classes/controllers/FrmEntriesController.php @@ -78,6 +78,7 @@ private static function maybe_redirect_to_views_upsell() { * @since 6.14.1 * * @param array $query_args + * * @return array */ private static function add_url_params_to_views_redirect_query_args( $query_args ) { @@ -479,6 +480,7 @@ public static function sortable_columns() { * Some post content can be sorted but not everything. * * @param stdClass $field + * * @return bool */ private static function field_supports_sorting( $field ) { @@ -488,6 +490,7 @@ private static function field_supports_sorting( $field ) { /** * @param mixed $result Option value from database for hidden columns in entries table. + * * @return array */ public static function hidden_columns( $result ) { @@ -551,6 +554,7 @@ private static function user_hidden_columns_for_form( $form_id, $result ) { * * @param array $atts * @param array $result + * * @return void */ private static function remove_excess_cols( $atts, &$result ) { @@ -643,6 +647,7 @@ private static function get_delete_form_time( $form, &$errors ) { * Back End CRUD. * * @param int $id + * * @return void */ public static function show( $id = 0 ) { @@ -812,6 +817,7 @@ public static function delete_entry_before_redirect( $url, $form, $atts ) { * Delete entry if not redirected. * * @param array $atts + * * @return void */ public static function delete_entry_after_save( $atts ) { diff --git a/classes/controllers/FrmFieldsController.php b/classes/controllers/FrmFieldsController.php index 4c9132ddf4..383164ce44 100644 --- a/classes/controllers/FrmFieldsController.php +++ b/classes/controllers/FrmFieldsController.php @@ -213,6 +213,7 @@ public static function load_single_field( $field_object, $values, $form_id = 0 ) * @param array $field * @param array $display * @param FrmFieldType $field_info + * * @return string */ private static function get_classes_for_builder_field( $field, $display, $field_info ) { @@ -262,6 +263,7 @@ public static function import_options() { * @since 6.8.4 * * @param array $bulk_edit_types + * * @return array */ $bulk_edit_types = apply_filters( 'frm_bulk_edit_field_types', $bulk_edit_types ); @@ -317,6 +319,7 @@ public static function import_options() { * @since 4.0 * * @param array $atts - Includes field array, field_obj, display array, values array. + * * @return void */ public static function load_single_field_settings( $atts ) { @@ -386,6 +389,7 @@ private static function maybe_define_field_selection_data() { * * @param array $field * @param array $atts + * * @return array */ private static function default_value_types( $field, $atts ) { @@ -442,6 +446,7 @@ private static function default_value_types( $field, $atts ) { /** * @param string $type + * * @return string */ public static function change_type( $type ) { @@ -493,6 +498,7 @@ public static function display_field_options( $settings, $field_info = null ) { * * @param array $field Field data. * @param bool $is_hidden Whether the format option should be hidden. + * * @return void */ public static function show_format_option( $field, $is_hidden = false ) { @@ -544,6 +550,7 @@ public static function input_html( $field, $echo = true ) { /** * @param array $field * @param array $class + * * @return void */ private static function add_input_classes( $field, array &$class ) { @@ -563,6 +570,7 @@ private static function add_input_classes( $field, array &$class ) { /** * @param array $field * @param array $add_html + * * @return void */ private static function add_html_size( $field, array &$add_html ) { @@ -597,6 +605,7 @@ private static function add_html_size( $field, array &$add_html ) { /** * @param array $field * @param array $add_html + * * @return void */ private static function add_html_cols( $field, array &$add_html ) { @@ -627,6 +636,7 @@ private static function add_html_cols( $field, array &$add_html ) { /** * @param array $field * @param array $add_html + * * @return void */ private static function add_html_length( $field, array &$add_html ) { @@ -654,6 +664,7 @@ private static function add_html_length( $field, array &$add_html ) { * @param array $field * @param array $add_html * @param array $class + * * @return void */ private static function add_html_placeholder( $field, array &$add_html, array &$class ) { @@ -680,6 +691,7 @@ private static function add_html_placeholder( $field, array &$add_html, array &$ * @since 5.4 This doesn't call `FrmFieldsController::get_default_value_from_name()` anymore. * * @param array $field Field array. + * * @return string */ private static function prepare_placeholder( $field ) { @@ -748,6 +760,7 @@ public static function add_placeholder_to_select( $field ) { * * @param array $field * @param array $add_html + * * @return void */ private static function add_placeholder_to_input( $field, &$add_html ) { @@ -759,6 +772,7 @@ private static function add_placeholder_to_input( $field, &$add_html ) { /** * @param array $field * @param array $add_html + * * @return void */ private static function add_frmval_to_input( $field, &$add_html ) { @@ -806,6 +820,7 @@ private static function add_validation_messages( $field, array &$add_html ) { * @since 6.9 * * @param array|object $field + * * @return array */ private static function get_validation_data_attribute_visibility_info( $field ) { @@ -837,6 +852,7 @@ private static function get_validation_data_attribute_visibility_info( $field ) * * @param array $field * @param array $add_html + * * @return void */ private static function maybe_add_error_html_for_js_validation( $field, array &$add_html ) { @@ -856,6 +872,7 @@ private static function maybe_add_error_html_for_js_validation( $field, array &$ * @since 5.0.03 * * @param array $field + * * @return false|stdClass false if there is no form object found with JS validation active. */ private static function get_form_for_js_validation( $field ) { @@ -875,6 +892,7 @@ private static function get_form_for_js_validation( $field ) { * @param stdClass $form * @param array $field * @param array $errors + * * @return false|string */ public static function pull_custom_error_body_from_custom_html( $form, $field, $errors = array() ) { @@ -916,8 +934,10 @@ public static function pull_custom_error_body_from_custom_html( $form, $field, $ * remove it is present if needed. * * @since 3.06.01 + * * @param array $field * @param array $add_html + * * @return void */ private static function maybe_add_html_required( $field, array &$add_html ) { @@ -938,6 +958,7 @@ private static function maybe_add_html_required( $field, array &$add_html ) { /** * @param array $field * @param array $add_html + * * @return void */ private static function add_shortcodes_to_html( $field, array &$add_html ) { @@ -982,6 +1003,7 @@ private static function add_shortcodes_to_html( $field, array &$add_html ) { * @since 6.11.2 * * @param string $key The option key. + * * @return bool */ private static function should_allow_input_attribute( $key ) { @@ -998,6 +1020,7 @@ private static function should_allow_input_attribute( $key ) { * * @param array $field * @param array $add_html + * * @return void */ private static function add_pattern_attribute( $field, array &$add_html ) { diff --git a/classes/controllers/FrmFormActionsController.php b/classes/controllers/FrmFormActionsController.php index e55a7cc8f9..c8fe8565a4 100644 --- a/classes/controllers/FrmFormActionsController.php +++ b/classes/controllers/FrmFormActionsController.php @@ -93,6 +93,7 @@ public static function register_actions() { * @since 6.23 * * @param array $action_classes + * * @return array */ private static function maybe_unset_highrise( $action_classes ) { @@ -126,6 +127,7 @@ public static function email_settings( $values ) { * * @param array $action_controls * @param array $groups + * * @return void */ private static function maybe_add_action_to_group( $action_controls, &$groups ) { @@ -233,6 +235,7 @@ private static function get_crm_actions() { * @since 4.0 * * @param array $action_controls + * * @return array */ private static function active_actions( $action_controls ) { @@ -249,6 +252,7 @@ private static function active_actions( $action_controls ) { * For each add-on, add an li, class, and javascript function. If active, add an additional class. * * @since 4.0 + * * @param object $action_control * @param array $allowed */ @@ -305,6 +309,7 @@ public static function show_action_icon_link( $action_control, $allowed ) { /** * @param string $action + * * @return array|FrmFormAction A single form action is returned when a specific $action value is requested. */ public static function get_form_actions( $action = 'all' ) { @@ -385,6 +390,7 @@ public static function list_actions( $form, $values ) { * * @param int|string $form_id * @param array $form_actions + * * @return void */ private static function maybe_show_limit_warning( $form_id, $form_actions ) { @@ -521,6 +527,7 @@ private static function fields_to_values( $form_id, array &$values ) { /** * @param int $form_id + * * @return void */ public static function update_settings( $form_id ) { @@ -772,6 +779,7 @@ public static function limit_by_type( $where ) { * * @param bool|null $null * @param string $post_type + * * @return bool|null */ public static function prevent_wpml_translations( $null, $post_type ) { diff --git a/classes/controllers/FrmFormTemplatesController.php b/classes/controllers/FrmFormTemplatesController.php index 1e19fc92c7..fc6caebab0 100644 --- a/classes/controllers/FrmFormTemplatesController.php +++ b/classes/controllers/FrmFormTemplatesController.php @@ -656,6 +656,7 @@ public static function get_header_cancel_button() { * * @param array $nav_items Navigation items. * @param array $nav_args Additional navigation arguments. + * * @return array Modified navigation items with 'new_template' query parameter. */ public static function append_new_template_to_nav( $nav_items, $nav_args ) { diff --git a/classes/controllers/FrmFormsController.php b/classes/controllers/FrmFormsController.php index 997934c98e..ae4a0750fd 100644 --- a/classes/controllers/FrmFormsController.php +++ b/classes/controllers/FrmFormsController.php @@ -112,6 +112,7 @@ public static function list_form() { * @since 2.02.11 * * @param int|object $form + * * @return void */ private static function create_default_email_action( $form ) { @@ -137,6 +138,7 @@ private static function create_default_email_action( $form ) { * @since 6.0.0 * * @param int|object $form Form object or ID. + * * @return void */ private static function create_default_on_submit_action( $form ) { @@ -170,6 +172,7 @@ private static function create_default_on_submit_action( $form ) { * @since 6.9 * * @param int|object $form Form ID or object. + * * @return void */ private static function create_submit_button_field( $form ) { @@ -213,6 +216,7 @@ public static function edit( $values = false ) { /** * @param mixed $id * @param string $message + * * @return void */ public static function settings( $id = false, $message = '' ) { @@ -270,6 +274,7 @@ public static function update_settings() { /** * @param int $form_id + * * @return bool */ private static function antispam_was_on( $form_id ) { @@ -345,6 +350,7 @@ private static function get_form_too_long_docs_url() { * @since 6.8 * * @param int $form_id + * * @return void */ private static function maybe_remove_draft_option_from_fields( $form_id ) { @@ -375,6 +381,7 @@ private static function maybe_remove_draft_option_from_fields( $form_id ) { * @since 3.06.01 * * @param array $values + * * @return bool */ private static function is_too_long( $values ) { @@ -522,6 +529,7 @@ private static function set_preview_query() { * @since 5.5.2 * * @param WP_Post $page The page object. + * * @return void */ private static function set_post_global( $page ) { @@ -556,6 +564,7 @@ private static function load_theme_preview() { * @since 6.5.2 * * @param array $classes The body classes list. + * * @return array */ public static function preview_block_theme_body_classnames( $classes ) { @@ -594,7 +603,9 @@ private static function fallback_when_page_template_part_is_not_supported_by_the * and renders required html fragments calling required functions. * * @since 6.7.1 + * * @param string $template + * * @return void */ private static function get_template( $template ) { @@ -617,7 +628,9 @@ private static function get_template( $template ) { * Returns true if calling a template function doesn't trigger deprecation warnings. * * @since 6.7.1 + * * @param string $template + * * @return bool */ private static function should_try_getting_template( $template ) { @@ -635,6 +648,7 @@ private static function should_try_getting_template( $template ) { * @since 3.0 * * @param string $title + * * @return string */ public static function preview_page_title( $title ) { @@ -651,6 +665,7 @@ public static function preview_page_title( $title ) { * @since 3.0 * * @param string $title + * * @return string */ public static function preview_title( $title ) { @@ -663,6 +678,7 @@ public static function preview_title( $title ) { * @since 3.0 * * @param string $content + * * @return string */ public static function preview_content( $content ) { @@ -721,6 +737,7 @@ private static function load_direct_preview() { * @since 6.20 * * @param string $form_key Form key. + * * @return void */ public static function maybe_block_preview( $form_key ) { @@ -748,6 +765,7 @@ private static function fix_deprecated_null_param_warning() { 'script_loader_src', /** * @param string|null $src + * * @return string */ function ( $src ) { @@ -765,6 +783,7 @@ public static function untrash() { /** * @param array $ids + * * @return string */ public static function bulk_untrash( $ids ) { @@ -851,6 +870,7 @@ public static function change_form_status( $status ) { /** * @param array $ids + * * @return string */ public static function bulk_trash( $ids ) { @@ -905,6 +925,7 @@ public static function destroy() { /** * @param array $ids + * * @return string */ public static function bulk_destroy( $ids ) { @@ -1132,6 +1153,7 @@ public static function get_shortcode_opts() { * @param array $params * @param string $message * @param array $errors + * * @return void */ public static function display_forms_list( $params = array(), $message = '', $errors = array() ) { @@ -1172,6 +1194,7 @@ public static function display_forms_list( $params = array(), $message = '', $er /** * @param array $columns + * * @return array */ public static function get_columns( $columns ) { @@ -1212,6 +1235,7 @@ public static function get_sortable_columns() { /** * @param mixed $hidden_columns + * * @return array */ public static function hidden_columns( $hidden_columns ) { @@ -1254,6 +1278,7 @@ public static function save_per_page( $save, $option, $value ) { * @param array $errors * @param string $message * @param bool $create_link + * * @return void */ private static function get_edit_vars( $id, $errors = array(), $message = '', $create_link = false ) { @@ -1342,6 +1367,7 @@ private static function get_edit_vars( $id, $errors = array(), $message = '', $c /** * @param array $fields + * * @return array */ public static function update_form_builder_fields( $fields ) { @@ -1353,6 +1379,7 @@ public static function update_form_builder_fields( $fields ) { /** * @param string $message + * * @return void */ public static function maybe_update_form_builder_message( &$message ) { @@ -1365,6 +1392,7 @@ public static function maybe_update_form_builder_message( &$message ) { * @param int|string $id * @param array $errors * @param array|string $args + * * @return void */ public static function get_settings_vars( $id, $errors = array(), $args = array() ) { @@ -1436,6 +1464,7 @@ function () { * @since 4.0 * * @param array $atts + * * @return void */ public static function form_publish_button( $atts ) { @@ -1449,6 +1478,7 @@ public static function form_publish_button( $atts ) { * @since 4.0 * * @param array $values + * * @return array */ private static function get_settings_tabs( $values ) { @@ -1570,6 +1600,7 @@ private static function get_settings_tabs( $values ) { * @since 4.0 * * @param array $values + * * @return void */ public static function advanced_settings( $values ) { @@ -1580,6 +1611,7 @@ public static function advanced_settings( $values ) { /** * @param array $values + * * @return void */ public static function render_spam_settings( $values ) { @@ -1594,6 +1626,7 @@ public static function render_spam_settings( $values ) { * @since 4.0 * * @param array $values + * * @return void */ public static function buttons_settings( $values ) { @@ -1604,6 +1637,7 @@ public static function buttons_settings( $values ) { * @since 4.0 * * @param array $values + * * @return void */ public static function html_settings( $values ) { @@ -1616,6 +1650,7 @@ public static function html_settings( $values ) { * @since 2.03.08 * * @param array|bool $values + * * @return void */ private static function clean_submit_html( &$values ) { @@ -1642,6 +1677,7 @@ public static function update_button_classes( $classes ) { /** * @param int|string $form_id * @param string $class + * * @return void */ public static function mb_tags_box( $form_id, $class = '' ) { @@ -1672,6 +1708,7 @@ public static function mb_tags_box( $form_id, $class = '' ) { * @since 3.04.01 * * @param array $atts + * * @return array */ private static function advanced_helpers( $atts ) { @@ -1764,6 +1801,7 @@ private static function user_shortcodes() { * @since 2.0.6 * * @param bool $settings_tab + * * @return array */ private static function get_shortcode_helpers( $settings_tab ) { @@ -1803,6 +1841,7 @@ private static function get_shortcode_helpers( $settings_tab ) { * Insert the form class setting into the form. * * @param stdClass $form + * * @return void */ public static function form_classes( $form ) { @@ -1851,6 +1890,7 @@ public static function get_email_html() { * @param string $content * @param int|stdClass|string $form * @param false|int|stdClass|string $entry + * * @return string */ public static function filter_content( $content, $form, $entry = false ) { @@ -1886,6 +1926,7 @@ public static function filter_content( $content, $form, $entry = false ) { * * @param array|string $string * @param int|stdClass|string $form + * * @return array|string */ public static function replace_form_name_shortcodes( $string, $form ) { @@ -1907,6 +1948,7 @@ public static function replace_form_name_shortcodes( $string, $form ) { /** * @param false|int|stdClass|string $entry + * * @return void */ private static function get_entry_by_param( &$entry ) { @@ -1932,6 +1974,7 @@ public static function replace_content_shortcodes( $content, $entry, $shortcodes /** * @param array $errors + * * @return array */ public static function process_bulk_form_actions( $errors ) { @@ -1990,6 +2033,7 @@ public static function process_bulk_form_actions( $errors ) { * Includes html that shows a message when the device is too small to use Formidable Forms admin pages. * * @since 6.20 + * * @return void */ public static function include_device_too_small_message() { @@ -2170,6 +2214,7 @@ public static function no_views( $values = array() ) { * @since 4.07 * * @param array $values + * * @return void */ public static function no_reports( $values = array() ) { @@ -2247,6 +2292,7 @@ public static function add_menu_to_admin_bar() { * @since 2.05.07 * * @param array $actions + * * @return void */ private static function add_forms_to_admin_bar( $actions ) { @@ -2271,6 +2317,7 @@ private static function add_forms_to_admin_bar( $actions ) { * The formidable shortcode * * @param array $atts The params from the shortcode. + * * @return string */ public static function get_form_shortcode( $atts ) { @@ -2305,6 +2352,7 @@ public static function get_form_shortcode( $atts ) { * * @param false|int|string $id * @param false|string $key + * * @return false|stdClass */ private static function maybe_get_form_by_id_or_key( $id, $key ) { @@ -2320,6 +2368,7 @@ private static function maybe_get_form_by_id_or_key( $id, $key ) { * @param bool|int|string $title may be 'auto', true, false, 'true', 'false', 'yes', '1', 1, '0', 0. * @param bool|int|string $description may be 'auto', true, false, 'true', 'false', 'yes', '1', 1, '0', 0. * @param array $atts + * * @return string */ public static function show_form( $id = '', $key = '', $title = false, $description = false, $atts = array() ) { @@ -2369,6 +2418,7 @@ public static function show_form( $id = '', $key = '', $title = false, $descript /** * @param false|int|string $id + * * @return false|stdClass */ private static function maybe_get_form_to_show( $id ) { @@ -2512,6 +2562,7 @@ private static function get_saved_errors( $form, $params ) { * @since 2.2.7 * * @param int|string $form_id + * * @return int */ public static function just_created_entry( $form_id ) { @@ -2532,6 +2583,7 @@ public static function just_created_entry( $form_id ) { * @type object $form Form object. * @type int $entry_id Entry ID. * } + * * @return array|string */ private static function get_confirmation_method( $atts ) { @@ -2670,6 +2722,7 @@ public static function run_success_action( $args ) { * * @param array $args See {@see FrmFormsController::run_success_action()}. * @param string $event Form event. Default is `create`. + * * @return array Array of actions that meet the conditional logics. */ public static function get_met_on_submit_actions( $args, $event = 'create' ) { @@ -2744,6 +2797,7 @@ public static function get_met_on_submit_actions( $args, $event = 'create' ) { * @param object $action Form action object. * @param array $args See {@see FrmFormsController::run_success_action()}. * @param string $event Form event. Default is `create`. + * * @return bool */ private static function is_valid_on_submit_action( $action, $args, $event = 'create' ) { @@ -2857,6 +2911,7 @@ public static function run_single_on_submit_action( $args, $action ) { * * @param array $args See {@see FrmFormsController::run_success_action()}. * @param object $action On Submit action object. + * * @return array */ private static function get_run_success_action_args( $args, $action ) { @@ -2884,6 +2939,7 @@ private static function get_run_success_action_args( $args, $action ) { * @since 3.0 * * @param array $args + * * @return void */ private static function load_page_after_submit( $args ) { @@ -2914,6 +2970,7 @@ private static function load_page_after_submit( $args ) { /** * @since 3.0 + * * @param array $args See {@see FrmFormsController::run_success_action()}. */ private static function redirect_after_submit( $args ) { @@ -2982,6 +3039,7 @@ private static function print_open_in_new_tab_js_with_fallback_handler( $success * @since 6.3.1 * * @param array $args See {@see FrmFormsController::run_success_action()}. + * * @return array */ private static function get_ajax_redirect_response_data( $args ) { @@ -3100,6 +3158,7 @@ private static function get_redirect_message( $success_url, $success_msg, $args * * @param string $success_url Redirect URL. * @param array $args Contains `form` object. + * * @return string */ private static function get_redirect_fallback_message( $success_url, $args ) { @@ -3193,6 +3252,7 @@ private static function show_form_after_submit( $args ) { * * @param object $form Form object. * @param string $message The message. + * * @return string Accepts 'before', 'after', or 'submit'. */ public static function message_placement( $form, $message ) { @@ -3279,6 +3339,7 @@ private static function show_lone_success_message( $atts ) { * @param object $form Form object. * @param int $entry_id Entry ID. * @param array $args See {@see FrmFormsController::run_success_action()}. + * * @return string */ private static function prepare_submit_message( $form, $entry_id, $args = array() ) { @@ -3434,6 +3495,7 @@ private static function maybe_minimize_form( $atts, &$content ) { * @since 2.0.8 * * @param array $atts + * * @return bool */ private static function is_minification_on( $atts ) { @@ -3515,6 +3577,7 @@ public static function create_page_with_shortcode() { * @since 5.3 * * @param int $form_id + * * @return string */ private static function get_page_shortcode_content_for_form( $form_id ) { @@ -3560,6 +3623,7 @@ function () { * @deprecated 4.0 * * @param array $values + * * @return void */ public static function create( $values = array() ) { diff --git a/classes/controllers/FrmInboxController.php b/classes/controllers/FrmInboxController.php index 8e9fcb55f2..7f7544d2f9 100644 --- a/classes/controllers/FrmInboxController.php +++ b/classes/controllers/FrmInboxController.php @@ -15,6 +15,7 @@ class FrmInboxController { * @since 6.8.4 The $filtered parameter was added. * * @param bool $filtered Set this to false to avoid the frm_inbox_badge filter. + * * @return string */ public static function get_notice_count( $filtered = true ) { diff --git a/classes/controllers/FrmOnboardingWizardController.php b/classes/controllers/FrmOnboardingWizardController.php index 4269171e70..fb2c92c6ad 100644 --- a/classes/controllers/FrmOnboardingWizardController.php +++ b/classes/controllers/FrmOnboardingWizardController.php @@ -426,6 +426,7 @@ public static function remove_menu() { * @since 6.9 * * @param string $classes Existing body classes. + * * @return string Updated list of body classes, including the newly added classes. */ public static function add_admin_body_classes( $classes ) { @@ -436,6 +437,7 @@ public static function add_admin_body_classes( $classes ) { * Checks if the Onboarding Wizard was skipped during the plugin's installation. * * @since 6.9 + * * @return bool True if the Onboarding Wizard was skipped, false otherwise. */ public static function has_onboarding_been_skipped() { @@ -446,6 +448,7 @@ public static function has_onboarding_been_skipped() { * Marks the Onboarding Wizard as skipped to prevent automatic redirects to the wizard. * * @since 6.9 + * * @return void */ public static function mark_onboarding_as_skipped() { @@ -458,6 +461,7 @@ public static function mark_onboarding_as_skipped() { * @since 6.9 * * @param array $inbox_messages The array of existing inbox messages. + * * @return array Configuration for the onboarding wizard slide-in notification. */ public static function add_wizard_to_floating_links( $inbox_messages ) { diff --git a/classes/controllers/FrmOverlayController.php b/classes/controllers/FrmOverlayController.php index 068a74d51d..b23f890789 100644 --- a/classes/controllers/FrmOverlayController.php +++ b/classes/controllers/FrmOverlayController.php @@ -42,10 +42,10 @@ class FrmOverlayController { * The controller data. It will handle the options from multiple instances of the controller * * @var array Option data { + * * @type array $options_data[ '[instance1-option_name_provided_via-->config-option-name]' ] { * @type string $execution-frequency Values example: '1 day' | '10 days' | '1 week' | '10 weeks' | '1 month' | '10 months' | '1 year' | '10 years' * } - * * @type array $options_data[ '[instance2-option_name_provided_via-->config-option-name]' ] { * @type string $execution-frequency Values example: '1 day' | '10 days' | '1 week' | '10 weeks' | '1 month' | '10 months' | '1 year' | '10 years' * } @@ -148,6 +148,7 @@ private function update_options_data() { * @type string $buttons[]['target'] Target attribute for the button link. * @type string $buttons[]['label'] Label/text of the button. * } + * * @return bool */ public function open_overlay( $data = array() ) { diff --git a/classes/controllers/FrmSettingsController.php b/classes/controllers/FrmSettingsController.php index 83345a816d..e9a4b29e94 100644 --- a/classes/controllers/FrmSettingsController.php +++ b/classes/controllers/FrmSettingsController.php @@ -206,6 +206,7 @@ private static function get_settings_tabs() { * @since 6.22.1 * * @param array $sections + * * @return void */ private static function remove_payments_sections( &$sections ) { @@ -228,6 +229,7 @@ private static function remove_payments_sections( &$sections ) { * * @param string $a * @param string $b + * * @return int */ private static function payment_sections_sort_callback( $a, $b ) { @@ -280,6 +282,7 @@ public static function general_settings() { * * @param FrmSettings $frm_settings * @param string $more_html + * * @return void */ public static function maybe_render_currency_selector( $frm_settings, $more_html ) { diff --git a/classes/controllers/FrmSimpleBlocksController.php b/classes/controllers/FrmSimpleBlocksController.php index 463c520142..0abab0dac2 100644 --- a/classes/controllers/FrmSimpleBlocksController.php +++ b/classes/controllers/FrmSimpleBlocksController.php @@ -80,6 +80,7 @@ public static function block_editor_assets() { * @since 6.8 * * @param int $addon_id Addon ID. + * * @return array|false */ private static function get_addon_info( $addon_id ) { @@ -175,6 +176,7 @@ public static function register_simple_form_block() { * Renders a form given the specified attributes. * * @param array $attributes + * * @return string */ public static function simple_form_render( $attributes ) { @@ -186,6 +188,7 @@ public static function simple_form_render( $attributes ) { /** * @since 5.5.2 + * * @param array $attributes */ do_action( 'frm_before_simple_form_render', $attributes ); @@ -217,6 +220,7 @@ public static function simple_form_render( $attributes ) { * With the class set, the form never appears in the form block preview. * * @param string $form + * * @return string */ private static function maybe_remove_fade_on_load_for_block_preview( $form ) { diff --git a/classes/controllers/FrmStylesController.php b/classes/controllers/FrmStylesController.php index 8dc39adf18..63b26092b2 100644 --- a/classes/controllers/FrmStylesController.php +++ b/classes/controllers/FrmStylesController.php @@ -168,6 +168,7 @@ function () { /** * @param string $register Either 'enqueue' or 'register'. * @param bool $force True to enqueue/register the style if a form has not been loaded. + * * @return void */ public static function enqueue_css( $register = 'enqueue', $force = false ) { @@ -230,6 +231,7 @@ public static function custom_stylesheet() { /** * @param array $stylesheet_urls + * * @return void */ private static function get_url_to_custom_style( &$stylesheet_urls ) { @@ -282,6 +284,7 @@ private static function get_css_version( $css_key, $version ) { /** * @param string $tag * @param string $handle + * * @return string */ public static function add_tags_to_css( $tag, $handle ) { @@ -412,6 +415,7 @@ private static function get_style_id_for_styler() { * @since 6.0 * * @param int $style_id + * * @return int */ private static function get_form_id_for_style( $style_id ) { @@ -550,6 +554,7 @@ private static function save_form_style() { * Validate that we're assigning a form to a style that actually exists before assigning it to a form. * * @param int $style_id + * * @return bool True if the style actually exists. */ private static function confirm_style_exists_before_setting( $style_id ) { @@ -591,6 +596,7 @@ private static function setup_styles_and_scripts_for_styler() { * @param stdClass|WP_Post $active_style * @param stdClass $form * @param WP_Post $default_style + * * @return void */ private static function render_style_page( $active_style, $form, $default_style ) { @@ -667,6 +673,7 @@ private static function get_views_path() { * @since 6.0 * * @param stdClass|WP_Post $style A new style is not a WP_Post object. + * * @return void */ private static function force_form_style( $style ) { @@ -740,6 +747,7 @@ public static function save() { * @since 6.0 * * @param array $ids + * * @return void */ private static function maybe_redirect_after_save( $ids ) { @@ -775,6 +783,7 @@ private static function maybe_redirect_after_save( $ids ) { * * @param string $message * @param array|object $forms + * * @return void */ public static function manage( $message = '', $forms = array() ) { @@ -817,6 +826,7 @@ private static function manage_styles() { * Echo content for the Custom CSS page. * * @param string $message + * * @return void */ public static function custom_css( $message = '' ) { @@ -1025,6 +1035,7 @@ public static function add_meta_boxes() { /** * @param array $atts * @param array $sec + * * @return void */ public static function include_style_section( $atts, $sec ) { @@ -1108,6 +1119,7 @@ public static function maybe_hide_sample_form_error_message() { * @since 4.11.03 * * @param string $css CSS content. + * * @return string */ public static function replace_relative_url( $css ) { @@ -1166,6 +1178,7 @@ public static function get_style_opts() { * Get the style post object for a target form. * * @param bool|object|string $form + * * @return WP_Post|null */ public static function get_form_style( $form = 'default' ) { @@ -1203,6 +1216,7 @@ public static function get_form_style_class( $class, $style ) { /** * @since 3.0 + * * @param object $style * @param string $class * @@ -1402,6 +1416,7 @@ public static function rename_style() { * @since 6.0 * * @param WP_Styles $styles + * * @return void */ public static function disable_conflicting_wp_admin_css( $styles ) { diff --git a/classes/controllers/FrmTestModeController.php b/classes/controllers/FrmTestModeController.php index 787561d091..39adad21ce 100644 --- a/classes/controllers/FrmTestModeController.php +++ b/classes/controllers/FrmTestModeController.php @@ -14,6 +14,7 @@ class FrmTestModeController { * @since 6.25 * * @param string $html + * * @return string */ public static function maybe_add_test_mode_container( $html ) { @@ -188,6 +189,7 @@ private static function get_form_key_from_request() { * @since 6.25 * * @param array $form_actions + * * @return array */ private static function get_enabled_form_action_ids( $form_actions ) { diff --git a/classes/controllers/FrmUsageController.php b/classes/controllers/FrmUsageController.php index f0562216cd..44387759b5 100644 --- a/classes/controllers/FrmUsageController.php +++ b/classes/controllers/FrmUsageController.php @@ -5,6 +5,7 @@ /** * @todo Show opt-in popup after plugin activation. + * * @since 3.06.04 */ class FrmUsageController { @@ -58,6 +59,7 @@ public static function schedule_send() { * @since 3.06.04 * * @param array $schedules Schedules. + * * @return array */ public static function add_schedules( $schedules = array() ) { diff --git a/classes/controllers/FrmWelcomeTourController.php b/classes/controllers/FrmWelcomeTourController.php index f40a8ec98c..540abee0a3 100644 --- a/classes/controllers/FrmWelcomeTourController.php +++ b/classes/controllers/FrmWelcomeTourController.php @@ -198,6 +198,7 @@ private static function get_steps() { * * @param array $steps The steps to fill. * @param array $steps_keys The steps keys. + * * @return array The steps with the completed data. */ private static function fill_step_completed_data( $steps, $steps_keys ) { @@ -460,6 +461,7 @@ public static function mark_styler_step_as_completed() { * Adds custom classes to the existing string of admin body classes. * * @param string $classes Existing body classes. + * * @return string Updated list of body classes, including the newly added classes. */ public static function add_admin_body_classes( $classes ) { @@ -544,6 +546,7 @@ public static function get_checklist() { * Build a tracked URL with UTM parameters and affiliate tracking. * * @param string $url The base URL to process. + * * @return string The processed URL with UTM parameters and affiliate tracking. */ public static function make_tracked_url( $url ) { diff --git a/classes/controllers/FrmXMLController.php b/classes/controllers/FrmXMLController.php index b6b4216fdd..605c6fe79f 100644 --- a/classes/controllers/FrmXMLController.php +++ b/classes/controllers/FrmXMLController.php @@ -41,6 +41,7 @@ public static function add_default_templates() { * Use the template link to install the XML template * * @since 3.06 + * * @return void */ public static function install_template() { @@ -131,6 +132,7 @@ public static function install_template() { * This is to make sure that the URL can't be exploited for a SSRF attack. * * @since 5.5.5 + * * @param string $url * * @return bool True on success, False on error. @@ -197,6 +199,7 @@ private static function get_selected_in_form( $form, $value = 'form' ) { * @since 4.06.02 * * @param array $form The posted form values. + * * @return array|null The array of created pages. */ private static function create_pages_for_import( $form ) { @@ -250,6 +253,7 @@ private static function create_pages_for_import( $form ) { * @since 3.06 * * @param object $xml The values included in the XML. + * * @return void */ private static function set_new_form_name( &$xml ) { @@ -564,7 +568,9 @@ public static function generate_xml( $type, $args = array() ) { * Returns an array that has parent term slugs for the terms provided. * * @since 6.8.3 + * * @param array $terms + * * @return array */ public static function get_parent_terms_slugs( $terms ) { @@ -585,6 +591,7 @@ public static function get_parent_terms_slugs( $terms ) { * Prepare the types array. * * @param array $type + * * @return void */ private static function prepare_types_array( &$type ) { @@ -608,6 +615,7 @@ private static function prepare_types_array( &$type ) { * * @param array $args * @param array $records + * * @return string */ private static function get_file_name( $args, $records ) { @@ -664,6 +672,7 @@ public static function generate_csv( $atts ) { * @param false|int|string $form_id * @param string $search * @param string $fid + * * @return void */ public static function csv( $form_id = false, $search = '', $fid = '' ) { diff --git a/classes/factories/FrmCaptchaFactory.php b/classes/factories/FrmCaptchaFactory.php index 8b6e0ae52d..b20aa33421 100644 --- a/classes/factories/FrmCaptchaFactory.php +++ b/classes/factories/FrmCaptchaFactory.php @@ -14,6 +14,7 @@ class FrmCaptchaFactory { * @since 6.8.4 * * @param string $captcha_type Either 'active', 'recaptcha', 'hcaptcha' or 'turnstile'. If active, the global setting will be used. + * * @return FrmFieldCaptchaSettings */ public static function get_settings_object( $captcha_type = 'active' ) { @@ -32,6 +33,7 @@ public static function get_settings_object( $captcha_type = 'active' ) { * @since 6.8.4 * * @param string $active_captcha + * * @return string */ private static function get_settings_class( $active_captcha ) { diff --git a/classes/factories/FrmFieldFactory.php b/classes/factories/FrmFieldFactory.php index 831f120153..7df41ce9a9 100644 --- a/classes/factories/FrmFieldFactory.php +++ b/classes/factories/FrmFieldFactory.php @@ -36,6 +36,7 @@ public static function create_field_value_selector( $field_id, $args ) { * @since 3.0 * * @param array|object $field + * * @return FrmFieldType */ public static function get_field_factory( $field ) { @@ -121,6 +122,7 @@ private static function get_field_type_class( $field_type ) { * @since 3.0 * * @param string $type + * * @return mixed */ public static function field_has_html( $type ) { diff --git a/classes/helpers/FrmAddonsHelper.php b/classes/helpers/FrmAddonsHelper.php index d7994a266e..c955d58a8e 100644 --- a/classes/helpers/FrmAddonsHelper.php +++ b/classes/helpers/FrmAddonsHelper.php @@ -26,6 +26,7 @@ class FrmAddonsHelper { * Show the CTA to upgrade or renew. * * @since 6.15 + * * @return void */ public static function show_upgrade_renew_cta() { @@ -48,6 +49,7 @@ public static function show_upgrade_renew_cta() { * Show 'Renew' banner for expired users. * * @since 6.15 + * * @return void */ private static function show_expired_cta() { @@ -68,6 +70,7 @@ private static function show_expired_cta() { * Show 'Upgrade to Pro' banner for users not connected to Pro. * * @since 6.15 + * * @return void */ private static function show_lite_cta() { @@ -93,6 +96,7 @@ private static function show_lite_cta() { * Show 'Upgrade' banner for non-elite users. * * @since 6.15 + * * @return void */ private static function show_elite_cta() { @@ -121,6 +125,7 @@ private static function show_elite_cta() { * Displays a reconnect link for checking add-ons status. * * @since 6.15 + * * @return void */ public static function get_reconnect_link() { @@ -141,7 +146,9 @@ public static function get_reconnect_link() { * Get the icon for a specific addon. * * @since 6.15 + * * @param string $slug The slug of the addon. + * * @return void */ public static function get_addon_icon( $slug ) { @@ -185,6 +192,7 @@ public static function get_addon_icon( $slug ) { * @since 6.15 * * @param array $addon + * * @return void */ public static function add_addon_attributes( $addon ) { @@ -216,6 +224,7 @@ public static function add_addon_attributes( $addon ) { * @since 6.15 * * @param array $addon + * * @return string */ private static function prepare_single_addon_classes( $addon ) { @@ -249,6 +258,7 @@ public static function is_locked() { * @since 6.15 * * @param array $addon The addon array that will be modified by reference. + * * @return void */ private static function set_plan_required( $addon ) { @@ -272,6 +282,7 @@ public static function get_plan() { * @since 6.17 * * @param string $color Star color. + * * @return void */ public static function show_five_star_rating( $color = 'black' ) { @@ -307,6 +318,7 @@ public static function guarantee_icon() { * * @param string $count Review count. * @param string $site Site name. + * * @return string */ public static function get_reviews_text( $count, $site ) { diff --git a/classes/helpers/FrmApiHelper.php b/classes/helpers/FrmApiHelper.php index d71c91ff34..9d0255552b 100644 --- a/classes/helpers/FrmApiHelper.php +++ b/classes/helpers/FrmApiHelper.php @@ -14,6 +14,7 @@ class FrmApiHelper { * @since 6.17 * * @param array $item Inbox or Sale item. + * * @return bool */ public static function is_for_user( $item ) { @@ -43,6 +44,7 @@ public static function is_for_user( $item ) { * @since 6.17 * * @param array $who + * * @return bool */ private static function is_for_everyone( $who ) { @@ -53,6 +55,7 @@ private static function is_for_everyone( $who ) { * @since 6.17 * * @param array $who + * * @return bool */ private static function is_user_type( $who ) { @@ -124,6 +127,7 @@ private static function is_free() { * @since 6.18 * * @param array $who + * * @return bool */ private static function check_free_segments( $who ) { @@ -161,6 +165,7 @@ private static function check_free_segments( $who ) { * * @param string $key * @param int $activation_timestamp + * * @return bool */ private static function matches_segment( $key, $activation_timestamp ) { diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 5532801bee..63dfd12232 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -86,6 +86,7 @@ public static function site_url() { * Used for [sitename] shortcode * * @since 2.0 + * * @return string */ public static function site_name() { @@ -94,6 +95,7 @@ public static function site_name() { /** * @param string $url + * * @return string */ public static function make_affiliate_url( $url ) { @@ -171,6 +173,7 @@ public static function admin_upgrade_link( $args, $page = '' ) { * * @param array $query_args * @param string $link + * * @return array */ private static function maybe_add_utm_license( $query_args, $link = '' ) { @@ -191,6 +194,7 @@ private static function maybe_add_utm_license( $query_args, $link = '' ) { * @since x.x * * @param string $link + * * @return string */ private static function pull_medium_from_link( $link ) { @@ -226,6 +230,7 @@ private static function get_utm_medium() { * @since 6.25.1 * * @param array $args + * * @return array */ private static function adjust_legacy_utm_args( $args ) { @@ -274,6 +279,7 @@ public static function maybe_add_missing_utm( $cta_link, $utm ) { * @since 2.0 * * @param array $args - May include the form id when values need translation. + * * @return FrmSettings $frm_settings */ public static function get_settings( $args = array() ) { @@ -318,6 +324,7 @@ public static function is_formidable_branding() { * @since 3.05 * * @param array $atts + * * @return string */ public static function svg_logo( $atts = array() ) { @@ -339,6 +346,7 @@ public static function svg_logo( $atts = array() ) { * @since 4.0 * * @param array $atts + * * @return void */ public static function show_logo( $atts = array() ) { @@ -444,6 +452,7 @@ public static function is_formidable_admin() { * @since 6.19 * * @param string $page The name of the page to check. + * * @return bool */ public static function is_admin_list_page( $page = 'formidable' ) { @@ -558,6 +567,7 @@ public static function js_suffix() { /** * @since 2.0.8 + * * @return bool */ public static function prevent_caching() { @@ -577,6 +587,7 @@ public static function is_admin() { /** * @since 6.0 + * * @param bool $is_admin */ return apply_filters( 'frm_is_admin', $is_admin ); @@ -599,6 +610,7 @@ public static function is_empty_value( $value, $empty = '' ) { /** * @param mixed $value * @param string $empty + * * @return bool */ public static function is_not_empty_value( $value, $empty = '' ) { @@ -764,6 +776,7 @@ public static function get_param( $param, $default = '', $src = 'get', $sanitize * @param mixed $default The default if nothing is being sent. * @param callable|string $sanitize Make sure to pass a sanitize method here. This function will NOT sanitize by default. * @param bool $serialized + * * @return mixed */ public static function get_post_param( $param, $default = '', $sanitize = '', $serialized = false ) { @@ -866,6 +879,7 @@ public static function preserve_backslashes( $value ) { * * @param callable $sanitize * @param mixed $value + * * @return void */ public static function sanitize_value( $sanitize, &$value ) { @@ -908,6 +922,7 @@ public static function sanitize_request( $sanitize_method, &$values ) { * @since 4.0.04 * * @param mixed $value + * * @return void */ public static function sanitize_with_html( &$value ) { @@ -1037,6 +1052,7 @@ public static function kses( $value, $allowed = array() ) { * * @param string $value The value to sanitize and output. * @param array|string $allowed Allowed HTML tags and attributes. + * * @return void */ public static function kses_echo( $value, $allowed = array() ) { @@ -1049,6 +1065,7 @@ public static function kses_echo( $value, $allowed = array() ) { * @since 5.0.13 * * @param string $html + * * @return string */ public static function kses_submit_button( $html ) { @@ -1082,6 +1099,7 @@ public static function kses_submit_button( $html ) { * @since 5.0.13 * * @param array $allowed_attr + * * @return array */ public static function allow_visibility_style( $allowed_attr ) { @@ -1093,6 +1111,7 @@ public static function allow_visibility_style( $allowed_attr ) { * @since 5.0.13 * * @param array $allowed_html + * * @return array */ public static function add_allowed_submit_button_tags( $allowed_html ) { @@ -1113,6 +1132,7 @@ public static function add_allowed_submit_button_tags( $allowed_html ) { * @since 2.05.03 * * @param array|string $allowed + * * @return array */ private static function allowed_html( $allowed ) { @@ -1324,6 +1344,7 @@ public static function get_query_var( $value, $param ) { * * @param string $class * @param array $atts + * * @return string|null */ public static function icon_by_class( $class, $atts = array() ) { @@ -1371,6 +1392,7 @@ public static function icon_by_class( $class, $atts = array() ) { * @since 5.0.13 * * @param string $icon + * * @return string */ public static function kses_icon( $icon ) { @@ -1388,6 +1410,7 @@ public static function kses_icon( $icon ) { * @since 5.0.13.1 * * @param array $allowed_html + * * @return array */ public static function add_allowed_icon_tags( $allowed_html ) { @@ -1401,6 +1424,7 @@ public static function add_allowed_icon_tags( $allowed_html ) { * @since 5.0.13 * * @param array $allowed_attr + * * @return array */ public static function allow_vars_in_styles( $allowed_attr ) { @@ -1426,6 +1450,7 @@ public static function allow_style( $allow_css, $css_string ) { * @since 5.0.13 * * @param string $value + * * @return bool */ private static function is_a_valid_color( $value ) { @@ -1444,6 +1469,7 @@ private static function is_a_valid_color( $value ) { * Include svg images. * * @since 4.0.02 + * * @return void */ public static function include_svg() { @@ -1464,6 +1490,7 @@ public static function include_svg() { * * @param array $atts * @param bool $echo + * * @return string|void */ public static function array_to_html_params( $atts, $echo = false ) { @@ -1484,6 +1511,7 @@ public static function array_to_html_params( $atts, $echo = false ) { * * @param Closure $echo_function * @param bool $echo + * * @return string|null */ public static function clip( $echo_function, $echo = false ) { @@ -1506,6 +1534,7 @@ public static function clip( $echo_function, $echo = false ) { * @since 3.0 * * @param array $atts + * * @return void */ public static function get_admin_header( $atts ) { @@ -1524,6 +1553,7 @@ public static function get_admin_header( $atts ) { * @since 6.0 * * @param string $type + * * @return void */ public static function import_link( $type = 'secondary' ) { @@ -1540,6 +1570,7 @@ public static function import_link( $type = 'secondary' ) { * @since 5.4.2 * * @param bool $should_show_lite_upgrade + * * @return void */ public static function print_admin_banner( $should_show_lite_upgrade ) { @@ -1600,6 +1631,7 @@ private static function maybe_show_license_warning() { * Render a button for a new item (Form, Application, etc). * * @since 3.0 + * * @param array $atts { * Details about the button. * @@ -1608,6 +1640,7 @@ private static function maybe_show_license_warning() { * @type string $class Custom class names, space separated. * @type string $button_text Button text. Default "Add New". * } + * * @return void */ public static function add_new_item_link( $atts ) { @@ -1637,6 +1670,7 @@ public static function add_new_item_link( $atts ) { * @since 3.06 * * @param array $atts + * * @return void */ public static function show_search_box( $atts ) { @@ -1699,6 +1733,7 @@ public static function show_search_box( $atts ) { /** * @param string $type Hook type slug. * @param object|null $object Optional related object. + * * @return void */ public static function trigger_hook_load( $type, $object = null ) { @@ -1779,6 +1814,7 @@ public static function is_true( $value ) { * @since 4.10.01 Add `$post_type` argument. * * @param string $post_type Post type to query. Default is `page`. + * * @return WP_Post[] */ public static function get_pages( $post_type = 'page' ) { @@ -1799,6 +1835,7 @@ public static function get_pages( $post_type = 'page' ) { * @since 5.0.09 * * @param string $post_type Post type to query. Default is `page`. + * * @return array */ public static function get_post_ids_and_titles( $post_type = 'page' ) { @@ -1935,6 +1972,7 @@ public static function maybe_autocomplete_options( $args ) { * @param array|string $option Autocomplete option. * @param string $key Array key of the option. * @param array $args See {@see FrmAppHelper::maybe_autocomplete_options()}. + * * @return array */ private static function get_dropdown_value_and_label_from_option( $option, $key, $args ) { @@ -2002,6 +2040,7 @@ private static function prep_page_dropdown_params( $page_id, $truncate, &$args ) * @since 4.10.01 Added `post_type` and `autocomplete_placeholder` to the arguments array. * * @param array $args + * * @return array */ private static function preformat_selection_args( $args ) { @@ -2055,6 +2094,7 @@ public static function is_full_screen() { * @since 6.0 Added the $view parameter. Previously there was only a 'edit' view. * * @param string $view Supports 'edit', 'list', and ''. If '', both 'edit' and 'list' will match. + * * @return bool */ public static function is_style_editor_page( $view = '' ) { @@ -2104,6 +2144,7 @@ class="frm_multiselect"> /** * @since 4.07 + * * @param array|string $selected * @param string $current */ @@ -2142,6 +2183,7 @@ public static function roles_options( $capability ) { * @since 5.0 Parameter `$type` supports `pro_only` value. * * @param string $type Supports `auto`, `pro`, or `pro_only`. + * * @return array */ public static function frm_capabilities( $type = 'auto' ) { @@ -2221,6 +2263,7 @@ public static function current_user_can( $role ) { /** * @param array|string $needed_role + * * @return bool */ public static function user_has_permission( $needed_role ) { @@ -2280,6 +2323,7 @@ public static function maybe_add_permissions() { * @since 2.0.6 * * @param string $cap + * * @return void */ public static function force_capability( $cap = 'frm_change_settings' ) { @@ -2405,8 +2449,10 @@ public static function recursive_function_map( $value, $function ) { * Updates value to empty string if it is null and being passed to a string function. * * @since 6.8.4 + * * @param mixed $value * @param string $function + * * @return mixed */ private static function maybe_update_value_if_null( $value, $function ) { @@ -2456,6 +2502,7 @@ public static function array_flatten( $array, $keys = 'keep' ) { * * @param string $sep * @param array $array + * * @return string */ public static function safe_implode( $sep, $array ) { @@ -2466,6 +2513,7 @@ public static function safe_implode( $sep, $array ) { /** * @param string $text * @param bool $is_rich_text + * * @return string */ public static function esc_textarea( $text, $is_rich_text = false ) { @@ -2488,6 +2536,7 @@ public static function esc_textarea( $text, $is_rich_text = false ) { * @since 2.0 * * @param mixed $content + * * @return mixed */ public static function use_wpautop( $content ) { @@ -2518,6 +2567,7 @@ public static function replace_quotes( $val ) { /** * @param string $handle * @param int|string $default + * * @return int|string */ public static function script_version( $handle, $default = 0 ) { @@ -2544,6 +2594,7 @@ public static function script_version( $handle, $default = 0 ) { * * @param string $url * @param bool $echo + * * @return string|null */ public static function js_redirect( $url, $echo = false ) { @@ -2585,6 +2636,7 @@ public static function get_user_id_param( $user_id ) { /** * @param string $filename * @param array $atts + * * @return false|string */ public static function get_file_contents( $filename, $atts = array() ) { @@ -2662,6 +2714,7 @@ public static function get_unique_key( $name, $table_name, $column, $id = 0, $nu * * @param string $column * @param string $key + * * @return string */ private static function maybe_truncate_key_before_appending( $column, $key ) { @@ -2682,6 +2735,7 @@ private static function maybe_truncate_key_before_appending( $column, $key ) { * * @param string $key * @param string $column + * * @return string either the original key value, or an empty string if the key was too long. */ private static function maybe_clear_long_key( $key, $column ) { @@ -2695,6 +2749,7 @@ private static function maybe_clear_long_key( $key, $column ) { * @since 6.21 This is changed from `private` to `public`. * * @param int $num_chars + * * @return string */ public static function generate_new_key( $num_chars ) { @@ -2707,6 +2762,7 @@ public static function generate_new_key( $num_chars ) { /** * @param string $key + * * @return string */ private static function prevent_numeric_and_reserved_keys( $key ) { @@ -2967,6 +3023,7 @@ public static function custom_style_value( $post_values ) { * @param int|string $length * @param int $minword * @param string $continue + * * @return string */ public static function truncate( $original_string, $length, $minword = 3, $continue = '...' ) { @@ -3025,6 +3082,7 @@ public static function truncate( $original_string, $length, $minword = 3, $conti * * @param string $sub Current substring. * @param int $length The length limit. + * * @return string */ private static function maybe_force_truncate_on_string_with_no_spaces( $sub, $length ) { @@ -3092,6 +3150,7 @@ public static function get_formatted_time( $date, $date_format = '', $time_forma /** * @param string $time_format * @param string $date + * * @return string */ private static function add_time_to_date( $time_format, $date ) { @@ -3261,6 +3320,7 @@ private static function get_unit( $unit ) { * in case languages are changing for the unit set in the shortcode. * * @since 2.0.20 + * * @return array */ private static function get_time_strings() { @@ -3309,6 +3369,7 @@ private static function get_time_strings() { * @param int $r_count * @param int $current_p * @param int $p_size + * * @return int */ public static function get_last_record_num( $r_count, $current_p, $p_size ) { @@ -3319,6 +3380,7 @@ public static function get_last_record_num( $r_count, $current_p, $p_size ) { * @param int $r_count * @param int $current_p * @param int $p_size + * * @return int */ public static function get_first_record_num( $r_count, $current_p, $p_size ) { @@ -3527,6 +3589,7 @@ private static function prepare_action_slashes( $val, $key, &$post_content ) { * @since 4.02.03 * * @param array|string $value + * * @return void */ public static function unserialize_or_decode( &$value ) { @@ -3548,6 +3611,7 @@ public static function unserialize_or_decode( &$value ) { * @since 6.2 * * @param mixed $value + * * @return mixed */ public static function maybe_unserialize_array( $value ) { @@ -3574,6 +3638,7 @@ public static function maybe_unserialize_array( $value ) { * * @param mixed $string * @param bool $single_to_array + * * @return mixed */ public static function maybe_json_decode( $string, $single_to_array = true ) { @@ -3600,6 +3665,7 @@ public static function maybe_json_decode( $string, $single_to_array = true ) { * @since 6.2.3 * * @param string $value + * * @return string */ public static function maybe_utf8_encode( $value ) { @@ -3630,6 +3696,7 @@ public static function maybe_utf8_encode( $value ) { * @since 4.02.03 * * @param array $form + * * @return void */ public static function format_form_data( &$form ) { @@ -3658,6 +3725,7 @@ public static function format_form_data( &$form ) { * @since 4.02.03 * * @param array|string $value + * * @return string */ public static function maybe_json_encode( $value ) { @@ -3673,6 +3741,7 @@ public static function maybe_json_encode( $value ) { * @since 1.07.10 * * @param string $post_type The name of the post type that may need to be highlighted. + * * @return void */ public static function maybe_highlight_menu( $post_type ) { @@ -3696,6 +3765,7 @@ public static function maybe_highlight_menu( $post_type ) { * @since 2.0 * * @param bool $load + * * @return void */ public static function load_admin_wide_js( $load = true ) { @@ -3723,6 +3793,7 @@ public static function load_admin_wide_js( $load = true ) { /** * @since 2.0.9 + * * @return void */ public static function load_font_style() { @@ -3731,6 +3802,7 @@ public static function load_font_style() { /** * @param string $location + * * @return void */ public static function localize_script( $location ) { @@ -3894,6 +3966,7 @@ public static function should_include_alert_role_on_field_errors() { * @since 1.07.10 * * @param float $min_version The version the add-on requires. + * * @return void */ public static function min_version_notice( $min_version ) { @@ -3916,6 +3989,7 @@ public static function min_version_notice( $min_version ) { * @since 4.0.01 * * @param string $min_version + * * @return void */ public static function min_pro_version_notice( $min_version ) { @@ -3940,6 +4014,7 @@ public static function min_pro_version_notice( $min_version ) { * @since 4.0.01 * * @param string $min_version + * * @return bool */ public static function meets_min_pro_version( $min_version ) { @@ -3950,6 +4025,7 @@ public static function meets_min_pro_version( $min_version ) { * Show a message if the PHP version is below the recommendations. * * @since 4.0.02 + * * @return void */ private static function php_version_notice() { @@ -3969,6 +4045,7 @@ private static function php_version_notice() { /** * @param string $type + * * @return array */ public static function locales( $type = 'date' ) { @@ -4080,6 +4157,7 @@ public static function locales( $type = 'date' ) { * * @param array $locales * @param array $args { + * * @type string $type * } */ @@ -4141,6 +4219,7 @@ public static function images_dropdown( $args ) { * @since 5.0.04 * * @param array $args The arguments. + * * @return array */ private static function fill_default_images_dropdown_args( $args ) { @@ -4172,6 +4251,7 @@ private static function fill_default_images_dropdown_args( $args ) { * @since 5.0.04 * * @param array $args The arguments. + * * @return string */ private static function get_images_dropdown_input_attrs( $args ) { @@ -4217,6 +4297,7 @@ public static function get_images_dropdown_atts( $option, $args ) { * * @param array $option Option data. * @param array $args The arguments of images_dropdown() method. + * * @return string */ private static function get_images_dropdown_option_image( $option, $args ) { @@ -4247,6 +4328,7 @@ private static function get_images_dropdown_option_image( $option, $args ) { * * @param array $option Option data. * @param array $args The arguments of images_dropdown() method. + * * @return string */ private static function get_images_dropdown_option_classes( $option, $args ) { @@ -4276,6 +4358,7 @@ private static function get_images_dropdown_option_classes( $option, $args ) { * * @param array $option Option data. * @param array $args The arguments of images_dropdown() method. + * * @return string */ private static function get_images_dropdown_option_html_attrs( $option, $args ) { @@ -4344,6 +4427,7 @@ public static function should_never_allow_unfiltered_html() { * * @param array $values * @param array $keys + * * @return array */ public static function maybe_filter_array( $values, $keys ) { @@ -4370,6 +4454,7 @@ public static function maybe_filter_array( $values, $keys ) { * * @param string $value * @param array|string $allowed 'all' for everything included as defaults. + * * @return string */ public static function maybe_kses( $value, $allowed = 'all' ) { @@ -4386,6 +4471,7 @@ public static function maybe_kses( $value, $allowed = 'all' ) { * * @param string $key * @param string $context Either 'display' or 'update'. On update, we want to allow a few keys that are never displayed. + * * @return bool */ public static function input_key_is_safe( $key, $context = 'display' ) { @@ -4456,6 +4542,7 @@ public static function get_landing_page_upgrade_data_params( $medium = 'landing' * @since 5.0.17 * * @param string $feature + * * @return bool */ public static function show_new_feature( $feature ) { @@ -4471,6 +4558,7 @@ public static function show_new_feature( $feature ) { * @param string $plugin The plugin slug to get installation data for. * @param array $params Initial parameters for the upgrade data. * @param bool $detailed Whether to include detailed information. + * * @return array Modified parameters with installation data. */ public static function get_upgrade_data_params( $plugin, $params, $detailed = false ) { @@ -4503,6 +4591,7 @@ public static function get_upgrade_data_params( $plugin, $params, $detailed = fa * @since 5.0.17 * * @param string $text + * * @return bool */ public static function ctype_xdigit( $text ) { @@ -4546,6 +4635,7 @@ public static function show_pill_text( $text = null ) { * @since 5.2.07 * * @param mixed $num Number. + * * @return false|int Returns `false` if the passed parameter is not number. */ public static function count_decimals( $num ) { @@ -4638,6 +4728,7 @@ public static function get_plugins() { * * @param string $url * @param string $expected_extension + * * @return bool */ public static function validate_url_is_in_s3_bucket( $url, $expected_extension ) { @@ -4669,6 +4760,7 @@ public static function validate_url_is_in_s3_bucket( $url, $expected_extension ) * * @param string $message The warning message to display. * @param string $option The unique identifier for the dismissal state of the message and the WP Ajax action. + * * @return void */ public static function add_dismissable_warning_message( $message = '', $option = '' ) { @@ -4713,6 +4805,7 @@ function ( $show_messages ) use ( $message, $option ) { * @since 6.3 * * @param string $option The unique identifier for the dismissal state of the message. + * * @return void */ public static function dismiss_warning_message( $option = '' ) { @@ -4744,6 +4837,7 @@ public static function copy_for_lite_license() { * Removes scripts that are unnecessarily loaded across the pages! * * @since 6.9 + * * @return void */ public static function dequeue_extra_global_scripts() { @@ -4842,6 +4936,7 @@ public static function no_gdpr_cookies() { * @since 6.24 * * @param string $string The string to check. + * * @return bool */ public static function is_valid_utf8( $string ) { diff --git a/classes/helpers/FrmCSVExportHelper.php b/classes/helpers/FrmCSVExportHelper.php index c0c65c3b04..71235953ad 100644 --- a/classes/helpers/FrmCSVExportHelper.php +++ b/classes/helpers/FrmCSVExportHelper.php @@ -125,6 +125,7 @@ public static function csv_format_options() { /** * @param array $atts + * * @return false|string|null returns a string file path or false if $atts['mode'] is set to 'file'. */ public static function generate_csv( $atts ) { @@ -203,6 +204,7 @@ public static function generate_csv( $atts ) { * @since 6.8.4 * * @param array $atts + * * @return void */ private static function after_generate_csv( $atts ) { @@ -210,6 +212,7 @@ private static function after_generate_csv( $atts ) { * @since 6.8.4 * * @param array $atts { + * * @type object $form * @type array $entry_ids * @type array $form_cols @@ -222,6 +225,7 @@ private static function after_generate_csv( $atts ) { * @since 5.0.16 * * @param stdClass $form + * * @return string */ private static function generate_csv_filename( $form ) { @@ -464,6 +468,7 @@ private static function csv_headings( &$headings ) { /** * @param object $field + * * @return bool */ private static function is_the_child_of_a_repeater( $field ) { @@ -594,6 +599,7 @@ private static function add_repeat_field_values_to_csv( &$entries ) { * * @param array $metas * @param array $entries + * * @return array */ private static function fill_missing_repeater_metas( $metas, &$entries ) { @@ -690,6 +696,7 @@ private static function add_field_values_to_csv( &$row ) { * * @param mixed $field_value * @param stdClass $field + * * @return string */ private static function get_separate_value_label( $field_value, $field ) { @@ -712,6 +719,7 @@ private static function get_separate_value_label( $field_value, $field ) { * * @param array $row * @param array $atts + * * @return void */ private static function add_array_values_to_columns( &$row, $atts ) { @@ -848,7 +856,9 @@ public static function encode_value( $line ) { * Escape a " in a csv with another " * * @since 2.0 + * * @param mixed $value + * * @return mixed */ public static function escape_csv( $value ) { diff --git a/classes/helpers/FrmCurrencyHelper.php b/classes/helpers/FrmCurrencyHelper.php index 48ecd6bec8..892f504d8d 100644 --- a/classes/helpers/FrmCurrencyHelper.php +++ b/classes/helpers/FrmCurrencyHelper.php @@ -11,6 +11,7 @@ class FrmCurrencyHelper { /** * @param string $currency + * * @return array */ public static function get_currency( $currency ) { @@ -32,6 +33,7 @@ public static function get_currency( $currency ) { * @since 6.18 * * @param string $format_value The format value to check. + * * @return bool */ public static function is_currency_format( $format_value ) { diff --git a/classes/helpers/FrmDashboardHelper.php b/classes/helpers/FrmDashboardHelper.php index cd2ed33fca..128571c853 100644 --- a/classes/helpers/FrmDashboardHelper.php +++ b/classes/helpers/FrmDashboardHelper.php @@ -361,6 +361,7 @@ public static function load_entries_template( $template ) { * Dashboard - load the entries list template. * * @param array $template + * * @return void */ private static function load_entries_list_template( $template ) { diff --git a/classes/helpers/FrmEmailCollectionHelper.php b/classes/helpers/FrmEmailCollectionHelper.php index 785234342a..af8614da3a 100644 --- a/classes/helpers/FrmEmailCollectionHelper.php +++ b/classes/helpers/FrmEmailCollectionHelper.php @@ -22,6 +22,7 @@ class FrmEmailCollectionHelper { * @since 6.25 * * @param string $email The email address to subscribe to ActiveCampaign. + * * @return void */ public static function subscribe_to_active_campaign( $email = '' ) { @@ -64,6 +65,7 @@ public static function subscribe_to_active_campaign( $email = '' ) { * @since 6.25 * * @param string $email The email address to check. + * * @return bool True if the email is fake/test, false if valid. */ public static function is_fake_email( $email ) { diff --git a/classes/helpers/FrmEmailSummaryHelper.php b/classes/helpers/FrmEmailSummaryHelper.php index 29511f4f59..4402b29105 100644 --- a/classes/helpers/FrmEmailSummaryHelper.php +++ b/classes/helpers/FrmEmailSummaryHelper.php @@ -3,6 +3,7 @@ * In-plugin summary emails helper * * @since 6.7 + * * @package Formidable */ @@ -204,6 +205,7 @@ private static function get_renewal_date() { * Gets date object. * * @param DateTime|string $date Date string or object. + * * @return DateTime|false */ private static function get_date_obj( $date ) { @@ -219,6 +221,7 @@ private static function get_date_obj( $date ) { * * @param DateTime|string $date1 Date 1. * @param DateTime|string $date2 Date 2. + * * @return false|int */ private static function get_date_diff( $date1, $date2 ) { @@ -239,6 +242,7 @@ private static function get_date_diff( $date1, $date2 ) { * Gets sent date of the last monthly or yearly email. * * @param string $type Accepts `monthly`, `yearly`. + * * @return false|string */ public static function get_last_sent_date( $type ) { @@ -284,6 +288,7 @@ private static function get_earliest_form_created_date() { * * @param string $from_date From date. * @param string $to_date To date. + * * @return array Contains `count` and `total`. */ public static function get_payments_data( $from_date, $to_date ) { @@ -296,6 +301,7 @@ public static function get_payments_data( $from_date, $to_date ) { * * @param string $from_date From date. * @param string $to_date To date. + * * @return int */ public static function get_entries_count( $from_date, $to_date ) { @@ -318,6 +324,7 @@ public static function get_entries_count( $from_date, $to_date ) { * @param string $from_date From date. * @param string $to_date To date. * @param int $limit Limit the result. Default is 5. + * * @return array Contains `form_id`, `form_name`, and `items_count`. */ public static function get_top_forms( $from_date, $to_date, $limit = 5 ) { @@ -383,6 +390,7 @@ public static function show_comparison( $diff ) { * Gets section CSS in the email. * * @param string $border_pos Border position. Default is `top`. Set to empty if no border. + * * @return string */ public static function get_section_style( $border_pos = 'top' ) { @@ -436,6 +444,7 @@ public static function section_heading_with_icon( $icon, $text ) { * * @param string $url The URL. * @param array|string $args Custom tracking args if is array, or `utm_content` if is string. + * * @return string */ public static function get_frm_url( $url, $args = array() ) { @@ -504,6 +513,7 @@ public static function get_out_of_date_plugins() { * Processes inbox CTA button before showing in email. * * @param string $button_html Button HTML. This usually contains 1 button and 1 dismiss button. + * * @return string */ public static function process_inbox_cta_button( $button_html ) { @@ -530,6 +540,7 @@ public static function process_inbox_cta_button( $button_html ) { * Gets the localized date with the date diff from today. * * @param string $date_diff Date diff string. By default, this is empty, the result will be the current date. + * * @return string */ public static function get_date_from_today( $date_diff = '' ) { @@ -545,6 +556,7 @@ public static function get_date_from_today( $date_diff = '' ) { * @since 6.8 * * @param string $recipients Recipients. + * * @return void */ public static function maybe_remove_recipients_from_api( &$recipients ) { diff --git a/classes/helpers/FrmEntriesHelper.php b/classes/helpers/FrmEntriesHelper.php index 8447d31481..861b2738e0 100644 --- a/classes/helpers/FrmEntriesHelper.php +++ b/classes/helpers/FrmEntriesHelper.php @@ -9,6 +9,7 @@ class FrmEntriesHelper { * "Submitted" entry status. * * @since 6.4.2 + * * @var int */ const SUBMITTED_ENTRY_STATUS = 0; @@ -17,6 +18,7 @@ class FrmEntriesHelper { * "Draft" entry status. * * @since 6.4.2 + * * @var int */ const DRAFT_ENTRY_STATUS = 1; @@ -214,6 +216,7 @@ public static function replace_default_message( $message, $atts ) { * @param stdClass $entry * @param stdClass $field * @param array $atts + * * @return string */ public static function prepare_display_value( $entry, $field, $atts ) { @@ -595,6 +598,7 @@ public static function set_other_validation_val( &$value, $other_vals, $field, & * Add submitted values to a string for spam checking. * * @param array $values + * * @return string */ public static function entry_array_to_string( $values ) { @@ -697,6 +701,7 @@ public static function get_browser( $u_agent ) { * @since 3.0 * * @param array $atts Action dropdown attributes. + * * @return void */ public static function actions_dropdown( $atts ) { @@ -734,6 +739,7 @@ public static function actions_dropdown( $atts ) { * * @param int $id Entry ID. * @param array|object $entry Entry object. + * * @return array */ private static function get_action_links( $id, $entry ) { @@ -812,6 +818,7 @@ private static function get_action_links( $id, $entry ) { * Gets data attributes for PDFs addon upgrade link. * * @param string $medium The source of the upgrade link used for analytics data. + * * @return array */ private static function get_pdfs_upgrade_link_data( $medium = 'pdfs' ) { @@ -836,6 +843,7 @@ private static function get_pdfs_upgrade_link_data( $medium = 'pdfs' ) { * @since 5.0.15 * * @param int|string $entry_id + * * @return void */ public static function maybe_render_captcha_score( $entry_id ) { diff --git a/classes/helpers/FrmEntriesListHelper.php b/classes/helpers/FrmEntriesListHelper.php index 999ec0941f..08634bc4be 100644 --- a/classes/helpers/FrmEntriesListHelper.php +++ b/classes/helpers/FrmEntriesListHelper.php @@ -12,6 +12,7 @@ class FrmEntriesListHelper extends FrmListHelper { /** * @since 4.07 + * * @var bool|int */ public $total_items = 0; @@ -97,6 +98,7 @@ protected function get_entry_items( &$s_query, &$join_form_in_query ) { /** * @since 6.5.4 + * * @return string */ protected function get_order_by() { @@ -130,6 +132,7 @@ protected function get_order_by() { * @since 6.5.4 * * @param int $per_page + * * @return string */ protected function get_limit( $per_page ) { @@ -148,6 +151,7 @@ protected function get_limit( $per_page ) { * @since 6.5.4 * * @param bool $join_form_in_query + * * @return array */ protected function get_search_query( &$join_form_in_query ) { @@ -185,6 +189,7 @@ protected function get_search_query( &$join_form_in_query ) { * @since 6.5.4 * * @param int|string $form_id + * * @return array */ protected function get_form_ids( $form_id ) { @@ -307,6 +312,7 @@ protected function get_primary_column_name() { * @since 6.12 * * @param object $item + * * @return string */ private static function get_entry_label( $item ) { @@ -473,6 +479,7 @@ private function column_value( $item ) { * @since 6.11.2 * * @param string $column_name + * * @return string */ private function maybe_fix_column_name( $column_name ) { diff --git a/classes/helpers/FrmFieldGdprHelper.php b/classes/helpers/FrmFieldGdprHelper.php index 028720cc8d..8d8cfd93f6 100644 --- a/classes/helpers/FrmFieldGdprHelper.php +++ b/classes/helpers/FrmFieldGdprHelper.php @@ -3,6 +3,7 @@ * GDPR field helper * * @since 6.19 + * * @package Formidable */ @@ -19,6 +20,7 @@ class FrmFieldGdprHelper { * Field type * * @since 6.19 + * * @var string */ const FIELD_TYPE = 'gdpr'; @@ -27,6 +29,7 @@ class FrmFieldGdprHelper { * Field class * * @since 6.19 + * * @var string */ const FIELD_CLASS = 'FrmFieldGdpr'; @@ -35,6 +38,7 @@ class FrmFieldGdprHelper { * Hide GDPR field * * @since 6.19 + * * @return bool */ public static function hide_gdpr_field() { @@ -46,7 +50,9 @@ public static function hide_gdpr_field() { * Add GDPR field to form builder * * @since 6.19 + * * @param array $fields + * * @return array */ public static function add_gdpr_field( $fields ) { @@ -61,7 +67,9 @@ public static function add_gdpr_field( $fields ) { * Initialize GDPR field Class name * * @since 6.19 + * * @param string $field_type + * * @return string */ public static function get_gdpr_field_class( $field_type = '' ) { diff --git a/classes/helpers/FrmFieldGridHelper.php b/classes/helpers/FrmFieldGridHelper.php index a42d5aaff2..731ab74c26 100644 --- a/classes/helpers/FrmFieldGridHelper.php +++ b/classes/helpers/FrmFieldGridHelper.php @@ -176,6 +176,7 @@ private function begin_field_wrapper() { /** * @param string $class + * * @return int */ private static function get_size_of_class( $class ) { @@ -269,6 +270,7 @@ private function can_support_current_layout() { /** * @param string $class + * * @return bool */ private function can_support_an_additional_layout( $class ) { diff --git a/classes/helpers/FrmFieldsHelper.php b/classes/helpers/FrmFieldsHelper.php index cc6f441005..3cc3be4cb9 100644 --- a/classes/helpers/FrmFieldsHelper.php +++ b/classes/helpers/FrmFieldsHelper.php @@ -114,6 +114,7 @@ private static function fill_field_array( $field, array &$field_array ) { * @param array $field_array Field values array, passed by reference. * @param stdClass $field Field object. * @param array $args Additional arguments. + * * @return void */ public static function prepare_new_front_field( &$field_array, $field, $args = array() ) { @@ -130,6 +131,7 @@ public static function prepare_new_front_field( &$field_array, $field, $args = a * @param array|stdClass $field Field object or array. * @param int $entry_id Entry ID. * @param array $args Additional arguments. + * * @return void */ public static function prepare_edit_front_field( &$field_array, $field, $entry_id = 0, $args = array() ) { @@ -146,6 +148,7 @@ public static function prepare_edit_front_field( &$field_array, $field, $entry_i * @param array $field_array * @param stdClass $field * @param array $args + * * @return void */ private static function prepare_front_field( &$field_array, $field, $args ) { @@ -520,6 +523,7 @@ private static function maybe_replace_substrings_with_field_name( $msg, $error, * @type string $error A key including 'unique_msg', 'invalid', 'blank', or 'conf_msg'. * @type array|object $field The field with the error. * } + * * @return array */ private static function get_substrings_to_replace_with_field_name( $field_name, $filter_args ) { @@ -646,7 +650,9 @@ public static function &label_position( $position, $field, $form ) { * Check if this field type allows placeholders * * @since 2.05 + * * @param string $type + * * @return bool */ public static function is_placeholder_field_type( $type ) { @@ -741,6 +747,7 @@ private static function hidden_field_option( $field ) { * @since 4.0 * * @param array $field + * * @return string radio or checkbox */ private static function get_default_value_type( $field ) { @@ -917,6 +924,7 @@ public static function value_meets_condition( $observed_value, $cond, $hide_opt * @since 2.05 * * @param array|string $value + * * @return array|string */ private static function get_value_for_comparison( $value ) { @@ -1104,6 +1112,7 @@ public static function replace_content_shortcodes( $content, $entry, $shortcodes /** * @param string $replace_with * @param array $atts + * * @return string */ private static function trigger_shortcode_atts( $replace_with, $atts ) { @@ -1135,6 +1144,7 @@ public static function atts_remove_accents( $replace_with ) { /** * @param string $replace_with + * * @return string */ private static function atts_sanitize( $replace_with ) { @@ -1143,6 +1153,7 @@ private static function atts_sanitize( $replace_with ) { /** * @param string $replace_with + * * @return string */ private static function atts_sanitize_url( $replace_with ) { @@ -1156,6 +1167,7 @@ private static function atts_sanitize_url( $replace_with ) { * * @param array $atts Includes entry object. * @param string|null $value + * * @return void */ public static function sanitize_embedded_shortcodes( $atts, &$value ) { @@ -1423,6 +1435,7 @@ public static function get_user_display_name( $user_id, $user_info = 'display_na /** * @param string $type + * * @return array */ public static function get_field_types( $type ) { @@ -1474,6 +1487,7 @@ public static function single_input_fields() { * @param string[] $inputs * @param array $fields * @param array $field_types + * * @return void */ private static function field_types_for_input( $inputs, $fields, &$field_types ) { @@ -2328,6 +2342,7 @@ public static function convert_field_object_to_flat_array( $field ) { * @since 4.04 * * @param array $args + * * @return void */ public static function show_add_field_buttons( $args ) { @@ -2482,6 +2497,7 @@ public static function get_display_format_options( $field ) { * * @param array $field Field data. * @param array $options Options array. + * * @return array */ public static function get_display_format_args( $field, $options ) { @@ -2512,6 +2528,7 @@ public static function get_display_format_args( $field, $options ) { * * @param array $options Options. * @param array $args Arguments. + * * @return void */ private static function fill_image_setting_options( $options, &$args ) { @@ -2579,6 +2596,7 @@ private static function fill_image_setting_addon_link( $option ) { * * @param mixed $value * @param string $field_type + * * @return void */ public static function prepare_field_value( &$value, $field_type ) { @@ -2591,6 +2609,7 @@ public static function prepare_field_value( &$value, $field_type ) { * * @param int|string $form_id * @param array $field_ids If this is not empty, the results will be filtered by field id. + * * @return array */ public static function get_draft_field_results( $form_id, $field_ids = array() ) { @@ -2629,6 +2648,7 @@ function ( $row ) { * @since 6.8 * * @param int|string $form_id + * * @return array */ public static function get_all_draft_field_ids( $form_id ) { diff --git a/classes/helpers/FrmFormTemplatesHelper.php b/classes/helpers/FrmFormTemplatesHelper.php index b9ebafbcd1..7773764f8b 100644 --- a/classes/helpers/FrmFormTemplatesHelper.php +++ b/classes/helpers/FrmFormTemplatesHelper.php @@ -58,6 +58,7 @@ public static function prepare_template_details( &$template, $pricing, $license_ * * @param array $template The template data. * @param bool $expired Whether the API request is expired or not. + * * @return void */ public static function add_template_attributes( $template, $expired ) { @@ -89,6 +90,7 @@ public static function add_template_attributes( $template, $expired ) { * @since 6.7 * * @param array $template The template data. + * * @return string */ private static function prepare_single_template_classes( $template ) { @@ -114,6 +116,7 @@ private static function prepare_single_template_classes( $template ) { * @param array $template The template data. * @param bool $expired Whether the license is expired. * @param array $attributes The template attributes. + * * @return void */ private static function prepare_single_template_plan( $template, $expired, &$attributes ) { @@ -136,6 +139,7 @@ private static function prepare_single_template_plan( $template, $expired, &$att * @since 6.7 * * @param array $template The template data. + * * @return void */ public static function add_template_link_attributes( $template ) { @@ -169,6 +173,7 @@ public static function add_template_link_attributes( $template ) { * @type string $upgrade_link Upgrade link URL. * @type string $renew_link Renew link URL. * } + * * @return void */ public static function show_upgrade_renew_cta( $args ) { @@ -243,6 +248,7 @@ public static function needs_get_free_templates_banner() { * @since 6.25 * * @param array $template The template data. + * * @return bool */ private static function needs_free_plan( $template ) { diff --git a/classes/helpers/FrmFormsHelper.php b/classes/helpers/FrmFormsHelper.php index 63f2425fbe..c8e05b1eba 100644 --- a/classes/helpers/FrmFormsHelper.php +++ b/classes/helpers/FrmFormsHelper.php @@ -245,6 +245,7 @@ public static function get_sortable_classes( $col, $sort_col, $sort_dir ) { * @since 3.0 * * @param array|string $field_type + * * @return string */ public static function get_field_link_name( $field_type ) { @@ -261,6 +262,7 @@ public static function get_field_link_name( $field_type ) { * @since 3.0 * * @param array|string $field_type + * * @return string */ public static function get_field_link_icon( $field_type ) { @@ -302,6 +304,7 @@ public static function get_invalid_error_message( $args ) { * @type int $entry_id * @type string $class * } + * * @return string */ public static function get_success_message( $atts ) { @@ -673,6 +676,7 @@ public static function html_shortcodes() { * @since 4.0 * * @param array $args + * * @return void */ public static function insert_opt_html( $args ) { @@ -781,6 +785,7 @@ public static function insert_code_html( $args ) { * @since 4.0 * * @param array|string $field + * * @return void */ public static function prepare_field_type( &$field ) { @@ -1027,6 +1032,7 @@ public static function get_form_style_class( $form = false ) { * @since 5.0.12 * * @param array $form + * * @return bool */ private static function form_should_be_inline_and_missing_class( $form ) { @@ -1094,6 +1100,7 @@ private static function field_has_top_label( $field, $form ) { /** * @param array|bool|int|object|string $form + * * @return string */ public static function get_form_style( $form ) { @@ -1210,6 +1217,7 @@ public static function get_scroll_js( $form_id ) { * * @param int|object|string $form_id * @param mixed $form + * * @return array */ public static function get_action_links( $form_id, $form ) { @@ -1249,6 +1257,7 @@ public static function get_action_links( $form_id, $form ) { /** * @param int|object|string $data + * * @return string */ public static function edit_form_link( $data ) { @@ -1276,6 +1285,7 @@ public static function get_no_title_text() { /** * @param int|object|string $data + * * @return string */ public static function edit_form_link_label( $data ) { @@ -1288,6 +1298,7 @@ public static function edit_form_link_label( $data ) { /** * @param int|object|string $data + * * @return int|string */ private static function get_form_id_from_data( $data ) { @@ -1301,6 +1312,7 @@ private static function get_form_id_from_data( $data ) { /** * @param mixed $data + * * @return string */ private static function get_form_name_from_data( $data ) { @@ -1317,6 +1329,7 @@ private static function get_form_name_from_data( $data ) { * @param int $id * @param string $status * @param string $length + * * @return string */ public static function delete_trash_link( $id, $status, $length = 'label' ) { @@ -1387,6 +1400,7 @@ public static function delete_trash_info( $id, $status ) { * @since 3.0 * * @param int $id + * * @return array */ public static function delete_trash_links( $id ) { @@ -1527,6 +1541,7 @@ public static function status_nice_name( $status ) { * @param array $categories The categories to render the icon for. * @param array $atts { * Optional. An array of attributes for rendering. + * * @type string $html 'span' or 'div'. Default 'span'. * @type bool $bg Whether to add a background color or not. Default false. * } @@ -1607,6 +1622,7 @@ public static function template_icon( $categories, $atts = array() ) { * * @param array $template Template details. * @param array $args Additional arguments. + * * @return array The link attributes. */ public static function get_template_install_link( $template, $args ) { @@ -1640,6 +1656,7 @@ public static function get_template_install_link( $template, $args ) { * @since 4.02.02 * * @param array $args + * * @return bool */ public static function plan_is_allowed( $args ) { @@ -1674,6 +1691,7 @@ public static function plan_is_allowed( $args ) { * * @param string $requires * @param string $link + * * @return void */ public static function show_plan_required( $requires, $link ) { @@ -1695,6 +1713,7 @@ public static function show_plan_required( $requires, $link ) { * @since 4.0 * * @param array $item + * * @return false|string */ public static function get_plan_required( &$item ) { @@ -1721,7 +1740,9 @@ public static function get_plan_required( &$item ) { * Converts legacy package names to the current standard package name. * * @since 6.15 + * * @param string $package_name + * * @return string The updated package name. */ public static function convert_legacy_package_names( $package_name ) { @@ -1738,6 +1759,7 @@ public static function convert_legacy_package_names( $package_name ) { * @since 6.15 * * @param array $args + * * @return array */ public static function get_license_types( $args = array() ) { @@ -1924,6 +1946,7 @@ public static function reserved_words() { * * @param string $url * @param int $form_id + * * @return string */ public static function maybe_add_sanitize_url_attr( $url, $form_id ) { @@ -1999,6 +2022,7 @@ public static function publish_box_button_text() { * @since 6.16 * * @param string $classname + * * @return string */ public static function sanitize_layout_class( $classname ) { @@ -2017,6 +2041,7 @@ public static function sanitize_layout_class( $classname ) { * @since 6.20 * * @param string $form_key + * * @return bool */ public static function should_block_preview( $form_key ) { @@ -2122,6 +2147,7 @@ private static function is_formidable_api_form() { * @deprecated 6.11 * * @param array $atts + * * @return void */ public static function actions_dropdown( $atts ) { diff --git a/classes/helpers/FrmFormsListHelper.php b/classes/helpers/FrmFormsListHelper.php index 805799d5ae..91a5e8d87e 100644 --- a/classes/helpers/FrmFormsListHelper.php +++ b/classes/helpers/FrmFormsListHelper.php @@ -219,6 +219,7 @@ public function get_views() { /** * @param string $which + * * @return void */ public function pagination( $which ) { @@ -234,6 +235,7 @@ public function pagination( $which ) { /** * @param stdClass $item * @param string $style + * * @return string */ public function single_row( $item, $style = '' ) { @@ -339,6 +341,7 @@ public function single_row( $item, $style = '' ) { * @since 6.0 * * @param stdClass $form + * * @return string */ protected function column_shortcode( $form ) { @@ -358,6 +361,7 @@ protected function column_shortcode( $form ) { * @since 6.0 * * @param stdClass $form + * * @return string */ protected function column_style( $form ) { @@ -386,6 +390,7 @@ protected function column_style( $form ) { * @since 6.19 * * @param stdClass $form Form object. + * * @return string */ protected function column_views( $form ) { diff --git a/classes/helpers/FrmHtmlHelper.php b/classes/helpers/FrmHtmlHelper.php index 547914bd2b..685349e937 100644 --- a/classes/helpers/FrmHtmlHelper.php +++ b/classes/helpers/FrmHtmlHelper.php @@ -45,6 +45,7 @@ function () use ( $id, $name, $args ) { * @param string $option The string used as the option label. * @param bool $selected True if the option should be selected. * @param array $params Other HTML params for the option. + * * @return void */ public static function echo_dropdown_option( $option, $selected, $params = array() ) { diff --git a/classes/helpers/FrmListHelper.php b/classes/helpers/FrmListHelper.php index dc82be5e09..87bf24181d 100644 --- a/classes/helpers/FrmListHelper.php +++ b/classes/helpers/FrmListHelper.php @@ -8,12 +8,14 @@ class FrmListHelper { * The current list of items * * @since 2.0.18 + * * @var array */ public $items; /** * @since 4.07 + * * @var bool|int */ public $total_items = false; @@ -22,6 +24,7 @@ class FrmListHelper { * Various information about the current table * * @since 2.0.18 + * * @var array */ protected $_args; @@ -30,6 +33,7 @@ class FrmListHelper { * Various information needed for displaying the pagination * * @since 2.0.18 + * * @var array */ protected $_pagination_args = array(); @@ -47,6 +51,7 @@ class FrmListHelper { * Cached bulk actions * * @since 2.0.18 + * * @var array */ private $_actions; @@ -55,6 +60,7 @@ class FrmListHelper { * Cached pagination output * * @since 2.0.18 + * * @var string */ private $_pagination; @@ -63,6 +69,7 @@ class FrmListHelper { * The view switcher modes. * * @since 2.0.18 + * * @var array */ protected $modes = array(); @@ -108,6 +115,7 @@ class FrmListHelper { * Construct the table object * * @param array $args + * * @return void */ public function __construct( $args ) { @@ -170,6 +178,7 @@ public function display_rows() { * @uses FrmListHelper::set_pagination_args() * * @since 2.0.18 + * * @abstract */ public function prepare_items() { @@ -180,6 +189,7 @@ public function prepare_items() { * @since 3.0 * * @param array $args + * * @return array|string */ protected function get_param( $args ) { @@ -934,6 +944,7 @@ public function get_column_count() { * @staticvar int $cb_counter * * @param bool $with_id Whether to set the id attribute or not. + * * @return void */ public function print_column_headers( $with_id = true ) { @@ -1050,6 +1061,7 @@ public function print_column_headers( $with_id = true ) { * @since 2.0.18 * * @param array $args + * * @return void */ public function display( $args = array() ) { @@ -1155,6 +1167,7 @@ protected function display_tablenav( $which ) { * @since 4.07 * * @param int $limit + * * @return bool */ protected function has_min_items( $limit = 5 ) { diff --git a/classes/helpers/FrmOnSubmitHelper.php b/classes/helpers/FrmOnSubmitHelper.php index 83be911a31..d3129de1a0 100644 --- a/classes/helpers/FrmOnSubmitHelper.php +++ b/classes/helpers/FrmOnSubmitHelper.php @@ -3,6 +3,7 @@ * On Submit action helper * * @package Formidable + * * @since 6.0 */ @@ -135,6 +136,7 @@ public static function show_page_settings( $args ) { * {@see FrmFormAction::save_settings()}. * * @param int $form_id Form ID. + * * @return array */ public static function get_actions( $form_id ) { @@ -153,6 +155,7 @@ public static function get_actions( $form_id ) { * Gets On Submit action type (message, redirect or page). * * @param object $action Form action object. + * * @return string */ public static function get_action_type( $action ) { @@ -346,6 +349,7 @@ public static function maybe_migrate_submit_settings_to_action( $form_id ) { * * @param array $form_options Form options. * @param string $event Action event. Accepts `create` or `update`. Default is `create`. + * * @return array */ private static function get_on_submit_action_data_from_form_options( $form_options, $event = 'create' ) { @@ -377,6 +381,7 @@ private static function get_on_submit_action_data_from_form_options( $form_optio * @since 6.1.1 * * @param object $form Form object. + * * @return bool */ public static function form_has_migrated( $form ) { @@ -387,6 +392,7 @@ public static function form_has_migrated( $form ) { * @since 6.1.1 * * @param object $form Limited form object. + * * @return void */ private static function save_migrated_success_actions( $form ) { @@ -433,6 +439,7 @@ public static function get_fallback_action( $event = 'create' ) { * @since 6.3.1 * * @param array|string $event Uses 'create' or 'update'. + * * @return object */ public static function get_fallback_action_after_open_in_new_tab( $event ) { diff --git a/classes/helpers/FrmOnboardingWizardHelper.php b/classes/helpers/FrmOnboardingWizardHelper.php index dc5f49be42..a5ecbb987d 100644 --- a/classes/helpers/FrmOnboardingWizardHelper.php +++ b/classes/helpers/FrmOnboardingWizardHelper.php @@ -23,6 +23,7 @@ class FrmOnboardingWizardHelper { * * @param string $addon_key The key of addon. * @param array $addon The array of addon's information. + * * @return void */ public static function add_addon_label_attributes( $addon_key, $addon ) { @@ -59,6 +60,7 @@ public static function add_addon_label_attributes( $addon_key, $addon ) { * * @param string $addon_key The key of addon. * @param array $addon The array of addon's information. + * * @return void */ public static function add_addon_input_attributes( $addon_key, $addon ) { @@ -85,6 +87,7 @@ public static function add_addon_input_attributes( $addon_key, $addon ) { * @since 6.9 * * @param array $args + * * @return void */ public static function print_footer( $args = array() ) { diff --git a/classes/helpers/FrmSerializedStringParserHelper.php b/classes/helpers/FrmSerializedStringParserHelper.php index 3e7106ecef..e7af2d047c 100644 --- a/classes/helpers/FrmSerializedStringParserHelper.php +++ b/classes/helpers/FrmSerializedStringParserHelper.php @@ -38,6 +38,7 @@ private function __construct() {} * This is the initial entry point into the recursive parser. * * @param string $string + * * @return mixed */ public function parse( $string ) { @@ -56,6 +57,7 @@ public function parse( $string ) { * @since 6.20 * * @param mixed $value + * * @return bool */ private function serialized_value_is_valid( $value ) { @@ -66,6 +68,7 @@ private function serialized_value_is_valid( $value ) { * @since 6.20 * * @param string $string + * * @return bool */ private function serialized_string_is_invalid( $string ) { @@ -87,6 +90,7 @@ private function serialized_string_is_invalid( $string ) { * This is the recursive parser. * * @param FrmStringReaderHelper $string + * * @return array|bool|float|int|string|null */ private function do_parse( $string ) { @@ -118,6 +122,7 @@ private function do_parse( $string ) { /** * @param FrmStringReaderHelper $string + * * @return array */ private function parse_array( $string ) { @@ -145,6 +150,7 @@ private function parse_array( $string ) { /** * @param FrmStringReaderHelper $string + * * @return string */ private function parse_string( $string ) { @@ -159,6 +165,7 @@ private function parse_string( $string ) { /** * @param FrmStringReaderHelper $string + * * @return int */ private function parse_int( $string ) { @@ -167,6 +174,7 @@ private function parse_int( $string ) { /** * @param FrmStringReaderHelper $string + * * @return float */ private function parse_float( $string ) { @@ -175,6 +183,7 @@ private function parse_float( $string ) { /** * @param FrmStringReaderHelper $string + * * @return bool */ private function parse_bool( $string ) { diff --git a/classes/helpers/FrmShortcodeHelper.php b/classes/helpers/FrmShortcodeHelper.php index a47e402799..2a77a6b5ef 100644 --- a/classes/helpers/FrmShortcodeHelper.php +++ b/classes/helpers/FrmShortcodeHelper.php @@ -34,6 +34,7 @@ public static function get_shortcode_attribute_array( $text ) { * Returns shortcodes that are shown/hidden based on the context. * * @since 6.16.3 + * * @return array */ public static function get_contextual_shortcodes() { diff --git a/classes/helpers/FrmStringReaderHelper.php b/classes/helpers/FrmStringReaderHelper.php index ce5c8ee1ab..ea6e96e7e7 100644 --- a/classes/helpers/FrmStringReaderHelper.php +++ b/classes/helpers/FrmStringReaderHelper.php @@ -46,6 +46,7 @@ public function __construct( $string ) { * By default, discard that final matching character and return the rest. * * @param string $char + * * @return string */ public function read_until( $char ) { @@ -62,6 +63,7 @@ public function read_until( $char ) { * By default, remove enclosing double-quotes from the result. * * @param int $count + * * @return string */ public function read( $count ) { diff --git a/classes/helpers/FrmStylesCardHelper.php b/classes/helpers/FrmStylesCardHelper.php index e027c5cc03..edce0d6c47 100644 --- a/classes/helpers/FrmStylesCardHelper.php +++ b/classes/helpers/FrmStylesCardHelper.php @@ -68,6 +68,7 @@ public function __construct( $active_style, $default_style, $form_id, $enabled ) * * @param stdClass|WP_Post $style * @param bool $hidden Used for pagination. + * * @return void */ private function echo_style_card( $style, $hidden = false ) { @@ -86,6 +87,7 @@ private function echo_style_card( $style, $hidden = false ) { * * @param stdClass|WP_Post $style * @param bool $hidden + * * @return array */ private function get_params_for_style_card( $style, $hidden = false ) { @@ -125,6 +127,7 @@ private function get_params_for_style_card( $style, $hidden = false ) { * * @param array $params * @param array $args { + * * @type WP_Post $style * } */ @@ -133,6 +136,7 @@ private function get_params_for_style_card( $style, $hidden = false ) { /** * @param stdClass|WP_Post $style + * * @return bool */ private static function has_dark_background( $style ) { @@ -170,7 +174,9 @@ private static function has_dark_background( $style ) { * @type string $name * @type string $slug * } + * * @param bool $hidden + * * @return bool True if the template was valid and echoed. */ private function echo_card_template( $style, $hidden = false ) { @@ -196,8 +202,10 @@ private function echo_card_template( $style, $hidden = false ) { * * @param array $params * @param array $args { + * * @type stdClass|WP_Post $style * } + * * @param stdClass $style_object * @param array $style */ @@ -223,6 +231,7 @@ private function echo_card_template( $style, $hidden = false ) { * * @param array $params * @param array $style + * * @return array */ $param_filter = function ( $params ) use ( $style ) { @@ -248,6 +257,7 @@ private function echo_card_template( $style, $hidden = false ) { * * @param stdClass|WP_Post $style A new style (including duplicated styles) is not a WP_Post object. * Template cards also use an stdClss instead of a WP_Post object. + * * @return string */ public static function get_style_param_for_card( $style ) { @@ -383,6 +393,7 @@ private function get_style_attribute_value_for_wrapper() { * @since 6.0 * * @param array $styles + * * @return void */ private function echo_template_cards( $styles ) { @@ -394,6 +405,7 @@ private function echo_template_cards( $styles ) { * @param array|string $style * @param string $key The key for the API data. It may be a numeric ID, or a key like "active_sub" or "expires". * @param int $count Used for pagination. + * * @return void */ function ( $style, $key ) { @@ -409,6 +421,7 @@ function ( $style, $key ) { /** * @param array $styles + * * @return void */ private function echo_custom_cards( $styles ) { @@ -421,6 +434,7 @@ private function echo_custom_cards( $styles ) { * * @param WP_Post $style * @param int $count Used for pagination. + * * @return void */ function ( $style ) use ( &$count ) { @@ -437,6 +451,7 @@ function ( $style ) use ( &$count ) { * @since 6.0 * * @param int $count + * * @return void */ private function maybe_echo_card_pagination( $count ) { @@ -475,6 +490,7 @@ public function get_styles() { * Remove the default style from an array of styles. * * @param array $styles + * * @return array */ public function filter_custom_styles( $styles ) { @@ -482,6 +498,7 @@ public function filter_custom_styles( $styles ) { $styles, /** * @param WP_Post $style + * * @return bool */ function ( $style ) { diff --git a/classes/helpers/FrmStylesHelper.php b/classes/helpers/FrmStylesHelper.php index eb3a531f6e..099a660e74 100644 --- a/classes/helpers/FrmStylesHelper.php +++ b/classes/helpers/FrmStylesHelper.php @@ -184,6 +184,7 @@ public static function icon_key_to_class( $key, $icon = '+', $type = 'arrow' ) { * @param WP_Post $style * @param FrmStyle $frm_style * @param string $type + * * @return void */ public static function bs_icon_select( $style, $frm_style, $type = 'arrow' ) { @@ -226,6 +227,7 @@ public static function bs_icon_select( $style, $frm_style, $type = 'arrow' ) { * @since 2.0 * * @param string $color Color setting value. This could be hex or rgb. + * * @return string RGB value without the rgb() wrapper. */ public static function hex2rgb( $color ) { @@ -243,6 +245,7 @@ public static function hex2rgb( $color ) { * @since 6.8.3 * * @param string $rgb RGB value including the rgb() or rgba() wrapper. + * * @return array including three numeric values for R, G, and B. */ private static function get_rgb_array_from_rgb( $rgb ) { @@ -261,6 +264,7 @@ private static function get_rgb_array_from_rgb( $rgb ) { * @since 6.8.3 * * @param string $hex A hex color string. + * * @return array Including three numeric values for R, G, and B. */ private static function get_rgb_array_from_hex( $hex ) { @@ -287,6 +291,7 @@ public static function hex2rgba( $hex, $a ) { * @since 6.0 * * @param string $rgba Color setting value. This could be hex or rgb. + * * @return string Hex color value. */ private static function rgb_to_hex( $rgba ) { @@ -302,6 +307,7 @@ private static function rgb_to_hex( $rgba ) { * @since 6.8 * * @param string $hsl + * * @return string|null Null if it fails to parse the HSL string. */ private static function hsl_to_hex( $hsl ) { @@ -362,6 +368,7 @@ private static function hsl_to_hex( $hsl ) { /** * @since 2.3 + * * @param string $hex string The original color in hex format #ffffff. * @param int $steps integer Should be between -255 and 255. Negative = darker, positive = lighter. * @@ -404,6 +411,7 @@ public static function adjust_brightness( $hex, $steps ) { * @since 6.0 * * @param string $color + * * @return int */ public static function get_color_brightness( $color ) { @@ -436,6 +444,7 @@ public static function get_color_brightness( $color ) { * @since 6.0 * * @param string $color Color value, passed by reference. + * * @return void */ private static function fill_hex( &$color ) { @@ -448,6 +457,7 @@ private static function fill_hex( &$color ) { * @since 4.05.02 * * @param array $vars CSS variable keys. + * * @return array */ public static function get_css_vars( $vars = array() ) { @@ -461,6 +471,7 @@ public static function get_css_vars( $vars = array() ) { * @param array $settings Style settings. * @param array $defaults Default style settings. * @param array $vars CSS variable keys to output. + * * @return void */ public static function output_vars( $settings, $defaults = array(), $vars = array() ) { @@ -494,6 +505,7 @@ public static function output_vars( $settings, $defaults = array(), $vars = arra * @param array $defaults Array of default values. * @param string $var The setting key name. * @param string $prepared_value The value from calling css_var_prepare_value. This is set by reference so it can be used after this function is called. + * * @return bool True if the CSS value should be printed. */ private static function should_add_css_var( $settings, $defaults, $var, &$prepared_value ) { @@ -515,6 +527,7 @@ private static function should_add_css_var( $settings, $defaults, $var, &$prepar * @since 6.20 * * @param string $key + * * @return bool */ private static function css_key_is_valid( $key ) { @@ -530,6 +543,7 @@ private static function css_key_is_valid( $key ) { * @since 6.20 * * @param string $var + * * @return bool */ private static function css_value_is_valid( $var ) { @@ -562,6 +576,7 @@ private static function css_value_is_valid( $var ) { * Remove anything that isn't used as a CSS variable name. * * @param string $var_name + * * @return string */ private static function clean_var_name( $var_name ) { @@ -622,6 +637,7 @@ private static function css_var_prepare_value( $settings, $key ) { * @since 2.3 * * @param WP_Post $style + * * @return array */ public static function get_settings_for_output( $style ) { @@ -749,6 +765,7 @@ private static function get_base_font_size_scale( $key, $value, $defaults ) { * * @param array $settings Style settings, passed by reference. * @param bool $allow_transparent Whether transparent colors are allowed. + * * @return void */ public static function prepare_color_output( &$settings, $allow_transparent = true ) { @@ -801,6 +818,7 @@ private static function allow_color_override() { * * @param string $default Default color value. * @param string $color Color value, passed by reference. + * * @return void */ private static function get_color_output( $default, &$color ) { @@ -822,6 +840,7 @@ private static function get_color_output( $default, &$color ) { * @since 6.8 * * @param string $color + * * @return bool */ private static function is_hex( $color ) { @@ -848,6 +867,7 @@ private static function is_hex( $color ) { * @since 2.3 * * @param string $width Label width value. + * * @return false|string */ private static function description_margin_for_screensize( $width ) { @@ -881,6 +901,7 @@ public static function previewing_style() { * @since 6.0 * * @param int|string $form_id + * * @return string */ public static function get_list_url( $form_id ) { @@ -894,6 +915,7 @@ public static function get_list_url( $form_id ) { * * @param stdClass|WP_Post $style * @param int $form_id + * * @return array */ public static function get_style_options_back_button_args( $style, $form_id ) { @@ -942,6 +964,7 @@ public static function get_edit_url( $style, $form_id = 0, $section = '' ) { * * @param int|string $style_id * @param bool $is_default + * * @return int */ public static function get_form_count_for_style( $style_id, $is_default ) { @@ -974,6 +997,7 @@ public static function get_form_count_for_style( $style_id, $is_default ) { * * @param int|string $style_id * @param mixed $conversational_style_id + * * @return int */ private static function get_default_style_count( $style_id, $conversational_style_id ) { @@ -1042,6 +1066,7 @@ public static function style_editor_get_wrapper_classname( $section_type ) { * @since 6.14 * * @param array $settings + * * @return false|string Return image url or false. */ public static function get_submit_image_bg_url( $settings ) { @@ -1080,6 +1105,7 @@ public static function use_chosen_js() { * @since 6.17 * * @param string $value The margin/padding value. + * * @return string */ public static function get_bottom_value( $value ) { diff --git a/classes/helpers/FrmStylesPreviewHelper.php b/classes/helpers/FrmStylesPreviewHelper.php index 4d19602ef1..aecc43dc7f 100644 --- a/classes/helpers/FrmStylesPreviewHelper.php +++ b/classes/helpers/FrmStylesPreviewHelper.php @@ -33,6 +33,7 @@ class FrmStylesPreviewHelper { /** * @param int|string $form_id + * * @return void */ public function __construct( $form_id ) { @@ -63,6 +64,7 @@ public function adjust_form_for_preview() { * A field with a custom label position shouldn't ever change in the styler preview. * * @since 6.0.1 + * * @return void */ private function add_a_div_class_for_default_label_positions() { @@ -72,6 +74,7 @@ private function add_a_div_class_for_default_label_positions() { /** * @param string $position * @param array|object $field + * * @return string */ function ( $position, $field ) { @@ -89,6 +92,7 @@ function ( $position, $field ) { /** * @param string $classes * @param array|object $field + * * @return string */ function ( $classes, $field ) { @@ -116,6 +120,7 @@ private function hide_captcha_fields() { * @param bool $show * @param string $field_type * @param string $target_field_type + * * @return bool */ function ( $show, $field_type ) { @@ -144,6 +149,7 @@ private function disable_javascript_validation() { /** * @param stdClass|null $form * @param int $form_id + * * @return stdClass|null */ function ( $form ) { @@ -251,6 +257,7 @@ private function get_fallback_form_note() { * @param stdClass|WP_Post $style A new style is not a WP_Post object. * @param WP_Post $default_style * @param string $view Either 'list' or 'edit'. + * * @return array */ public function get_warnings_for_styler_preview( $style, $default_style, $view ) { @@ -268,6 +275,7 @@ public function get_warnings_for_styler_preview( $style, $default_style, $view ) * * @param int $style_id * @param int $default_style_id + * * @return bool */ private function should_show_multiple_forms_warning( $style_id, $default_style_id ) { @@ -304,6 +312,7 @@ private function should_show_multiple_forms_warning( $style_id, $default_style_i * @since 6.0 * * @param WP_Styles $styles + * * @return void */ public static function disable_conflicting_wp_admin_css( $styles ) { @@ -374,6 +383,7 @@ public static function get_additional_preview_style( $settings, $is_preview = fa * * @param WP_Styles $styles * @param string $key + * * @return void */ private static function remove_wp_admin_dependency( $styles, $key ) { diff --git a/classes/helpers/FrmSubmitHelper.php b/classes/helpers/FrmSubmitHelper.php index db11a18027..eaeb55f885 100644 --- a/classes/helpers/FrmSubmitHelper.php +++ b/classes/helpers/FrmSubmitHelper.php @@ -3,6 +3,7 @@ * Submit helper * * @since 6.9 + * * @package Formidable */ @@ -40,6 +41,7 @@ class FrmSubmitHelper { * Gets submit field object. * * @param int $form_id Form ID. + * * @return object */ public static function get_submit_field( $form_id ) { @@ -50,6 +52,7 @@ public static function get_submit_field( $form_id ) { * Checks if there is submit button field on the current page. * * @param array $values Prepared form values. + * * @return bool */ public static function has_submit_field_on_current_page( $values ) { @@ -64,6 +67,7 @@ public static function has_submit_field_on_current_page( $values ) { * Checks if the given fields list contains a submit field. * * @param array $fields Array of fields. + * * @return bool */ private static function has_submit_field_in_list( $fields ) { @@ -80,6 +84,7 @@ private static function has_submit_field_in_list( $fields ) { * Gets current action (create or update) from the global variable. * * @param int $form_id Form ID. + * * @return string */ public static function get_current_action_from_global_var( $form_id ) { @@ -92,6 +97,7 @@ public static function get_current_action_from_global_var( $form_id ) { * Gets submit button settings from form option. * * @param object $form Form object. + * * @return array */ private static function get_submit_settings_from_form( $form ) { @@ -127,6 +133,7 @@ private static function get_submit_settings_from_form( $form ) { * Copies submit field settings to form options. * * @param object $form Form object. + * * @return object */ public static function copy_submit_field_settings_to_form( $form ) { @@ -191,6 +198,7 @@ public static function remove_submit_field_from_list( &$fields ) { * Checks if the given fields array only contains the submit field. * * @param array $fields Array of fields. + * * @return false|object Return the last found submit field, or `false` if there is at least another field. */ public static function only_contains_submit_field( $fields ) { diff --git a/classes/helpers/FrmTipsHelper.php b/classes/helpers/FrmTipsHelper.php index cad9e98107..635e06b233 100644 --- a/classes/helpers/FrmTipsHelper.php +++ b/classes/helpers/FrmTipsHelper.php @@ -36,6 +36,7 @@ public static function pro_tip( $callback, $html = '' ) { * @type string $tip Tip text. * @type string $call Call to action text. * } + * * @param string $html * * @return void @@ -80,6 +81,7 @@ public static function show_tip( $tip, $html = '' ) { * @since 6.21 * * @param array $tip + * * @return string */ private static function get_tip_link( $tip ) { diff --git a/classes/helpers/FrmXMLHelper.php b/classes/helpers/FrmXMLHelper.php index 8edfe081d8..6ea9f0f25e 100644 --- a/classes/helpers/FrmXMLHelper.php +++ b/classes/helpers/FrmXMLHelper.php @@ -35,6 +35,7 @@ public static function get_xml_values( $opt, $padding ) { /** * @param string $file + * * @return array|WP_Error The items imported */ public static function import_xml( $file ) { @@ -83,6 +84,7 @@ public static function import_xml( $file ) { * @since 6.2.3 * * @param string $xml_string + * * @return void */ private static function maybe_fix_xml( &$xml_string ) { @@ -113,6 +115,7 @@ private static function maybe_fix_xml( &$xml_string ) { * * @param object $xml * @param bool $installing_template + * * @return array The number of items imported */ public static function import_xml_now( $xml, $installing_template = false ) { @@ -146,6 +149,7 @@ public static function import_xml_now( $xml, $installing_template = false ) { /** * @since 3.06 + * * @return array */ private static function pre_import_data() { @@ -170,6 +174,7 @@ private static function pre_import_data() { /** * @param SimpleXMLElement $terms * @param array $imported + * * @return array */ public static function import_xml_terms( $terms, $imported ) { @@ -205,6 +210,7 @@ public static function import_xml_terms( $terms, $imported ) { * @since 2.0.8 * * @param object $t + * * @return int|string */ private static function get_term_parent_id( $t ) { @@ -224,6 +230,7 @@ private static function get_term_parent_id( $t ) { /** * @param SimpleXMLElement $forms * @param array $imported + * * @return array */ public static function import_xml_forms( $forms, $imported ) { @@ -387,6 +394,7 @@ private static function get_form_fields( $form_id ) { * Delete any fields attached to this form that were not included in the template * * @param array $form_fields + * * @return void */ private static function delete_removed_fields( $form_fields ) { @@ -535,6 +543,7 @@ private static function import_xml_fields( $xml_fields, $form_id, $this_form, &$ * @since 6.8.4 * * @param array $field_array + * * @return array */ private static function update_field_options_with_defaults( $field_array ) { @@ -595,6 +604,7 @@ private static function fill_field( $field, $form_id ) { * @since 4.06 * * @param array $f + * * @return void */ private static function set_default_value( &$f ) { @@ -626,6 +636,7 @@ private static function set_default_value( &$f ) { * @since 4.05 * * @param array $f + * * @return void */ private static function maybe_add_required( &$f ) { @@ -638,8 +649,10 @@ private static function maybe_add_required( &$f ) { * Update the current in_section value at the beginning of the field loop * * @since 2.0.25 + * * @param int $in_section * @param array $f + * * @return void */ private static function maybe_update_in_section_variable( &$in_section, &$f ) { @@ -689,6 +702,7 @@ private static function maybe_update_form_select( &$f, $imported ) { * * @param array $imported * @param array $f + * * @return void */ private static function maybe_update_get_values_form_setting( $imported, &$f ) { @@ -710,6 +724,7 @@ private static function maybe_update_get_values_form_setting( $imported, &$f ) { * @since 4.0 * * @param array $f + * * @return void */ private static function run_field_migrations( &$f ) { @@ -721,6 +736,7 @@ private static function run_field_migrations( &$f ) { * @since 4.0 * * @param array $f + * * @return void */ private static function migrate_placeholders( &$f ) { @@ -792,6 +808,7 @@ public static function migrate_field_placeholder( $field, $type ) { * * @param array $f * @param array $imported + * * @return void */ private static function create_imported_field( $f, &$imported ) { @@ -814,6 +831,7 @@ private static function create_imported_field( $f, &$imported ) { * @since 5.5.1 * * @param array $field + * * @return array */ private static function maybe_import_images_for_options( $field ) { @@ -846,8 +864,10 @@ private static function maybe_import_images_for_options( $field ) { * Fix field ids for fields that already exist prior to import. * * @since 4.07 + * * @param int $form_id * @param array $keys_by_original_field_id + * * @return void */ protected static function maybe_update_field_ids( $form_id, $keys_by_original_field_id ) { @@ -890,6 +910,7 @@ protected static function maybe_update_field_ids( $form_id, $keys_by_original_fi * @since 2.0.19 * * @param array $form + * * @return void */ private static function update_custom_style_setting_on_import( &$form ) { @@ -930,6 +951,7 @@ private static function update_custom_style_setting_on_import( &$form ) { * @since 2.2.7 * * @param int|string $form_id + * * @return void */ private static function update_custom_style_setting_after_import( $form_id ) { @@ -952,6 +974,7 @@ private static function update_custom_style_setting_after_import( $form_id ) { * * @param SimpleXMLElement $views * @param array $imported + * * @return array */ public static function import_xml_views( $views, $imported ) { @@ -1083,6 +1106,7 @@ public static function import_xml_views( $views, $imported ) { * Clears styles from cache for imported forms * * @param array $imported_forms + * * @return void */ private static function clear_forms_style_caches( $imported_forms ) { @@ -1114,6 +1138,7 @@ private static function clear_forms_style_caches( $imported_forms ) { * * @param string $string * @param array $form_ids new form ids indexed by old form id. + * * @return string */ private static function switch_form_ids( $string, $form_ids ) { @@ -1146,6 +1171,7 @@ private static function switch_form_ids( $string, $form_ids ) { /** * @param array $posts_with_shortcodes indexed by current post id. * @param array $view_ids new view ids indexed by old view id. + * * @return void */ private static function maybe_switch_view_ids_after_importing_posts( $posts_with_shortcodes, $view_ids ) { @@ -1169,6 +1195,7 @@ private static function maybe_switch_view_ids_after_importing_posts( $posts_with * * @param string $string * @param array $view_ids new view ids indexed by old view id. + * * @return string */ private static function switch_view_ids( $string, $view_ids ) { @@ -1201,6 +1228,7 @@ private static function switch_view_ids( $string, $view_ids ) { /** * @param string $content + * * @return string */ private static function maybe_prepare_json_view_content( $content ) { @@ -1412,6 +1440,7 @@ private static function maybe_editing_post( &$post ) { /** * @param array $post * @param int $post_id + * * @return void */ private static function update_postmeta( &$post, $post_id ) { @@ -1610,6 +1639,7 @@ public static function item_count_message( $m, $type, &$s_message ) { * If a single form was imported, include a link in the success message. * * @since 4.0 + * * @param array $result The response from the XML import. * @param string $message The response shown on the page after import. */ @@ -1699,6 +1729,7 @@ public static function prepare_field_for_export( &$field ) { * @since 3.06 * * @param object $field + * * @return void */ private static function remove_default_field_options( &$field ) { @@ -1732,6 +1763,7 @@ private static function remove_default_field_options( &$field ) { * @since 5.5.1 * * @param stdClass $field + * * @return void */ private static function add_image_src_to_image_options( $field ) { diff --git a/classes/models/FrmAddon.php b/classes/models/FrmAddon.php index e91c1641ed..b9af7078fb 100644 --- a/classes/models/FrmAddon.php +++ b/classes/models/FrmAddon.php @@ -450,6 +450,7 @@ protected function delete_cache() { * * @param string $file File path of the plugin. * @param array $plugin Plugin data. + * * @return void */ public function maybe_show_license_message( $file, $plugin ) { @@ -464,6 +465,7 @@ public function maybe_show_license_message( $file, $plugin ) { /** * @param string $file File path of the plugin. * @param array $plugin Plugin data. + * * @return void */ public function show_license_message( $file, $plugin ) { @@ -560,6 +562,7 @@ private function prepare_update_details( &$transient ) { * @since 3.04.03 * * @param string $license The license key. + * * @return array The API info for the plugin. */ protected function get_api_info( $license ) { @@ -585,6 +588,7 @@ protected function get_api_info( $license ) { * @since 2.05.05 * * @param object $version_info The version info for the plugin. + * * @return void */ private function clear_old_plugin_version( &$version_info ) { @@ -604,6 +608,7 @@ private function clear_old_plugin_version( &$version_info ) { * @since 3.04.03 * * @param object $version_info The version info for the plugin. + * * @return void */ private function maybe_use_beta_url( &$version_info ) { @@ -769,6 +774,7 @@ public static function activate() { * * @param string $license The license key. * @param string $plugin_slug The plugin slug. + * * @return array The response from the license activation. */ public static function activate_license_for_plugin( $license, $plugin_slug ) { @@ -778,6 +784,7 @@ public static function activate_license_for_plugin( $license, $plugin_slug ) { /** * @param string $license The license key. + * * @return array The response from the license activation. */ private function activate_license( $license ) { @@ -952,6 +959,7 @@ private static function set_license_from_post() { /** * @param string $action + * * @return string */ public function send_mothership_request( $action ) { diff --git a/classes/models/FrmApplicationTemplate.php b/classes/models/FrmApplicationTemplate.php index 03d0bb51d1..b53e47b06b 100644 --- a/classes/models/FrmApplicationTemplate.php +++ b/classes/models/FrmApplicationTemplate.php @@ -109,6 +109,7 @@ private static function get_template_keys_with_local_png_images() { /** * @param array $api_data + * * @return void */ public function __construct( $api_data ) { @@ -121,6 +122,7 @@ public function __construct( $api_data ) { /** * @param array $categories + * * @return void */ private static function populate_category_information( $categories ) { @@ -139,6 +141,7 @@ private static function populate_category_information( $categories ) { * @since 5.5.2 * * @param string $category + * * @return bool */ private static function category_matches_a_license_type( $category ) { diff --git a/classes/models/FrmDb.php b/classes/models/FrmDb.php index 59c8f008b0..3abc98df1e 100644 --- a/classes/models/FrmDb.php +++ b/classes/models/FrmDb.php @@ -51,6 +51,7 @@ public function __construct() { * * @param array $args * @param string $starts_with + * * @return void */ public static function get_where_clause_and_values( &$args, $starts_with = ' WHERE ' ) { @@ -120,6 +121,7 @@ public static function parse_where_from_array( $args, $base_where, &$where, &$va * @param array|string $value * @param string $where * @param array $values + * * @return void */ private static function interpret_array_to_sql( $key, $value, &$where, &$values ) { @@ -389,6 +391,7 @@ private static function get_group_and_table_name( &$table, &$group ) { * * @param string $prefix Prefix to remove. * @param string $name Name to strip prefix from, passed by reference. + * * @return void */ private static function maybe_remove_prefix( $prefix, &$name ) { @@ -491,6 +494,7 @@ private static function generate_query_string_from_pieces( $columns, $table, $wh * @since 2.05.07 * * @param array $args Query arguments, passed by reference. + * * @return void */ private static function esc_query_args( &$args ) { @@ -526,6 +530,7 @@ public static function esc_like( $term ) { * @since 2.05.06 * * @param string $order_query + * * @return string */ public static function esc_order( $order_query ) { @@ -562,6 +567,7 @@ public static function esc_order( $order_query ) { * @since 2.05.06 * * @param string $order_by Sort direction, passed by reference. + * * @return void */ public static function esc_order_by( &$order_by ) { @@ -573,6 +579,7 @@ public static function esc_order_by( &$order_by ) { /** * @since 2.05.06 + * * @param string $limit * * @return string @@ -606,6 +613,7 @@ public static function esc_limit( $limit ) { * * @param array $array Array of values. * @param string $type Placeholder type. + * * @return string */ public static function prepare_array_values( $array, $type = '%s' ) { @@ -619,6 +627,7 @@ public static function prepare_array_values( $array, $type = '%s' ) { * * @param string $starts_with * @param array|string $where + * * @return string */ public static function prepend_and_or_where( $starts_with = ' WHERE ', $where = '' ) { @@ -647,8 +656,10 @@ public static function prepend_and_or_where( $starts_with = ' WHERE ', $where = * Prepare and save settings in styles and actions * * @since 2.05.06 + * * @param array $settings * @param string $group + * * @return int|WP_Error */ public static function save_settings( $settings, $group ) { @@ -675,6 +686,7 @@ public static function save_settings( $settings, $group ) { * @since 2.05.06 * * @param array $settings + * * @return int|WP_Error */ public static function save_json_post( $settings ) { @@ -739,6 +751,7 @@ public static function check_cache( $cache_key, $group = '', $query = '', $type * @param mixed $results Cached results. * @param string $group The name of the cache group. * @param int $time Cache expiration time in seconds. + * * @return void */ public static function set_cache( $cache_key, $results, $group = '', $time = 300 ) { @@ -756,6 +769,7 @@ public static function set_cache( $cache_key, $results, $group = '', $time = 300 * * @param string $key Cache key. * @param string $group Cache group name. + * * @return void */ public static function add_key_to_group_cache( $key, $group ) { @@ -768,6 +782,7 @@ public static function add_key_to_group_cache( $key, $group ) { * @since 2.05.06 * * @param string $group Cache group name. + * * @return array */ public static function get_group_cached_keys( $group ) { @@ -784,6 +799,7 @@ public static function get_group_cached_keys( $group ) { * * @param string $cache_key Cache key to delete. * @param string $group Cache group name. + * * @return void */ public static function delete_cache_and_transient( $cache_key, $group = 'default' ) { @@ -797,6 +813,7 @@ public static function delete_cache_and_transient( $cache_key, $group = 'default * @since 2.05.06 * * @param string $group The name of the cache group. + * * @return void */ public static function cache_delete_group( $group ) { @@ -818,6 +835,7 @@ public static function cache_delete_group( $group ) { * * @param string $table Table name without `$wpdb->prefix`. * @param string $column Column name. + * * @return bool */ public static function db_column_exists( $table, $column ) { diff --git a/classes/models/FrmEmail.php b/classes/models/FrmEmail.php index 16870979ac..9ff2aa7d89 100644 --- a/classes/models/FrmEmail.php +++ b/classes/models/FrmEmail.php @@ -237,6 +237,7 @@ private function prepare_additional_recipients( $recipients, $user_id_args ) { * @since 2.03.04 * * @param array $user_id_args + * * @return void */ private function set_from( $user_id_args ) { diff --git a/classes/models/FrmEmailMonthly.php b/classes/models/FrmEmailMonthly.php index 969afc007c..eef44a62b8 100644 --- a/classes/models/FrmEmailMonthly.php +++ b/classes/models/FrmEmailMonthly.php @@ -3,6 +3,7 @@ * Monthly summary email class * * @since 6.7 + * * @package Formidable */ diff --git a/classes/models/FrmEmailStats.php b/classes/models/FrmEmailStats.php index 2cb9815e1a..a81331a289 100644 --- a/classes/models/FrmEmailStats.php +++ b/classes/models/FrmEmailStats.php @@ -3,6 +3,7 @@ * Stats email class * * @since 6.7 + * * @package Formidable */ @@ -203,6 +204,7 @@ protected function add_payments_data( &$stats ) { * * @param float $amount Amount. * @param array|string $currency Currency string value or array. + * * @return string */ protected function get_formatted_price( $amount, $currency ) { @@ -218,6 +220,7 @@ protected function get_formatted_price( $amount, $currency ) { * * @param float $current Current value. * @param float $prev Previous value. + * * @return float */ public function get_compare_diff( $current, $prev ) { diff --git a/classes/models/FrmEmailSummary.php b/classes/models/FrmEmailSummary.php index 697c5a9f94..cd08bec20f 100644 --- a/classes/models/FrmEmailSummary.php +++ b/classes/models/FrmEmailSummary.php @@ -3,6 +3,7 @@ * Summary email base class * * @since 6.7 + * * @package Formidable */ @@ -110,6 +111,7 @@ protected function get_content() { * Gets include file path from the given file name. * * @param string $file_name File name. + * * @return string */ protected function get_include_file( $file_name ) { diff --git a/classes/models/FrmEmailYearly.php b/classes/models/FrmEmailYearly.php index 0bb540a0a3..856aaf28ba 100644 --- a/classes/models/FrmEmailYearly.php +++ b/classes/models/FrmEmailYearly.php @@ -3,6 +3,7 @@ * Yearly summary email class * * @since 6.7 + * * @package Formidable */ diff --git a/classes/models/FrmEntry.php b/classes/models/FrmEntry.php index 2bb43764f7..c110a4f579 100644 --- a/classes/models/FrmEntry.php +++ b/classes/models/FrmEntry.php @@ -53,6 +53,7 @@ private static function create_entry( $values, $type ) { * @since 6.16.3 * * @param string $unique_id + * * @return void */ private static function flag_new_unique_key( $unique_id ) { @@ -160,6 +161,7 @@ public static function is_duplicate( $new_values, $values ) { * * @param array $values POST request data. * @param string $created_at The timestamp of the entry we are checking for. + * * @return bool */ private static function maybe_check_for_unique_id_match( $values, $created_at ) { @@ -222,6 +224,7 @@ private static function should_check_for_unique_id_match() { * * @param array $filter_vals * @param int $entry_id + * * @return array */ private static function convert_values_to_their_saved_value( $filter_vals, $entry_id ) { @@ -353,6 +356,7 @@ private static function update_entry( $id, $values, $update_type ) { * Delete an entry. * * @param int|string $id + * * @return bool True on success, false if nothing was deleted. */ public static function destroy( $id ) { @@ -434,6 +438,7 @@ public static function clear_cache() { * * @param array $values * @param array|string $default + * * @return string */ public static function get_new_entry_name( $values, $default = '' ) { @@ -451,6 +456,7 @@ public static function get_new_entry_name( $values, $default = '' ) { * @since 2.0.9 * * @param int|object $entry By reference. + * * @return void */ public static function maybe_get_entry( &$entry ) { @@ -698,6 +704,7 @@ public static function getAll( $where, $order_by = '', $limit = '', $meta = fals /** * @param int $field_id + * * @return string */ private static function sort_by_field( $field_id ) { @@ -719,6 +726,7 @@ private static function sort_by_field( $field_id ) { // Pagination Methods /** * @param array|int|string $where If int, use the form id. + * * @return int|string */ public static function getRecordCount( $where = '' ) { @@ -1043,6 +1051,7 @@ private static function add_new_entry_to_frm_vars( $entry_id ) { * * @param array $values * @param int $entry_id + * * @return void */ private static function maybe_add_entry_metas( $values, $entry_id ) { @@ -1058,6 +1067,7 @@ private static function maybe_add_entry_metas( $values, $entry_id ) { * * @param array $values * @param int $entry_id + * * @return void */ private static function maybe_add_unique_id_meta( $values, $entry_id ) { @@ -1079,6 +1089,7 @@ private static function maybe_add_unique_id_meta( $values, $entry_id ) { * * @param int $form_id * @param int $entry_id + * * @return void */ private static function maybe_add_captcha_meta( $form_id, $entry_id ) { diff --git a/classes/models/FrmEntryFormatter.php b/classes/models/FrmEntryFormatter.php index 9920abcfbc..c59130062a 100644 --- a/classes/models/FrmEntryFormatter.php +++ b/classes/models/FrmEntryFormatter.php @@ -17,72 +17,84 @@ class FrmEntryFormatter { /** * @var FrmEntryValues|null + * * @since 2.04 */ protected $entry_values; /** * @var bool + * * @since 2.04 */ protected $is_plain_text = false; /** * @var bool + * * @since 2.04 */ protected $include_user_info = false; /** * @var bool + * * @since 2.04 */ protected $include_blank = false; /** * @var string + * * @since 2.04 */ protected $format = 'text'; /** * @var string + * * @since 2.05 */ protected $array_key = 'key'; /** * @var string + * * @since 2.04 */ protected $direction = 'ltr'; /** * @var FrmTableHTMLGenerator|null + * * @since 2.04 */ protected $table_generator; /** * @var bool + * * @since 2.04 */ protected $is_clickable = false; /** * @var array + * * @since 2.04 */ protected $include_extras = array(); /** * @var array + * * @since 3.0 */ protected $single_cell_fields = array(); /** * @var array + * * @since 3.0 */ protected $atts = array(); @@ -367,6 +379,7 @@ protected function init_is_clickable( $atts ) { * @since 3.0 * * @param array $atts + * * @return void */ protected function init_atts( $atts ) { diff --git a/classes/models/FrmEntryMeta.php b/classes/models/FrmEntryMeta.php index cf7d9e5c08..8500853790 100644 --- a/classes/models/FrmEntryMeta.php +++ b/classes/models/FrmEntryMeta.php @@ -10,6 +10,7 @@ class FrmEntryMeta { * @param int $field_id * @param string $meta_key usually set to '' as this parameter is no longer used. * @param mixed $meta_value + * * @return int */ public static function add_entry_meta( $entry_id, $field_id, $meta_key, $meta_value ) { @@ -120,6 +121,7 @@ private static function get_value_to_save( $atts, &$value ) { /** * @param int|string $entry_id * @param array $values Either indexed by field ID or field key. + * * @return void */ public static function update_entry_metas( $entry_id, $values ) { @@ -243,6 +245,7 @@ public static function clear_cache() { * * @param stdClass $entry * @param int|string $field_id + * * @return mixed */ public static function get_meta_value( $entry, $field_id ) { @@ -255,6 +258,7 @@ public static function get_meta_value( $entry, $field_id ) { /** * @param int|object|string $entry_id * @param int|string $field_id This function supports field keys as field id. + * * @return mixed */ public static function get_entry_meta_by_field( $entry_id, $field_id ) { @@ -382,6 +386,7 @@ public static function get_entry_meta_info( $entry_id ) { * @param string $order_by * @param string $limit * @param bool $stripslashes + * * @return array */ public static function getAll( $where = array(), $order_by = '', $limit = '', $stripslashes = false ) { @@ -439,6 +444,7 @@ public static function getEntryIds( $where = array(), $order_by = '', $limit = ' * * @param array $query * @param array $args + * * @return array */ public static function get_top_level_entry_ids( $query, $args ) { @@ -451,7 +457,9 @@ public static function get_top_level_entry_ids( $query, $args ) { * the where clause to refer to the entry table for form_id if fields table should not be joined. * * @since 6.16.1 + * * @param array|string $where + * * @return bool */ private static function should_join_fields_table( &$where ) { diff --git a/classes/models/FrmEntryShortcodeFormatter.php b/classes/models/FrmEntryShortcodeFormatter.php index 751ecbbc90..1d93c16745 100644 --- a/classes/models/FrmEntryShortcodeFormatter.php +++ b/classes/models/FrmEntryShortcodeFormatter.php @@ -10,48 +10,56 @@ class FrmEntryShortcodeFormatter { /** * @var int + * * @since 2.04 */ protected $form_id = 0; /** * @var array + * * @since 2.04 */ protected $skip_fields = array( 'captcha', 'html' ); /** * @var array + * * @since 3.0 */ protected $single_cell_fields = array( 'html' ); /** * @var array + * * @since 2.04 */ protected $fields = array(); /** * @var bool + * * @since 2.05 */ protected $is_plain_text = false; /** * @var string + * * @since 2.04 */ protected $format = 'text'; /** * @var FrmTableHTMLGenerator|null + * * @since 2.04 */ protected $table_generator; /** * @var array + * * @since 2.04 */ protected $array_content = array(); diff --git a/classes/models/FrmEntryValidate.php b/classes/models/FrmEntryValidate.php index 810adfa3fb..2c40f3fca2 100644 --- a/classes/models/FrmEntryValidate.php +++ b/classes/models/FrmEntryValidate.php @@ -15,6 +15,7 @@ class FrmEntryValidate { /** * @param array $values * @param bool|string[] $exclude + * * @return array */ public static function validate( $values, $exclude = false ) { @@ -235,6 +236,7 @@ private static function validate_options( &$errors, $posted_field, $value, $args * @param stdClass $field * @param array|string $value * @param array $options + * * @return bool */ private static function option_is_valid( $field, $value, $options ) { @@ -318,6 +320,7 @@ private static function option_is_valid( $field, $value, $options ) { * * @param string $value * @param string $option_value + * * @return bool */ private static function is_filtered_match( $value, $option_value ) { @@ -571,6 +574,7 @@ public static function spam_check( $exclude, $values, &$errors ) { * @since 5.0.13 * * @param array $values The values. + * * @return bool */ private static function form_is_in_progress( $values ) { @@ -591,6 +595,7 @@ private static function is_antispam_check( $form_id ) { /** * @param array $values + * * @return bool */ private static function is_honeypot_spam( $values ) { @@ -609,6 +614,7 @@ private static function is_spam_bot() { /** * @param array $values + * * @return bool */ private static function is_akismet_spam( $values ) { @@ -619,6 +625,7 @@ private static function is_akismet_spam( $values ) { /** * @param int $form_id + * * @return bool */ private static function is_akismet_enabled_for_user( $form_id ) { @@ -642,6 +649,7 @@ public static function blacklist_check( $values ) { * Check entries for Akismet spam * * @param array $values Entry values. + * * @return bool true if is spam */ public static function akismet( $values ) { @@ -674,6 +682,7 @@ public static function akismet( $values ) { * * @param array $datas The array of values being sent to Akismet. * @param array $values Entry values. + * * @return void */ private static function parse_akismet_array( &$datas, $values ) { @@ -727,6 +736,7 @@ private static function add_user_info_to_akismet( &$datas, $values ) { * @since 6.21 This changed from private to public. * * @param array $values Entry values after running through {@see FrmEntryValidate::prepare_values_for_spam_check()}. + * * @return array */ public static function get_spam_check_user_info( $values ) { @@ -751,6 +761,7 @@ public static function get_spam_check_user_info( $values ) { * @since 5.0.13 * * @param array $values Entry values after flattened. + * * @return array */ private static function get_spam_check_user_info_for_guest( $values ) { @@ -867,6 +878,7 @@ private static function is_akismet_guest_info_value( $key, &$value, $field_id, $ * @since 6.17 * * @param int $form_id + * * @return array */ private static function get_name_text_fields( $form_id ) { @@ -965,6 +977,7 @@ private static function skip_adding_values_to_akismet( &$values ) { * * @param object $field_data Object contains `id` and `options`. * @param array $values Entry values. + * * @return bool */ private static function should_really_skip_field( $field_data, $values ) { @@ -1011,6 +1024,7 @@ private static function should_really_skip_field( $field_data, $values ) { * @since 5.2.04 This method returns array of object contains `id` and `options` instead of array of `id` only. * * @param array $values Entry values after running through {@see FrmEntryValidate::prepare_values_for_spam_check()}. + * * @return array */ private static function get_akismet_skipped_field_ids( $values ) { @@ -1054,6 +1068,7 @@ public static function prepare_values_for_spam_check( &$values ) { * @since 5.0.13 Convert name field value to string. * * @param array $values Entry values. + * * @return array Form IDs. */ private static function get_all_form_ids_and_flatten_meta( &$values ) { diff --git a/classes/models/FrmEntryValues.php b/classes/models/FrmEntryValues.php index 6b43ff1bbf..0895f7cd39 100644 --- a/classes/models/FrmEntryValues.php +++ b/classes/models/FrmEntryValues.php @@ -87,6 +87,7 @@ protected function init_entry( $entry_id ) { * Gets entry property. * * @since 5.0.16 + * * @return stdClass */ public function get_entry() { diff --git a/classes/models/FrmField.php b/classes/models/FrmField.php index 2932a88dc7..dcab61f154 100644 --- a/classes/models/FrmField.php +++ b/classes/models/FrmField.php @@ -273,6 +273,7 @@ public static function pro_field_selection() { * @since 6.8.3 * * @param string $type + * * @return bool */ private static function field_is_new( $type ) { @@ -305,6 +306,7 @@ public static function all_field_selection() { * * @param array $values * @param bool $return + * * @return false|int */ public static function create( $values, $return = true ) { @@ -375,6 +377,7 @@ public static function create( $values, $return = true ) { * @since 5.0.08 * * @param array $options + * * @return array */ private static function maybe_filter_options( $options ) { @@ -398,6 +401,7 @@ private static function maybe_filter_options( $options ) { * @since 6.11.2 * * @param string $html + * * @return string */ private static function maybe_filter_custom_html_input_attributes( $html ) { @@ -410,6 +414,7 @@ private static function maybe_filter_custom_html_input_attributes( $html ) { "/$pattern/", /** * @param array $match Shortcode data. + * * @return string */ function ( $match ) { @@ -563,6 +568,7 @@ public static function duplicate( $old_form_id, $form_id, $copy_keys = false, $b /** * @param int|string $id * @param array $values + * * @return false|int */ public static function update( $id, $values ) { @@ -679,6 +685,7 @@ public static function destroy( $id ) { /** * @param int|string $form_id + * * @return void */ public static function delete_form_transient( $form_id ) { @@ -703,6 +710,7 @@ public static function delete_form_transient( $form_id ) { * If $field is numeric, get the field object * * @param int|object|string $field + * * @return void */ public static function maybe_get_field( &$field ) { @@ -851,6 +859,7 @@ public static function get_all_types_in_form( $form_id, $type, $limit = '', $inc * @param int|string $limit * @param string $inc_embed * @param string $inc_repeat + * * @return array */ public static function get_all_for_form( $form_id, $limit = '', $inc_embed = 'exclude', $inc_repeat = 'include' ) { @@ -1020,6 +1029,7 @@ public static function getAll( $where = array(), $order_by = '', $limit = '', $b * @since 2.0.8 * * @param array|object|null $results Results. + * * @return void */ private static function format_field_results( &$results ) { @@ -1053,6 +1063,7 @@ private static function format_field_results( &$results ) { * @since 6.15 * * @param stdClass $result + * * @return void */ private static function add_slashes_to_format_before_setting_field_cache( $result ) { @@ -1069,6 +1080,7 @@ private static function add_slashes_to_format_before_setting_field_cache( $resul * @since 2.0 * * @param object $results + * * @return void */ private static function prepare_options( &$results ) { @@ -1167,6 +1179,7 @@ private static function set_field_transient( &$fields, $form_id, $next = 0, $arg /** * @param string $type + * * @return bool */ public static function is_no_save_field( $type ) { @@ -1207,7 +1220,9 @@ public static function is_field_with_multiple_values( $field ) { /** * @since 3.0 + * * @param array|object $field + * * @return string */ public static function get_field_type( $field ) { @@ -1218,6 +1233,7 @@ public static function get_field_type( $field ) { * @since 3.0 * * @param array|object $field + * * @return string */ public static function get_original_field_type( $field ) { @@ -1238,6 +1254,7 @@ public static function get_original_field_type( $field ) { * @since 2.0.9 * * @param array|object $field Field object. + * * @return bool */ public static function is_multiple_select( $field ) { @@ -1254,6 +1271,7 @@ public static function is_multiple_select( $field ) { * @since 2.0.9 * * @param array|object $field + * * @return bool */ public static function is_read_only( $field ) { @@ -1265,6 +1283,7 @@ public static function is_read_only( $field ) { * @since 2.0.9 * * @param array $field + * * @return bool */ public static function is_required( $field ) { @@ -1284,6 +1303,7 @@ public static function is_required( $field ) { * * @param array|object $field * @param string $option + * * @return bool */ public static function is_option_true( $field, $option ) { @@ -1298,6 +1318,7 @@ public static function is_option_true( $field, $option ) { * * @param array|object $field * @param string $option + * * @return bool */ public static function is_option_empty( $field, $option ) { @@ -1310,6 +1331,7 @@ public static function is_option_empty( $field, $option ) { /** * @param array $field * @param string $option + * * @return bool */ public static function is_option_true_in_array( $field, $option ) { @@ -1319,6 +1341,7 @@ public static function is_option_true_in_array( $field, $option ) { /** * @param object $field * @param string $option + * * @return bool */ public static function is_option_true_in_object( $field, $option ) { @@ -1328,6 +1351,7 @@ public static function is_option_true_in_object( $field, $option ) { /** * @param array $field * @param string $option + * * @return bool */ public static function is_option_empty_in_array( $field, $option ) { @@ -1337,6 +1361,7 @@ public static function is_option_empty_in_array( $field, $option ) { /** * @param object $field * @param string $option + * * @return bool */ public static function is_option_empty_in_object( $field, $option ) { @@ -1346,6 +1371,7 @@ public static function is_option_empty_in_object( $field, $option ) { /** * @param stdClass $field * @param string $option + * * @return bool */ public static function is_option_value_in_object( $field, $option ) { @@ -1357,6 +1383,7 @@ public static function is_option_value_in_object( $field, $option ) { * * @param array|object $field * @param string $option + * * @return mixed */ public static function get_option( $field, $option ) { @@ -1372,6 +1399,7 @@ public static function get_option( $field, $option ) { /** * @param array $field * @param string $option + * * @return mixed */ public static function get_option_in_array( $field, $option ) { @@ -1389,6 +1417,7 @@ public static function get_option_in_array( $field, $option ) { /** * @param object $field * @param string $option + * * @return mixed */ public static function get_option_in_object( $field, $option ) { @@ -1399,6 +1428,7 @@ public static function get_option_in_object( $field, $option ) { * @since 2.0.09 * * @param array|object $field + * * @return bool */ public static function is_repeating_field( $field ) { @@ -1504,6 +1534,7 @@ public static function is_field_type( $field, $is_type ) { * @since 4.10.02 * * @param array $field Field array. + * * @return bool */ public static function is_combo_field( $field ) { diff --git a/classes/models/FrmFieldCaptchaSettings.php b/classes/models/FrmFieldCaptchaSettings.php index b9c6250c32..ed62761733 100644 --- a/classes/models/FrmFieldCaptchaSettings.php +++ b/classes/models/FrmFieldCaptchaSettings.php @@ -195,6 +195,7 @@ public function has_pubkey() { * * @param array $attributes * @param array $field + * * @return array */ public function add_front_end_element_attributes( $attributes, $field ) { @@ -211,6 +212,7 @@ public function add_front_end_element_attributes( $attributes, $field ) { * @since 6.8.4 * * @param array $field + * * @return string Either 'normal' or 'compact'. */ protected function get_captcha_size( $field ) { @@ -260,6 +262,7 @@ public function should_show_captcha_theme_auto_option() { * @since 6.25.1 * * @param bool $allow_multiple + * * @return string */ public function get_class_prefix( $allow_multiple ) { diff --git a/classes/models/FrmFieldFormHtml.php b/classes/models/FrmFieldFormHtml.php index f12cbffbf8..4fbcf5ce40 100644 --- a/classes/models/FrmFieldFormHtml.php +++ b/classes/models/FrmFieldFormHtml.php @@ -296,6 +296,7 @@ private function replace_error_shortcode() { * Pull the HTML between [if error] and [/if error] shortcodes. * * @param string $html + * * @return false|string */ private static function get_error_body( $html ) { @@ -568,6 +569,7 @@ private function process_wp_shortcodes() { * Adds multiple input attributes. * * @since 6.4.1 + * * @return void */ private function add_multiple_input_attributes() { diff --git a/classes/models/FrmFieldOption.php b/classes/models/FrmFieldOption.php index 9fd1adb8c5..792e0ee627 100644 --- a/classes/models/FrmFieldOption.php +++ b/classes/models/FrmFieldOption.php @@ -24,12 +24,14 @@ class FrmFieldOption { /** * @var string + * * @since 2.03.05 */ protected $saved_value = ''; /** * @var string + * * @since 2.03.05 */ protected $option_label = ''; diff --git a/classes/models/FrmFieldTypeOptionData.php b/classes/models/FrmFieldTypeOptionData.php index a2fc16c57c..d2a249bfd9 100644 --- a/classes/models/FrmFieldTypeOptionData.php +++ b/classes/models/FrmFieldTypeOptionData.php @@ -19,6 +19,7 @@ class FrmFieldTypeOptionData { /** * @param string $type + * * @return array */ public static function get_field_types( $type ) { diff --git a/classes/models/FrmFieldValue.php b/classes/models/FrmFieldValue.php index 2d4d8d3fd4..14e8a2c618 100644 --- a/classes/models/FrmFieldValue.php +++ b/classes/models/FrmFieldValue.php @@ -65,6 +65,7 @@ public function __construct( $field, $entry ) { * Gets entry property. * * @since 5.0.16 + * * @return stdClass */ public function get_entry() { diff --git a/classes/models/FrmForm.php b/classes/models/FrmForm.php index 38a5ef5f8c..ef141cf128 100644 --- a/classes/models/FrmForm.php +++ b/classes/models/FrmForm.php @@ -7,6 +7,7 @@ class FrmForm { /** * @param array $values + * * @return bool|int id on success or false on failure. */ public static function create( $values ) { @@ -60,6 +61,7 @@ public static function create( $values ) { * @since 5.0.08 * * @param array $options + * * @return array */ private static function maybe_filter_form_options( $options ) { @@ -293,6 +295,7 @@ public static function update( $id, $values, $create_link = false ) { * @param array $new_values * @param array $values * @param array $args + * * @return array */ public static function set_update_options( $new_values, $values, $args = array() ) { @@ -327,6 +330,7 @@ public static function set_update_options( $new_values, $values, $args = array() /** * @param int $id Form ID. * @param array $values Form values array. + * * @return array */ public static function update_fields( $id, $values ) { @@ -426,6 +430,7 @@ public static function update_fields( $id, $values ) { * @param array $field * @param array $values * @param array $new_field + * * @return void */ private static function maybe_update_max_option( $field, $values, &$new_field ) { @@ -446,6 +451,7 @@ private static function maybe_update_max_option( $field, $values, &$new_field ) /** * @param string $opt * @param mixed $value + * * @return void */ private static function sanitize_field_opt( $opt, &$value ) { @@ -479,6 +485,7 @@ private static function sanitize_field_opt( $opt, &$value ) { /** * @param string $value + * * @return string */ private static function sanitize_calc( $value ) { @@ -499,6 +506,7 @@ private static function sanitize_calc( $value ) { * This is to avoid an issue with unspaced calculations being recognized as HTML that gets removed when strip_tags is called. * * @param string $calc + * * @return string */ private static function normalize_calc_spaces( $calc ) { @@ -518,6 +526,7 @@ private static function normalize_calc_spaces( $calc ) { * * @param array $values Form values array. * @param object $field Field object, passed by reference. + * * @return void */ private static function get_settings_page_html( $values, &$field ) { @@ -638,6 +647,7 @@ public static function set_status( $id, $status ) { /** * @param int|string $id Form ID. + * * @return bool|int */ public static function trash( $id ) { @@ -689,6 +699,7 @@ public static function trash( $id ) { /** * @param int|string $id Form ID. + * * @return bool|int */ public static function destroy( $id ) { @@ -733,6 +744,7 @@ public static function destroy( $id ) { * Delete trashed forms based on how long they have been trashed * * @param int|string $delete_timestamp Timestamp cutoff for deletion. + * * @return int The number of forms deleted */ public static function scheduled_delete( $delete_timestamp = '' ) { @@ -766,6 +778,7 @@ public static function scheduled_delete( $delete_timestamp = '' ) { /** * @param int|string $id Form ID or key. + * * @return string form name */ public static function getName( $id ) { @@ -833,6 +846,7 @@ public static function maybe_get_form( &$form ) { /** * @param int|string $id * @param false|int $blog_id + * * @return stdClass|null */ public static function getOne( $id, $blog_id = false ) { @@ -874,6 +888,7 @@ public static function getOne( $id, $blog_id = false ) { * @since 6.8.3 * * @param stdClass|null $row The database row for a target form. + * * @return stdClass|null */ private static function prepare_form_row_data( $row ) { @@ -898,6 +913,7 @@ private static function prepare_form_row_data( $row ) { * @param array|string $where Where conditions array or raw WHERE string. * @param string $order_by Order by clause. * @param int|string $limit Limit clause or number. + * * @return array|object of objects */ public static function getAll( $where = array(), $order_by = '', $limit = '' ) { @@ -939,6 +955,7 @@ public static function getAll( $where = array(), $order_by = '', $limit = '' ) { * @param array $query * @param int $limit * @param string $inc_children + * * @return array|object of forms A single form object would be passed if $limit was set to 1. */ public static function get_published_forms( $query = array(), $limit = 999, $inc_children = 'exclude' ) { @@ -1018,6 +1035,7 @@ public static function clear_form_cache() { /** * @param array $values Form values to validate. + * * @return array of errors */ public static function validate( $values ) { @@ -1279,6 +1297,7 @@ public static function show_submit( $form ) { * @since 2.3 * * @param array $atts Attributes including form, option, and default. + * * @return mixed */ public static function get_option( $atts ) { @@ -1307,6 +1326,7 @@ public static function get_edit_link( $form_id ) { * @since 6.2 * * @param stdClass $form + * * @return bool */ public static function is_ajax_on( $form ) { @@ -1317,6 +1337,7 @@ public static function is_ajax_on( $form ) { * Get the latest form available. * * @since 6.8 + * * @return object */ public static function get_latest_form() { @@ -1338,6 +1359,7 @@ public static function get_latest_form() { * Count and return total forms. * * @since 6.8 + * * @return int */ public static function get_forms_count() { @@ -1357,9 +1379,11 @@ public static function get_forms_count() { /** * @deprecated 2.03.05 This is still referenced in a few add ons (API, locations). + * * @codeCoverageIgnore * * @param string $key + * * @return int form id */ public static function getIdByKey( $key ) { @@ -1369,9 +1393,11 @@ public static function getIdByKey( $key ) { /** * @deprecated 2.03.05 This is still referenced in the API add on as of v1.13. + * * @codeCoverageIgnore * * @param int|string $id + * * @return string */ public static function getKeyById( $id ) { diff --git a/classes/models/FrmFormAction.php b/classes/models/FrmFormAction.php index d2ca742857..5690293f75 100644 --- a/classes/models/FrmFormAction.php +++ b/classes/models/FrmFormAction.php @@ -275,6 +275,7 @@ public function get_field_id( $field_name ) { /** * @param int|string $number + * * @return void */ public function _set( $number ) { @@ -536,6 +537,7 @@ public function update_callback( $form_id ) { * * @param array $new_instance * @param array|stdClass $old_instance + * * @return void */ protected function maybe_update_status( $new_instance, $old_instance ) { @@ -554,6 +556,7 @@ protected function maybe_update_status( $new_instance, $old_instance ) { /** * @param array $settings + * * @return int|WP_Error */ public function save_settings( $settings ) { @@ -792,6 +795,7 @@ public static function action_args( $form_id = 0, $limit = 99 ) { /** * @param WP_Post $action + * * @return WP_Post */ public function prepare_action( $action ) { @@ -948,6 +952,7 @@ public function migrate_to_2( $form, $update = 'update' ) { /** * @param WP_Post $action * @param stdClass $entry + * * @return bool */ public static function action_conditions_met( $action, $entry ) { @@ -1043,6 +1048,7 @@ protected function get_upgrade_text() { * @since 6.10 * * @param int $form_id Form ID. + * * @return object[] */ protected function get_form_fields( $form_id ) { diff --git a/classes/models/FrmFormApi.php b/classes/models/FrmFormApi.php index f8eb967bb2..d7fa8c36f9 100644 --- a/classes/models/FrmFormApi.php +++ b/classes/models/FrmFormApi.php @@ -31,6 +31,7 @@ class FrmFormApi { * @since 3.06 * * @param string|null $license The license key. + * * @return void */ public function __construct( $license = null ) { @@ -42,6 +43,7 @@ public function __construct( $license = null ) { * @since 3.06 * * @param string|null $license The license key. + * * @return void */ private function set_license( $license ) { @@ -56,6 +58,7 @@ private function set_license( $license ) { /** * @since 3.06 + * * @return string */ public function get_license() { @@ -73,6 +76,7 @@ protected function set_cache_key() { /** * @since 3.06 + * * @return string */ public function get_cache_key() { @@ -81,6 +85,7 @@ public function get_cache_key() { /** * @since 3.06 + * * @return array */ public function get_api_info() { @@ -379,6 +384,7 @@ public function reset_cached() { /** * @since 3.06 + * * @return array */ public function error_for_license() { @@ -394,6 +400,7 @@ public function error_for_license() { * @since 3.06 * * @param array $addons + * * @return array */ public function get_error_from_response( $addons = array() ) { @@ -420,6 +427,7 @@ public function get_error_from_response( $addons = array() ) { * @since 6.0 * * @param array $addon + * * @return bool */ protected function is_new( $addon ) { diff --git a/classes/models/FrmFormMigrator.php b/classes/models/FrmFormMigrator.php index 71ffb238d8..62a4efdc96 100644 --- a/classes/models/FrmFormMigrator.php +++ b/classes/models/FrmFormMigrator.php @@ -352,6 +352,7 @@ protected function fields_with_end() { * @since 4.04.03 * * @param array $fields + * * @return void */ protected function maybe_add_end_fields( &$fields ) { @@ -522,6 +523,7 @@ protected function create_fields( $form_id, &$form ) { * * @param array $form * @param int|string $form_id + * * @return void */ protected function create_emails( $form, $form_id ) { diff --git a/classes/models/FrmFormState.php b/classes/models/FrmFormState.php index 469b1b1614..9c2234b863 100644 --- a/classes/models/FrmFormState.php +++ b/classes/models/FrmFormState.php @@ -30,6 +30,7 @@ private function __construct() { /** * @param string $key * @param mixed $value + * * @return void */ public static function set_initial_value( $key, $value ) { @@ -56,6 +57,7 @@ private static function maybe_initialize() { /** * @param string $key * @param mixed $value + * * @return void */ public function set( $key, $value ) { @@ -65,6 +67,7 @@ public function set( $key, $value ) { /** * @param string $key * @param mixed $default + * * @return mixed */ public static function get_from_request( $key, $default ) { @@ -90,6 +93,7 @@ public function get( $key, $default ) { * It is used to track the value of a title=1|0 or description=1|0 option in a [formidable] shortcode. * * @param stdClass $form + * * @return void */ public static function maybe_render_state_field( $form ) { @@ -178,6 +182,7 @@ private function get_state_string() { * Returns true if open SSL is installed. * * @since 6.12 + * * @return bool */ private static function open_ssl_is_installed() { @@ -203,6 +208,7 @@ private function compressed_state() { * "description" => "d". * * @param string $key + * * @return string */ private static function compressed_key( $key ) { @@ -215,6 +221,7 @@ private static function compressed_key( $key ) { * To avoid conflicts, we should not add "i" or "g" in Lite for another state property. * * @param string $key + * * @return string The full key name if one is found. If nothing is found, the $key param is passed back. */ private static function decompressed_key( $key ) { diff --git a/classes/models/FrmHoneypot.php b/classes/models/FrmHoneypot.php index 1dfad01b62..0fb7beb84f 100644 --- a/classes/models/FrmHoneypot.php +++ b/classes/models/FrmHoneypot.php @@ -9,6 +9,7 @@ class FrmHoneypot extends FrmValidate { * Track the printed selectors so we do not print the same CSS twice. * * @since 6.22 + * * @var array */ private static $printed_honeypot_selectors = array(); @@ -213,6 +214,7 @@ public function should_render_field() { /** * @param int $honeypot_field_id + * * @return void */ public function render_field( $honeypot_field_id = 0 ) { diff --git a/classes/models/FrmInbox.php b/classes/models/FrmInbox.php index e526f2f37f..8bc57dc94e 100644 --- a/classes/models/FrmInbox.php +++ b/classes/models/FrmInbox.php @@ -182,6 +182,7 @@ private function clean_messages() { /** * @param array $messages * @param string $type + * * @return void */ public function filter_messages( &$messages, $type = 'unread' ) { @@ -203,6 +204,7 @@ public function filter_messages( &$messages, $type = 'unread' ) { * @since 6.25 * * @param array $message + * * @return bool */ private function within_valid_timeframe( $message ) { @@ -215,6 +217,7 @@ private function within_valid_timeframe( $message ) { * @since 6.25 * * @param array $message + * * @return bool */ private function has_started( $message ) { @@ -238,6 +241,7 @@ private function is_expired( $message ) { * Show different messages for different accounts. * * @param array $message + * * @return bool */ private function is_for_user( $message ) { @@ -281,6 +285,7 @@ public function mark_read( $key ) { * @since 4.05.02 * * @param string $key + * * @return void */ public function mark_unread( $key ) { @@ -351,6 +356,7 @@ public function unread() { * @since 6.8.4 The $filtered parameter was added. * * @param bool $filtered + * * @return string */ public function unread_html( $filtered = true ) { @@ -377,6 +383,7 @@ public function unread_html( $filtered = true ) { * @since 4.05.02 * * @param string $key + * * @return void */ public function remove( $key ) { @@ -415,6 +422,7 @@ public static function maybe_show_banner() { * @since 6.8.4 * * @param string $cta + * * @return string */ private static function get_prepared_banner_cta( $cta ) { @@ -425,6 +433,7 @@ private static function get_prepared_banner_cta( $cta ) { * Replace a single href attribute in the CTA. * * @param array $matches The regex results for a single match. + * * @return string */ function ( $matches ) { @@ -484,6 +493,7 @@ private static function get_slidein_messages() { * @since 6.8.4 * * @param string $key The key we are checking for (ie. banner or slidein). + * * @return array */ private static function get_messages_with_key( $key ) { diff --git a/classes/models/FrmInstallPlugin.php b/classes/models/FrmInstallPlugin.php index 85de7e006d..7166a3b158 100644 --- a/classes/models/FrmInstallPlugin.php +++ b/classes/models/FrmInstallPlugin.php @@ -166,6 +166,7 @@ public static function ajax_check_plugin_activation() { * @since 6.16 * * @param string $plugin_file + * * @return bool */ private static function is_plugin_installed( $plugin_file ) { diff --git a/classes/models/FrmMigrate.php b/classes/models/FrmMigrate.php index b9171d0a97..bc73d4059d 100644 --- a/classes/models/FrmMigrate.php +++ b/classes/models/FrmMigrate.php @@ -288,6 +288,7 @@ private function add_composite_indexes_for_entries() { * * @param string $table_name * @param string $index_name + * * @return bool */ private static function index_exists( $table_name, $index_name ) { @@ -625,6 +626,7 @@ private function revert_widget_field_size() { * @since 3.0.05 * * @param string $size Size string to maybe convert, passed by reference. + * * @return void */ private function maybe_convert_migrated_size( &$size ) { diff --git a/classes/models/FrmOnSubmitAction.php b/classes/models/FrmOnSubmitAction.php index 59a13391ce..36553fa5b2 100644 --- a/classes/models/FrmOnSubmitAction.php +++ b/classes/models/FrmOnSubmitAction.php @@ -3,6 +3,7 @@ * On Submit form action * * @package Formidable + * * @since 6.0 */ diff --git a/classes/models/FrmPluginSearch.php b/classes/models/FrmPluginSearch.php index ff69e35562..f9a75cd2bf 100644 --- a/classes/models/FrmPluginSearch.php +++ b/classes/models/FrmPluginSearch.php @@ -27,6 +27,7 @@ public function __construct() { * Add actions and filters only if this is the plugin installation screen and it's the first page. * * @since 4.12 + * * @param object $screen WP Screen object. * * @return void @@ -188,6 +189,7 @@ private function get_plugin_data() { * Modify URL used to fetch to plugin information so it pulls Formidable plugin page. * * @since 4.12 + * * @param string $url URL to load in dialog pulling the plugin page from wporg. * * @return string The URL with 'formidable' instead of 'frm-plugin-search'. @@ -263,6 +265,7 @@ protected function should_display_hint( $hint ) { * easy to work with. * * @param string $term The raw search term. + * * @return string A simplified/sanitized version. */ private function sanitize_search_term( $term ) { @@ -281,6 +284,7 @@ private function sanitize_search_term( $term ) { * @since 4.12 * * @param string $terms + * * @return array */ private function search_to_array( $terms ) { @@ -351,6 +355,7 @@ class="frm-plugin-search__dismiss" /** * @param string $plugin + * * @return bool */ protected function is_installed( $plugin ) { diff --git a/classes/models/FrmRecaptchaSettings.php b/classes/models/FrmRecaptchaSettings.php index 477b9c650b..2edc2570a0 100644 --- a/classes/models/FrmRecaptchaSettings.php +++ b/classes/models/FrmRecaptchaSettings.php @@ -60,6 +60,7 @@ public function get_site_key_tooltip() { * * @param array $attributes * @param array $field + * * @return array */ public function add_front_end_element_attributes( $attributes, $field ) { @@ -77,6 +78,7 @@ public function add_front_end_element_attributes( $attributes, $field ) { * @since 6.8.4 * * @param array $field + * * @return string */ protected function get_captcha_size( $field ) { @@ -121,6 +123,7 @@ private function captcha_is_invisible() { * @since 6.25.1 * * @param bool $allow_multiple + * * @return string */ public function get_class_prefix( $allow_multiple ) { @@ -130,6 +133,7 @@ public function get_class_prefix( $allow_multiple ) { /** * @since 6.8.4 * @deprecated 6.11.1 + * * @return string */ public function getName() { diff --git a/classes/models/FrmSalesApi.php b/classes/models/FrmSalesApi.php index a1d24ee64a..3e06edbf54 100644 --- a/classes/models/FrmSalesApi.php +++ b/classes/models/FrmSalesApi.php @@ -100,6 +100,7 @@ private function set_sales() { * @since 6.25.1 * * @param array $data + * * @return void */ private function set_cross_sell( $data ) { @@ -121,6 +122,7 @@ private function set_cross_sell( $data ) { * @since 6.25.1 * * @param array $data + * * @return bool */ private function cross_sell_is_valid( $data ) { @@ -142,6 +144,7 @@ private function cross_sell_is_valid( $data ) { * @since 6.25.1 * * @param array $cross_sell_text + * * @return int */ private static function determine_cross_sell_index( $cross_sell_text ) { @@ -201,6 +204,7 @@ private function add_sale( $sale ) { /** * @param array $sale + * * @return array */ private function fill_sale( $sale ) { @@ -245,6 +249,7 @@ private function fill_sale( $sale ) { * @since 6.17 * * @param array $sale + * * @return bool */ private function sale_is_active( $sale ) { @@ -294,6 +299,7 @@ public function get_best_sale() { * @since 6.17 * * @param string $key + * * @return false|string False if no sale is active. */ public static function get_best_sale_value( $key ) { @@ -310,6 +316,7 @@ public static function get_best_sale_value( $key ) { * @since 6.17 * * @param array $sale + * * @return bool True if the sale is a match for the applicable group (if one is defined). */ private function matches_ab_group( $sale ) { @@ -478,6 +485,7 @@ public static function dismiss_banner() { /** * @param string $key + * * @return bool */ private static function is_banner_dismissed( $key ) { diff --git a/classes/models/FrmSettings.php b/classes/models/FrmSettings.php index 8b7068587e..760989bf0d 100644 --- a/classes/models/FrmSettings.php +++ b/classes/models/FrmSettings.php @@ -373,6 +373,7 @@ private function set_default_options() { /** * @param array $params + * * @return void */ public function fill_with_defaults( $params = array() ) { @@ -412,6 +413,7 @@ public function fill_with_defaults( $params = array() ) { * @param mixed $value The unsanitized global setting value. * @param string $key The key of the global setting being saved. * @param array $filter_keys These keys that are filtered with kses. + * * @return mixed */ private function maybe_sanitize_global_setting( $value, $key, $filter_keys ) { @@ -500,6 +502,7 @@ public function translatable_strings() { * @since 3.06.01 * * @param array $args + * * @return void */ public function maybe_filter_for_form( $args ) { @@ -550,6 +553,7 @@ public function update( $params ) { /** * @param array $params + * * @return void */ private function update_settings( $params ) { @@ -591,6 +595,7 @@ private function update_settings( $params ) { /** * @param array $params + * * @return void */ private function update_roles( $params ) { @@ -624,6 +629,7 @@ private function update_roles( $params ) { * @param string $key The setting key to update. * @param mixed $value The new value for the setting. * @param string $sanitize The name of the sanitization function to apply to the new value. + * * @return bool True on success, false on failure. */ public function update_setting( $key, $value, $sanitize ) { diff --git a/classes/models/FrmSolution.php b/classes/models/FrmSolution.php index 7d5ac48c49..beb0be6156 100644 --- a/classes/models/FrmSolution.php +++ b/classes/models/FrmSolution.php @@ -4,6 +4,7 @@ * This page is shown when a Formidable plugin is activated. * * @since 4.06.02 + * * @package Formidable */ @@ -27,6 +28,7 @@ class FrmSolution { * Hidden welcome page slug. * * @since 4.06.02 + * * @var string */ protected $page = ''; @@ -199,6 +201,7 @@ protected function settings_link() { * Add page to global settings. * * @param array $sections Sections. + * * @return array */ public function add_settings( $sections ) { diff --git a/classes/models/FrmSpamCheck.php b/classes/models/FrmSpamCheck.php index 4b3da98a70..41b61123be 100644 --- a/classes/models/FrmSpamCheck.php +++ b/classes/models/FrmSpamCheck.php @@ -3,6 +3,7 @@ * Spam check abstract class * * @since 6.21 + * * @package Formidable */ diff --git a/classes/models/FrmSpamCheckDenylist.php b/classes/models/FrmSpamCheckDenylist.php index 9157c69218..cb85dc7643 100644 --- a/classes/models/FrmSpamCheckDenylist.php +++ b/classes/models/FrmSpamCheckDenylist.php @@ -3,6 +3,7 @@ * Spam check using denylist * * @since 6.21 + * * @package Formidable */ @@ -235,6 +236,7 @@ protected function fill_default_denylist_data( &$denylist ) { * Gets words from setting. * * @param string $setting_key Setting key. + * * @return array */ protected function get_words_from_setting( $setting_key ) { @@ -254,6 +256,7 @@ protected function get_words_from_setting( $setting_key ) { * * @param string $line Single line. * @param array $args Check args. + * * @return bool */ protected function single_line_check_values( $line, $args ) { @@ -291,6 +294,7 @@ protected function single_line_check_values( $line, $args ) { * Converts values to string to check. * * @param array $values Values array. + * * @return string */ protected function convert_values_to_string( $values ) { @@ -302,6 +306,7 @@ protected function convert_values_to_string( $values ) { * Converts string to lowercase. * * @param string $str String. + * * @return string */ protected function convert_to_lowercase( $str ) { @@ -345,6 +350,7 @@ protected function get_field_ids_to_check( array $denylist ) { * Gets values to check. * * @param array $denylist Single denylist data. + * * @return array|false Return `false` if no values need to check, or return array of values. */ protected function get_values_to_check( $denylist ) { @@ -390,6 +396,7 @@ protected function get_values_to_check( $denylist ) { * * @param int $field_id Field ID. * @param int[] $field_ids_to_check Field IDs to check. + * * @return bool */ protected function should_check_this_field( $field_id, $field_ids_to_check ) { @@ -455,6 +462,7 @@ protected function check_ip() { * @param string $file_path File path. * @param callable $callback Check callback. * @param array $callback_args Callback args. + * * @return bool */ protected function read_lines_and_check( $file_path, $callback, $callback_args = array() ) { @@ -492,6 +500,7 @@ protected function read_lines_and_check( $file_path, $callback, $callback_args = * Checks if the given IP is allowed. * * @param string $ip IP address. + * * @return bool */ protected function is_allowed_ip( $ip ) { @@ -513,6 +522,7 @@ protected function single_line_check_ip( $line, $args ) { * * @param string $ip IP address. * @param string $cidr_ip IP address with CIDR format (x.x.x.x/24). + * * @return bool */ protected function ip_matches( $ip, $cidr_ip ) { @@ -548,6 +558,7 @@ protected function ip_matches( $ip, $cidr_ip ) { * * @param string $ip The IP address. * @param string[] $ip_array Array of IP addresses. + * * @return bool */ protected function ip_matches_array( $ip, $ip_array ) { diff --git a/classes/models/FrmSpamCheckStopForumSpam.php b/classes/models/FrmSpamCheckStopForumSpam.php index c7ff25a318..0fa0c250d0 100644 --- a/classes/models/FrmSpamCheckStopForumSpam.php +++ b/classes/models/FrmSpamCheckStopForumSpam.php @@ -64,6 +64,7 @@ protected function is_enabled() { * Sends API request. * * @param array $request_data Request data. + * * @return string */ private function send_request( $request_data ) { @@ -98,6 +99,7 @@ private function send_request( $request_data ) { * Checks if the response is spam. * * @param string $response Response body. + * * @return bool */ private function response_is_spam( $response ) { diff --git a/classes/models/FrmSpamCheckUseWPComments.php b/classes/models/FrmSpamCheckUseWPComments.php index 8ac097daaf..753b106858 100644 --- a/classes/models/FrmSpamCheckUseWPComments.php +++ b/classes/models/FrmSpamCheckUseWPComments.php @@ -3,6 +3,7 @@ * Spam check using WordPress spam comments * * @since 6.21 + * * @package Formidable */ diff --git a/classes/models/FrmSpamCheckWPDisallowedWords.php b/classes/models/FrmSpamCheckWPDisallowedWords.php index b39b60cad0..2c4e6a033e 100644 --- a/classes/models/FrmSpamCheckWPDisallowedWords.php +++ b/classes/models/FrmSpamCheckWPDisallowedWords.php @@ -3,6 +3,7 @@ * Spam check using WordPress disallowed words * * @since 6.21 + * * @package Formidable */ diff --git a/classes/models/FrmStyle.php b/classes/models/FrmStyle.php index 7d04ba66f6..2eac7b98de 100644 --- a/classes/models/FrmStyle.php +++ b/classes/models/FrmStyle.php @@ -9,6 +9,7 @@ class FrmStyle { * The meta name of default template style. * * @since 6.14 + * * @var string */ private $default_template_style_meta_name = 'frm_style_default'; @@ -60,6 +61,7 @@ public function get_new() { /** * @param array $settings + * * @return int|WP_Error */ public function save( $settings ) { @@ -79,6 +81,7 @@ public function duplicate( $id ) { * Handle save actions in the visual styler edit page. * * @param mixed $id + * * @return array */ public function update( $id = 'default' ) { @@ -159,6 +162,7 @@ public function update( $id = 'default' ) { * @since 5.3.2 * * @param string $color_val The color value, by reference. + * * @return void */ private function maybe_sanitize_rgba_value( &$color_val ) { @@ -242,6 +246,7 @@ private function maybe_sanitize_rgba_value( &$color_val ) { * @since 5.0.13 * * @param array $settings + * * @return array */ public function sanitize_post_content( $settings ) { @@ -268,6 +273,7 @@ public function sanitize_post_content( $settings ) { * @since 6.2.3 * * @param string $setting + * * @return string */ private function strip_invalid_characters( $setting ) { @@ -286,6 +292,7 @@ private function strip_invalid_characters( $setting ) { * * @param string $setting * @param array $characters_to_remove + * * @return string */ private function maybe_fix_braces( $setting, &$characters_to_remove ) { @@ -309,6 +316,7 @@ private function maybe_fix_braces( $setting, &$characters_to_remove ) { * @since 6.2.3 * * @param string $input + * * @return string */ private function trim_braces( $input ) { @@ -331,6 +339,7 @@ private function trim_braces( $input ) { * @since 6.2.3 * * @param string $setting + * * @return bool */ private function should_remove_every_brace( $setting ) { @@ -359,6 +368,7 @@ private function should_remove_every_brace( $setting ) { * @since 3.01.01 * * @param string $setting + * * @return bool */ private function is_color( $setting ) { @@ -408,6 +418,7 @@ public function save_settings() { /** * @param string $filename + * * @return string */ private function get_css_content( $filename ) { @@ -445,6 +456,7 @@ private function clear_cache() { * Delete a style by its post ID. * * @param int $id + * * @return false|WP_Post|null */ public function destroy( $id ) { @@ -490,6 +502,7 @@ public function get_one() { * @param string $orderby * @param string $order * @param int $limit + * * @return array */ public function get_all( $orderby = 'title', $order = 'ASC', $limit = 99 ) { @@ -577,6 +590,7 @@ public function get_default_style( $styles = null ) { /** * @param mixed $settings + * * @return mixed */ public function override_defaults( $settings ) { @@ -761,6 +775,7 @@ public function get_defaults() { * * @param string $field_name * @param string $post_field + * * @return string */ public function get_field_name( $field_name, $post_field = 'post_content' ) { @@ -788,6 +803,7 @@ public static function get_bold_options() { * Don't let imbalanced font families ruin the whole stylesheet. * * @param string $value + * * @return string */ public function force_balanced_quotation( $value ) { @@ -813,6 +829,7 @@ public function force_balanced_quotation( $value ) { * Get the default template style * * @since 6.14 + * * @param int $style_id The post type "frm_styles" ID. * * @return string The json encoded template data diff --git a/classes/models/FrmStyleApi.php b/classes/models/FrmStyleApi.php index f734b5d675..cdf7379e43 100644 --- a/classes/models/FrmStyleApi.php +++ b/classes/models/FrmStyleApi.php @@ -45,6 +45,7 @@ public function get_api_info() { /** * @param array $api_info + * * @return array */ private function fill_missing_style_settings( $api_info ) { diff --git a/classes/models/FrmTableHTMLGenerator.php b/classes/models/FrmTableHTMLGenerator.php index 258a7dfbdd..301d0aefa0 100644 --- a/classes/models/FrmTableHTMLGenerator.php +++ b/classes/models/FrmTableHTMLGenerator.php @@ -10,24 +10,28 @@ class FrmTableHTMLGenerator { /** * @var string + * * @since 2.04 */ private $type = ''; /** * @var array + * * @since 2.04 */ private $style_settings = array(); /** * @var bool + * * @since 2.04 */ private $use_inline_style = true; /** * @var string + * * @since 2.04 * @since 5.0.16 Changed scope from `private` to `protected`. */ @@ -35,12 +39,14 @@ class FrmTableHTMLGenerator { /** * @var bool + * * @since 2.04 */ private $odd = true; /** * @var string + * * @since 2.04 * @since 5.0.16 Changed scope from `private` to `protected`. */ @@ -48,6 +54,7 @@ class FrmTableHTMLGenerator { /** * @var string + * * @since 2.04 * @since 5.0.16 Changed scope from `private` to `protected`. */ @@ -75,6 +82,7 @@ class FrmTableHTMLGenerator { * Used to add a class in tables. Set in Pro. * * @var bool + * * @since 5.4.2 */ public $is_child = false; @@ -110,6 +118,7 @@ public function __construct( $type, $atts = array() ) { * @since 2.04 * * @param array $atts + * * @return void */ private function init_style_settings( $atts ) { @@ -142,6 +151,7 @@ private function init_style_settings( $atts ) { * @since 2.04 * * @param array $atts + * * @return void */ private function init_use_inline_style( $atts ) { @@ -156,6 +166,7 @@ private function init_use_inline_style( $atts ) { * @since 2.04 * * @param array $atts + * * @return void */ private function init_direction( $atts ) { @@ -168,6 +179,7 @@ private function init_direction( $atts ) { * Set the table_style property * * @since 2.04 + * * @return void */ private function init_table_style() { @@ -191,6 +203,7 @@ private function init_table_style() { * Set the td_style property * * @since 2.04 + * * @return void */ private function init_td_style() { @@ -211,6 +224,7 @@ private function init_td_style() { * * @param string $html The HTML. * @param string $position The border position. Default is `top`. + * * @return string */ public function remove_border( $html, $position = 'top' ) { @@ -228,6 +242,7 @@ public function remove_border( $html, $position = 'top' ) { * Determine if setting is for a color, e.g. text color, background color, or border color * * @since 2.05 + * * @param string $setting_key Name of setting. * * @return bool @@ -240,6 +255,7 @@ private function is_color_setting( $setting_key ) { * Get color markup from color setting value * * @since 2.05 + * * @param string $color_markup value of a color setting, with format #FFFFF, FFFFFF, or white. * * @return string @@ -383,6 +399,7 @@ public function generate_two_cell_table_row( $label, $value, $args = array() ) { /** * @param string $value * @param array $args + * * @return string */ private function filter_value_for_display( $value, $args ) { diff --git a/classes/models/FrmTurnstileSettings.php b/classes/models/FrmTurnstileSettings.php index e93f853c2b..8f411bba51 100644 --- a/classes/models/FrmTurnstileSettings.php +++ b/classes/models/FrmTurnstileSettings.php @@ -81,6 +81,7 @@ public function should_show_captcha_theme_auto_option() { * @since 6.25.1 * * @param bool $allow_multiple + * * @return string */ public function get_class_prefix( $allow_multiple ) { diff --git a/classes/models/FrmUsage.php b/classes/models/FrmUsage.php index 524d9f3af3..6035a3619b 100644 --- a/classes/models/FrmUsage.php +++ b/classes/models/FrmUsage.php @@ -66,6 +66,7 @@ public function uuid( $regenerate = false ) { /** * @since 3.06.04 + * * @return array */ public function snapshot() { @@ -142,6 +143,7 @@ private function onboarding_wizard() { * @since 6.16.1 * * @param string $table Database table name. + * * @return array */ private function payments( $table = 'frm_payments' ) { @@ -177,6 +179,7 @@ private function payments( $table = 'frm_payments' ) { /** * @since 3.06.04 + * * @return array */ private function plugins() { @@ -199,6 +202,7 @@ private function plugins() { * Add global settings to tracking data. * * @since 3.06.04 + * * @return array */ private function settings() { @@ -250,6 +254,7 @@ private function settings() { * @since 3.06.04 * * @param FrmSettings $settings_list + * * @return array */ private function messages( $settings_list ) { @@ -280,6 +285,7 @@ private function messages( $settings_list ) { * @since 3.06.04 * * @param FrmSettings $settings_list + * * @return array */ private function permissions( $settings_list ) { @@ -297,6 +303,7 @@ private function permissions( $settings_list ) { /** * @since 3.06.04 + * * @return array */ private function forms() { @@ -429,6 +436,7 @@ private function form_action_count( $form_id ) { * Get the last 100 fields created. * * @since 3.06.04 + * * @return array */ private function fields() { @@ -447,6 +455,7 @@ private function fields() { /** * @since 3.06.04 + * * @return array */ private function actions() { @@ -472,6 +481,7 @@ private function actions() { /** * @since 3.06.04 + * * @return bool */ private function tracking_allowed() { diff --git a/classes/models/FrmValidate.php b/classes/models/FrmValidate.php index bb3c5f9913..6715dde307 100644 --- a/classes/models/FrmValidate.php +++ b/classes/models/FrmValidate.php @@ -17,6 +17,7 @@ abstract class FrmValidate { /** * @since 6.21 + * * @var string */ protected $option_type = 'form'; diff --git a/classes/models/fields/FrmFieldCaptcha.php b/classes/models/fields/FrmFieldCaptcha.php index 8edfc4badc..730631730b 100644 --- a/classes/models/fields/FrmFieldCaptcha.php +++ b/classes/models/fields/FrmFieldCaptcha.php @@ -10,6 +10,7 @@ class FrmFieldCaptcha extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'captcha'; @@ -91,6 +92,7 @@ protected function before_replace_html_shortcodes( $args, $html ) { /** * @param array $args * @param array $shortcode_atts + * * @return string */ public function front_field_input( $args, $shortcode_atts ) { @@ -138,6 +140,7 @@ private function get_captcha_language() { * Load the captcha script. * * @param array $args + * * @return void */ protected function load_field_scripts( $args ) { @@ -169,6 +172,7 @@ protected function api_url() { /** * @param FrmSettings $frm_settings + * * @return string */ protected function recaptcha_api_url( $frm_settings ) { @@ -286,7 +290,9 @@ protected function allow_multiple( $frm_settings ) { /** * @since 4.07 + * * @param array $args + * * @return array */ protected function validate_against_api( $args ) { @@ -333,6 +339,7 @@ protected function validate_against_api( $args ) { /** * @param float $score + * * @return void */ private function set_score( $score ) { @@ -348,6 +355,7 @@ private function set_score( $score ) { /** * @param array $args + * * @return array */ public function validate( $args ) { @@ -439,6 +447,7 @@ public static function update_field_name( $values ) { /** * @param FrmSettings $frm_settings + * * @return string */ protected function captcha_size( $frm_settings ) { diff --git a/classes/models/fields/FrmFieldCheckbox.php b/classes/models/fields/FrmFieldCheckbox.php index a7b5919cca..17cfdb0811 100644 --- a/classes/models/fields/FrmFieldCheckbox.php +++ b/classes/models/fields/FrmFieldCheckbox.php @@ -10,12 +10,14 @@ class FrmFieldCheckbox extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'checkbox'; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; @@ -24,6 +26,7 @@ class FrmFieldCheckbox extends FrmFieldType { * Does the html for this field label need to include "for"? * * @var bool + * * @since 3.06.01 */ protected $has_for_label = false; diff --git a/classes/models/fields/FrmFieldCombo.php b/classes/models/fields/FrmFieldCombo.php index d54bd4f9c1..7712868f9f 100644 --- a/classes/models/fields/FrmFieldCombo.php +++ b/classes/models/fields/FrmFieldCombo.php @@ -3,6 +3,7 @@ * Combo field - Field contains sub fields * * @package Formidable + * * @since 4.11 */ @@ -16,6 +17,7 @@ class FrmFieldCombo extends FrmFieldType { * Does the html for this field label need to include "for"? * * @var bool + * * @since 3.0 */ protected $has_for_label = false; @@ -267,6 +269,7 @@ protected function get_processed_sub_fields() { * * @param array $args Arguments. * @param array $shortcode_atts Shortcode attributes. + * * @return string */ public function front_field_input( $args, $shortcode_atts ) { @@ -414,6 +417,7 @@ protected function print_input_atts( $args ) { * Validate field. * * @param array $args Arguments. Includes `errors`, `value`. + * * @return array Errors array. */ public function validate( $args ) { diff --git a/classes/models/fields/FrmFieldCreditCard.php b/classes/models/fields/FrmFieldCreditCard.php index c71ec70f45..7c25b410d4 100644 --- a/classes/models/fields/FrmFieldCreditCard.php +++ b/classes/models/fields/FrmFieldCreditCard.php @@ -11,12 +11,14 @@ class FrmFieldCreditCard extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'credit_card'; /** * @var bool + * * @since 3.0 */ protected $has_for_label = false; @@ -41,6 +43,7 @@ protected function include_form_builder_file() { /** * @param array $args * @param array $shortcode_atts + * * @return string */ public function front_field_input( $args, $shortcode_atts ) { diff --git a/classes/models/fields/FrmFieldDefault.php b/classes/models/fields/FrmFieldDefault.php index ff3974f6d7..50fceecd86 100644 --- a/classes/models/fields/FrmFieldDefault.php +++ b/classes/models/fields/FrmFieldDefault.php @@ -10,6 +10,7 @@ class FrmFieldDefault extends FrmFieldType { /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; diff --git a/classes/models/fields/FrmFieldEmail.php b/classes/models/fields/FrmFieldEmail.php index 3c162b31dc..97bfcd6c50 100644 --- a/classes/models/fields/FrmFieldEmail.php +++ b/classes/models/fields/FrmFieldEmail.php @@ -10,12 +10,14 @@ class FrmFieldEmail extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'email'; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; @@ -58,6 +60,7 @@ public function validate( $args ) { * @since 4.0.04 * * @param array|string $value Email value passed by reference. + * * @return void */ public function sanitize_value( &$value ) { diff --git a/classes/models/fields/FrmFieldGdpr.php b/classes/models/fields/FrmFieldGdpr.php index c3cc722bd7..67c873a65f 100644 --- a/classes/models/fields/FrmFieldGdpr.php +++ b/classes/models/fields/FrmFieldGdpr.php @@ -10,18 +10,21 @@ class FrmFieldGdpr extends FrmFieldType { /** * @since 6.19 + * * @var string */ protected $type = 'gdpr'; /** * @since 6.19 + * * @var bool */ protected $has_for_label = false; /** * @since 6.19 + * * @var string */ const VIEW_PATH = '/classes/views/frm-fields/front-end/gdpr/gdpr-field.php'; @@ -30,6 +33,7 @@ class FrmFieldGdpr extends FrmFieldType { * Get the new field defaults. * * @since 6.19 + * * @return array */ public function get_new_field_defaults() { @@ -58,6 +62,7 @@ public function get_new_field_defaults() { * Get the field settings for the field type. * * @since 6.19 + * * @return bool[] */ protected function field_settings_for_type() { @@ -91,6 +96,7 @@ protected function field_settings_for_type() { * Show the primary options for the field. * * @since 6.19 + * * @param array $args The arguments. */ public function show_primary_options( $args ) { @@ -112,6 +118,7 @@ public function show_label_on_form_builder() { * Gets extra field options. * * @since 6.19 + * * @return string[] */ protected function extra_field_opts() { @@ -124,6 +131,7 @@ protected function extra_field_opts() { * Include the form builder file. * * @since 6.19 + * * @return string */ protected function include_form_builder_file() { @@ -134,6 +142,7 @@ protected function include_form_builder_file() { * Include the front form file. * * @since 6.19 + * * @return string */ protected function include_front_form_file() { @@ -147,6 +156,7 @@ protected function include_front_form_file() { * * @param array $args The arguments. * @param string $html The HTML. + * * @return string */ protected function before_replace_html_shortcodes( $args, $html ) { @@ -162,6 +172,7 @@ protected function before_replace_html_shortcodes( $args, $html ) { * @since 6.20 * * @param array $args + * * @return array */ public function validate( $args ) { @@ -186,6 +197,7 @@ public function validate( $args ) { * * @param bool $required * @param array $field + * * @return bool */ public static function force_required_field( $required, $field ) { diff --git a/classes/models/fields/FrmFieldHTML.php b/classes/models/fields/FrmFieldHTML.php index 1c892a4565..34f26e9617 100644 --- a/classes/models/fields/FrmFieldHTML.php +++ b/classes/models/fields/FrmFieldHTML.php @@ -10,12 +10,14 @@ class FrmFieldHTML extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'html'; /** * @var bool + * * @since 3.0 */ protected $has_input = false; @@ -82,6 +84,7 @@ protected function include_form_builder_file() { * @since 6.8.3 * * @param array $atts + * * @return bool */ protected function should_strip_most_html_before_preparing_display_value( $atts ) { diff --git a/classes/models/fields/FrmFieldHidden.php b/classes/models/fields/FrmFieldHidden.php index de34245f79..5a84acee42 100644 --- a/classes/models/fields/FrmFieldHidden.php +++ b/classes/models/fields/FrmFieldHidden.php @@ -10,24 +10,28 @@ class FrmFieldHidden extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'hidden'; /** * @var bool + * * @since 3.0 */ protected $has_input = false; /** * @var bool + * * @since 3.0 */ protected $has_html = false; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; diff --git a/classes/models/fields/FrmFieldName.php b/classes/models/fields/FrmFieldName.php index 6b43d207be..09a880280b 100644 --- a/classes/models/fields/FrmFieldName.php +++ b/classes/models/fields/FrmFieldName.php @@ -3,6 +3,7 @@ * Name field * * @package Formidable + * * @since 4.11 */ @@ -16,6 +17,7 @@ class FrmFieldName extends FrmFieldCombo { * Field name. * * @var string + * * @since 3.0 */ protected $type = 'name'; @@ -24,6 +26,7 @@ class FrmFieldName extends FrmFieldCombo { * Could this field hold email values? * * @var bool + * * @since 3.0 */ protected $holds_email_values = true; @@ -129,6 +132,7 @@ public function show_primary_options( $args ) { * * @param mixed $value Field value before processing. * @param array $atts Shortcode attributes. + * * @return string Most of cases, this will return string. */ protected function prepare_display_value( $value, $atts ) { @@ -171,6 +175,7 @@ protected function prepare_display_value( $value, $atts ) { * @since 4.0.04 * * @param array|string $value + * * @return void */ public function sanitize_value( &$value ) { @@ -181,6 +186,7 @@ public function sanitize_value( &$value ) { * Validate field. * * @param array $args Arguments. Includes `errors`, `value`. + * * @return array Errors array. */ public function validate( $args ) { @@ -252,6 +258,7 @@ protected function get_inputs_container_attrs() { * @since 6.16 * * @param array $args + * * @return void */ public function show_after_default( $args ) { diff --git a/classes/models/fields/FrmFieldNumber.php b/classes/models/fields/FrmFieldNumber.php index 3ba77a312d..02afdf2bde 100644 --- a/classes/models/fields/FrmFieldNumber.php +++ b/classes/models/fields/FrmFieldNumber.php @@ -10,6 +10,7 @@ class FrmFieldNumber extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'number'; @@ -128,6 +129,7 @@ protected function validate_step( &$errors, $args ) { * * @param numeric $value The value. * @param numeric $step The step. + * * @return array|int Return `0` if valid. Otherwise, return an array contains two nearest values. */ protected function check_value_is_valid_with_step( $value, $step ) { @@ -168,6 +170,7 @@ private function remove_commas_from_number( &$args ) { * Force the value to be numeric before it's saved in the DB * * @param array|string $value + * * @return float */ public function set_value_before_save( $value ) { @@ -182,6 +185,7 @@ public function set_value_before_save( $value ) { * @since 4.0.04 * * @param array|string $value + * * @return void */ public function sanitize_value( &$value ) { diff --git a/classes/models/fields/FrmFieldPhone.php b/classes/models/fields/FrmFieldPhone.php index becd53436e..4e3e92c075 100644 --- a/classes/models/fields/FrmFieldPhone.php +++ b/classes/models/fields/FrmFieldPhone.php @@ -10,12 +10,14 @@ class FrmFieldPhone extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'phone'; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; @@ -83,6 +85,7 @@ protected function html5_input_type() { * @since 4.0.04 * * @param array|string $value + * * @return void */ public function sanitize_value( &$value ) { diff --git a/classes/models/fields/FrmFieldRadio.php b/classes/models/fields/FrmFieldRadio.php index 6ca342fcda..c3f73eadd5 100644 --- a/classes/models/fields/FrmFieldRadio.php +++ b/classes/models/fields/FrmFieldRadio.php @@ -10,12 +10,14 @@ class FrmFieldRadio extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'radio'; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; @@ -24,6 +26,7 @@ class FrmFieldRadio extends FrmFieldType { * Does the html for this field label need to include "for"? * * @var bool + * * @since 3.06.01 */ protected $has_for_label = false; diff --git a/classes/models/fields/FrmFieldSelect.php b/classes/models/fields/FrmFieldSelect.php index e660a025de..a80e3fd1e4 100644 --- a/classes/models/fields/FrmFieldSelect.php +++ b/classes/models/fields/FrmFieldSelect.php @@ -10,12 +10,14 @@ class FrmFieldSelect extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'select'; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; diff --git a/classes/models/fields/FrmFieldSubmit.php b/classes/models/fields/FrmFieldSubmit.php index 51a8dcc51f..14b648c233 100644 --- a/classes/models/fields/FrmFieldSubmit.php +++ b/classes/models/fields/FrmFieldSubmit.php @@ -3,6 +3,7 @@ * Submit field class * * @since 6.9 + * * @package Formidable */ @@ -91,6 +92,7 @@ public function show_label_on_form_builder() { * * @param array $args Args. * @param array $shortcode_atts Shortcode atts. + * * @return string */ public function front_field_input( $args, $shortcode_atts ) { diff --git a/classes/models/fields/FrmFieldText.php b/classes/models/fields/FrmFieldText.php index 30fa019c6d..3449867868 100644 --- a/classes/models/fields/FrmFieldText.php +++ b/classes/models/fields/FrmFieldText.php @@ -10,12 +10,14 @@ class FrmFieldText extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'text'; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; diff --git a/classes/models/fields/FrmFieldTextarea.php b/classes/models/fields/FrmFieldTextarea.php index 203229561f..135c11632c 100644 --- a/classes/models/fields/FrmFieldTextarea.php +++ b/classes/models/fields/FrmFieldTextarea.php @@ -10,6 +10,7 @@ class FrmFieldTextarea extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'textarea'; diff --git a/classes/models/fields/FrmFieldType.php b/classes/models/fields/FrmFieldType.php index 374ca5651a..40960429ca 100644 --- a/classes/models/fields/FrmFieldType.php +++ b/classes/models/fields/FrmFieldType.php @@ -10,18 +10,21 @@ abstract class FrmFieldType { /** * @var array|int|object + * * @since 3.0 */ protected $field; /** * @var int + * * @since 3.0 */ protected $field_id = 0; /** * @var string + * * @since 3.0 */ protected $type; @@ -30,6 +33,7 @@ abstract class FrmFieldType { * Does the html for this field label need to include "for"? * * @var bool + * * @since 3.0 */ protected $has_for_label = true; @@ -38,6 +42,7 @@ abstract class FrmFieldType { * Does the field include a input box to type into? * * @var bool + * * @since 3.0 */ protected $has_input = true; @@ -46,6 +51,7 @@ abstract class FrmFieldType { * Is the HTML customizable? * * @var bool + * * @since 3.0 */ protected $has_html = true; @@ -54,6 +60,7 @@ abstract class FrmFieldType { * Could this field hold email values? * * @var bool + * * @since 3.0 */ protected $holds_email_values = false; @@ -62,6 +69,7 @@ abstract class FrmFieldType { * Does this field show on the page? * * @var bool + * * @since 3.0 */ protected $normal_field = true; @@ -70,6 +78,7 @@ abstract class FrmFieldType { * Is this field a lot taller than the submit button? * * @var bool + * * @since 3.0 */ protected $is_tall = false; @@ -78,6 +87,7 @@ abstract class FrmFieldType { * Does this type support array values (like a checkbox or a name field). * * @var bool + * * @since 6.2 */ protected $array_allowed = true; @@ -329,6 +339,7 @@ protected function include_form_builder_file() { /** * @param string $name + * * @return string */ protected function builder_text_field( $name = '' ) { @@ -503,6 +514,7 @@ public function show_options( $field, $display, $values ) { * @since 4.0 * * @param array $args Includes 'field', 'display', and 'values'. + * * @return void */ public function show_primary_options( $args ) { @@ -624,6 +636,7 @@ public function show_default_value_field( $field, $default_name, $default_value * @since 4.04 * * @param array $args + * * @return bool */ protected function should_continue_to_field_options( $args ) { @@ -683,6 +696,7 @@ protected function extra_field_choices_class() { * @since 4.02.01 * * @param array|object $field Field settings array. + * * @return bool */ protected function has_field_choices( $field ) { @@ -713,6 +727,7 @@ public function displayed_field_type( $field ) { * @since 4.02.01 * * @param array $args + * * @return void */ protected function field_choices_heading( $args ) { @@ -749,6 +764,7 @@ private static function get_all_field_types() { * @since 4.04 * * @param array $args + * * @return void */ protected function field_choices_heading_attrs( $args ) { @@ -761,6 +777,7 @@ protected function field_choices_heading_attrs( $args ) { * @since 4.06 * * @param array $args + * * @return void */ protected function show_priority_field_choices( $args = array() ) { @@ -773,6 +790,7 @@ protected function show_priority_field_choices( $args = array() ) { * @since 4.0 * * @param array $args Includes 'field', 'display', and 'values'. + * * @return void */ public function show_extra_field_choices( $args ) { @@ -785,6 +803,7 @@ public function show_extra_field_choices( $args ) { * @since 4.0 * * @param array $args - Includes 'field', 'display'. + * * @return void */ public function show_after_default( $args ) { @@ -980,6 +999,7 @@ public function show_field( $args ) { /** * @param array $args Field rendering arguments. + * * @return void */ protected function get_field_scripts_hook( $args ) { @@ -1073,6 +1093,7 @@ public function get_container_class() { * @since 4.0 * * @param string $align + * * @return void */ public function prepare_align_class( &$align ) { @@ -1203,6 +1224,7 @@ protected function include_on_front_form( $args, $shortcode_atts ) { /** * @param array $args * @param array $shortcode_atts + * * @return string */ public function front_field_input( $args, $shortcode_atts ) { @@ -1250,6 +1272,7 @@ protected function prepare_esc_value() { * * @param array $args * @param string $input_html + * * @return void */ protected function add_extra_html_atts( $args, &$input_html ) { @@ -1305,6 +1328,7 @@ protected function maybe_include_hidden_values( $args ) { * * @param array $args * @param int|string $opt + * * @return string */ private function include_hidden_values_for_single_opt( $args, $opt ) { @@ -1462,6 +1486,7 @@ protected function get_select_attributes( $values ) { * Load field scripts. * * @param array $args + * * @return void */ protected function load_field_scripts( $args ) { @@ -1513,6 +1538,7 @@ protected function get_field_input_html_hook( $field ) { * * @param array $args * @param string $input_html + * * @return void */ protected function add_aria_description( $args, &$input_html ) { @@ -1567,6 +1593,7 @@ protected function add_aria_description( $args, &$input_html ) { /** * @param array $args + * * @return array */ public function validate( $args ) { @@ -1589,6 +1616,7 @@ public function maybe_trim_excess_values( &$value ) { * * @param mixed $value * @param int $entry_id + * * @return bool */ public function is_not_unique( $value, $entry_id ) { @@ -1606,6 +1634,7 @@ public function is_not_unique( $value, $entry_id ) { /** * @param mixed $value + * * @return bool */ private function value_has_already_been_validated_as_unique( $value ) { @@ -1629,6 +1658,7 @@ private function value_has_already_been_validated_as_unique( $value ) { /** * @param mixed $value * @param int $entry_id + * * @return bool */ private function value_exists_in_meta_for_another_entry( $value, $entry_id ) { @@ -1655,6 +1685,7 @@ private function value_validated_as_unique( $value ) { /** * @param array|string $value * @param array $atts + * * @return array|string */ public function get_value_to_save( $value, $atts ) { @@ -1709,6 +1740,7 @@ public function get_display_value( $value, $atts = array() ) { * @since 6.7.1 * * @param array $atts + * * @return bool */ protected function should_strip_most_html_before_preparing_display_value( $atts ) { @@ -1732,6 +1764,7 @@ protected function should_strip_most_html_before_preparing_display_value( $atts * @since 6.7.1 * * @param stdClass $entry + * * @return bool */ protected function should_strip_most_html( $entry ) { @@ -1754,6 +1787,7 @@ protected function should_strip_most_html( $entry ) { * @since 6.8 * * @param int|string $user_id + * * @return bool */ private function user_id_is_privileged( $user_id ) { @@ -1762,6 +1796,7 @@ private function user_id_is_privileged( $user_id ) { /** * @param array $atts + * * @return void */ protected function fill_default_atts( &$atts ) { @@ -1890,6 +1925,7 @@ protected function fill_values( &$value, $defaults ) { * @since 4.0.04 * * @param array|string $value + * * @return void */ public function sanitize_value( &$value ) { @@ -1907,6 +1943,7 @@ public function sanitize_value( &$value ) { * * @param array|string $value * @param array|string $unsanitized_value + * * @return array|string */ private function maintain_option_values( $value, $unsanitized_value ) { @@ -1958,6 +1995,7 @@ private function maintain_option_values( $value, $unsanitized_value ) { * @since 6.2 * * @param mixed $value + * * @return mixed */ public function maybe_decode_value( $value ) { @@ -1982,6 +2020,7 @@ public function should_unserialize_value() { * @since x.x * * @param string $value + * * @return string */ public function filter_value_for_table_html( $value ) { diff --git a/classes/models/fields/FrmFieldUrl.php b/classes/models/fields/FrmFieldUrl.php index 8991e60f1e..fbfec74c69 100644 --- a/classes/models/fields/FrmFieldUrl.php +++ b/classes/models/fields/FrmFieldUrl.php @@ -10,6 +10,7 @@ class FrmFieldUrl extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'url'; @@ -49,6 +50,7 @@ protected function get_field_name() { /** * @param array $atts + * * @return void */ protected function fill_default_atts( &$atts ) { @@ -108,6 +110,7 @@ protected function prepare_display_value( $value, $atts ) { * @since 4.0.04 * * @param array|string $value + * * @return void */ public function sanitize_value( &$value ) { diff --git a/classes/models/fields/FrmFieldUserID.php b/classes/models/fields/FrmFieldUserID.php index bf1d354ce5..b1645d398e 100644 --- a/classes/models/fields/FrmFieldUserID.php +++ b/classes/models/fields/FrmFieldUserID.php @@ -10,24 +10,28 @@ class FrmFieldUserID extends FrmFieldType { /** * @var string + * * @since 3.0 */ protected $type = 'user_id'; /** * @var bool + * * @since 3.0 */ protected $has_input = false; /** * @var bool + * * @since 3.0 */ protected $has_html = false; /** * @var bool + * * @since 3.0 */ protected $holds_email_values = true; diff --git a/classes/views/dashboard/templates/pro-features-list.php b/classes/views/dashboard/templates/pro-features-list.php index 8ead97a4f7..8971c05dd5 100644 --- a/classes/views/dashboard/templates/pro-features-list.php +++ b/classes/views/dashboard/templates/pro-features-list.php @@ -3,6 +3,7 @@ * @since 6.8 * * @var array $features The list of pro features. + * * @package Formidable */ diff --git a/classes/views/frm-fields/back-end/combo-field/sub-field-options.php b/classes/views/frm-fields/back-end/combo-field/sub-field-options.php index de4b6368b1..0f3b326da5 100644 --- a/classes/views/frm-fields/back-end/combo-field/sub-field-options.php +++ b/classes/views/frm-fields/back-end/combo-field/sub-field-options.php @@ -3,6 +3,7 @@ * Sub field options * * @package Formidable + * * @since 4.10.02 * * @var FrmFieldCombo $this Field type object. diff --git a/classes/views/frm-fields/back-end/field-submit.php b/classes/views/frm-fields/back-end/field-submit.php index 3a6b5c548b..d29b6f6c0e 100644 --- a/classes/views/frm-fields/back-end/field-submit.php +++ b/classes/views/frm-fields/back-end/field-submit.php @@ -3,6 +3,7 @@ * View for submit button field in form builder * * @since 6.9 + * * @package Formidable * * @var array $field Field array. diff --git a/classes/views/frm-fields/back-end/format-dropdown-options.php b/classes/views/frm-fields/back-end/format-dropdown-options.php index 2428f8f3ec..6b7bf81b3f 100644 --- a/classes/views/frm-fields/back-end/format-dropdown-options.php +++ b/classes/views/frm-fields/back-end/format-dropdown-options.php @@ -1,6 +1,7 @@ $styles * @param WP_Post $default_style * @param string $row_view_file_path + * * @return void */ function ( $form ) use ( $styles, $default_style, $row_view_file_path ) { diff --git a/classes/views/summary-emails/base-plain.php b/classes/views/summary-emails/base-plain.php index 6be52c1c35..cfbbe7673b 100644 --- a/classes/views/summary-emails/base-plain.php +++ b/classes/views/summary-emails/base-plain.php @@ -3,6 +3,7 @@ * Base template for summary emails * * @since 6.7 + * * @package Formidable * * @var array $args Content args. diff --git a/classes/views/summary-emails/base.php b/classes/views/summary-emails/base.php index 6f4c89dcaa..3afdfaae9e 100644 --- a/classes/views/summary-emails/base.php +++ b/classes/views/summary-emails/base.php @@ -3,6 +3,7 @@ * Base template for summary emails * * @since 6.7 + * * @package Formidable * * @var array $args Content args. diff --git a/classes/views/summary-emails/stats-plain.php b/classes/views/summary-emails/stats-plain.php index a216874145..e2c80fac26 100644 --- a/classes/views/summary-emails/stats-plain.php +++ b/classes/views/summary-emails/stats-plain.php @@ -3,6 +3,7 @@ * Template for plain text stats email * * @since 6.7 + * * @package Formidable * * @var array $args Content args. diff --git a/classes/views/summary-emails/stats.php b/classes/views/summary-emails/stats.php index 4498474d49..b4f4b9a32f 100644 --- a/classes/views/summary-emails/stats.php +++ b/classes/views/summary-emails/stats.php @@ -3,6 +3,7 @@ * Template for stats email * * @since 6.7 + * * @package Formidable * * @var array $args Content args. diff --git a/classes/views/welcome-tour/checklist.php b/classes/views/welcome-tour/checklist.php index d8c02c765c..f660e4a99a 100644 --- a/classes/views/welcome-tour/checklist.php +++ b/classes/views/welcome-tour/checklist.php @@ -3,6 +3,7 @@ * Welcome Tour's Checklist component. * * @since 6.25.1 + * * @package Formidable */ diff --git a/classes/views/welcome-tour/index.php b/classes/views/welcome-tour/index.php index 1105059406..c93e437a7c 100644 --- a/classes/views/welcome-tour/index.php +++ b/classes/views/welcome-tour/index.php @@ -3,6 +3,7 @@ * Welcome Tour's main view file. * * @since 6.25.1 + * * @package Formidable */ diff --git a/classes/views/welcome-tour/spotlight.php b/classes/views/welcome-tour/spotlight.php index 1e6f9f2e31..506d09bd4e 100644 --- a/classes/views/welcome-tour/spotlight.php +++ b/classes/views/welcome-tour/spotlight.php @@ -3,6 +3,7 @@ * Welcome Tour's Spotlight component. * * @since 6.25.1 + * * @package Formidable */ diff --git a/classes/views/welcome-tour/steps/list.php b/classes/views/welcome-tour/steps/list.php index e1fb3d5f3d..2dfbb070d4 100644 --- a/classes/views/welcome-tour/steps/list.php +++ b/classes/views/welcome-tour/steps/list.php @@ -3,6 +3,7 @@ * Welcome Tour's Individual step view. * * @since 6.25.1 + * * @package Formidable */ diff --git a/classes/views/welcome-tour/steps/step-completed.php b/classes/views/welcome-tour/steps/step-completed.php index 7ed942dae8..eaa737cb50 100644 --- a/classes/views/welcome-tour/steps/step-completed.php +++ b/classes/views/welcome-tour/steps/step-completed.php @@ -3,6 +3,7 @@ * Welcome Tour - Completed state (similar to form-templates/template.php). * * @since 6.25.1 + * * @package Formidable */ diff --git a/classes/widgets/FrmShowForm.php b/classes/widgets/FrmShowForm.php index f9dd10c2d7..978f362762 100644 --- a/classes/widgets/FrmShowForm.php +++ b/classes/widgets/FrmShowForm.php @@ -42,6 +42,7 @@ public function widget( $args, $instance ) { * @param array $new_instance New settings for this instance as input by the user via * WP_Widget::form(). * @param array $old_instance Old settings for this instance. + * * @return array Settings to save or bool false to cancel saving. */ public function update( $new_instance, $old_instance ) { @@ -52,6 +53,7 @@ public function update( $new_instance, $old_instance ) { * Outputs the settings update form. * * @param array $instance Current settings. + * * @return string Default return is 'noform'. */ public function form( $instance ) { diff --git a/css/custom_theme.css.php b/css/custom_theme.css.php index 8a241c423d..fbd9f0d662 100644 --- a/css/custom_theme.css.php +++ b/css/custom_theme.css.php @@ -1584,6 +1584,7 @@ * Call action so other plugins can add additional CSS. * * @param array $args { + * * @type array $defaults * } */ diff --git a/deprecated/FrmEDD_SL_Plugin_Updater.php b/deprecated/FrmEDD_SL_Plugin_Updater.php index a64fdffc6c..4449332181 100644 --- a/deprecated/FrmEDD_SL_Plugin_Updater.php +++ b/deprecated/FrmEDD_SL_Plugin_Updater.php @@ -9,6 +9,7 @@ * Allows plugins to use their own update API. * * @author Easy Digital Downloads + * * @version 1.6.15 */ class FrmEDD_SL_Plugin_Updater { @@ -68,6 +69,7 @@ public function check_update( $_transient_data ) { * @param mixed $_data * @param string $_action * @param object $_args + * * @return object $_data */ public function plugins_api_filter( $_data, $_action = '', $_args = null ) { @@ -95,6 +97,8 @@ public function show_changelog() { } /** + * @param string $cache_key + * * @return false */ public function get_cached_version_info( $cache_key = '' ) { @@ -103,6 +107,9 @@ public function get_cached_version_info( $cache_key = '' ) { } /** + * @param string $value + * @param string $cache_key + * * @return void */ public function set_version_info_cache( $value = '', $cache_key = '' ) { diff --git a/phpcs.xml b/phpcs.xml index 9e04c7ac3b..95b0f3d82a 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -205,6 +205,7 @@ helpers/FrmStylesHelper.php models/FrmEntryValidate.php models/FrmAddon.php + models/FrmEntryFormatter.php diff --git a/square/controllers/FrmSquareLiteActionsController.php b/square/controllers/FrmSquareLiteActionsController.php index 69bfcdd925..c80e636efe 100644 --- a/square/controllers/FrmSquareLiteActionsController.php +++ b/square/controllers/FrmSquareLiteActionsController.php @@ -10,6 +10,7 @@ class FrmSquareLiteActionsController extends FrmTransLiteActionsController { * * @param string $callback * @param array|false|object $field + * * @return string */ public static function maybe_show_card( $callback, $field = false ) { @@ -42,6 +43,7 @@ public static function maybe_show_card( $callback, $field = false ) { * @param array $field * @param string $field_name * @param array $atts + * * @return void */ public static function show_card( $field, $field_name, $atts ) { @@ -68,6 +70,7 @@ public static function show_card( $field, $field_name, $atts ) { * @since 6.22 * * @param int|string $form_id + * * @return array */ public static function get_actions_before_submit( $form_id ) { @@ -89,6 +92,7 @@ public static function get_actions_before_submit( $form_id ) { * @param WP_Post $action * @param stdClass $entry * @param mixed $form + * * @return array */ public static function trigger_gateway( $action, $entry, $form ) { @@ -132,6 +136,7 @@ public static function trigger_gateway( $action, $entry, $form ) { * Trigger a one time payment. * * @param array $atts The arguments for the payment. + * * @return string|true string on error, true on success. */ private static function trigger_one_time_payment( $atts ) { @@ -174,6 +179,7 @@ private static function trigger_one_time_payment( $atts ) { * Add a payment row for the payments table. * * @param array $atts The arguments for the payment. + * * @return int */ private static function create_new_payment( $atts ) { @@ -199,6 +205,7 @@ private static function create_new_payment( $atts ) { * Create a new Square subscription and a subscription and payment for the payments tables. * * @param array $atts Includes 'customer', 'entry', 'action', 'amount'. + * * @return bool|string True on success, error message on failure */ private static function trigger_recurring_payment( $atts ) { @@ -274,6 +281,7 @@ private static function trigger_recurring_payment( $atts ) { * * @param string $description * @param array $atts + * * @return string */ private static function prepare_subscription_description( $description, $atts ) { @@ -290,6 +298,7 @@ private static function prepare_subscription_description( $description, $atts ) * * @param string $subscription_id * @param array $atts + * * @return int */ private static function create_new_subscription( $subscription_id, $atts ) { @@ -318,6 +327,7 @@ private static function create_new_subscription( $subscription_id, $atts ) { /** * @param string $repeat_cadence + * * @return int */ private static function get_interval_count_from_repeat_cadence( $repeat_cadence ) { @@ -349,6 +359,7 @@ private static function get_interval_count_from_repeat_cadence( $repeat_cadence /** * @param string $repeat_cadence + * * @return string */ private static function get_interval_from_repeat_cadence( $repeat_cadence ) { @@ -390,6 +401,7 @@ private static function square_is_configured() { * Replace an [email] shortcode with the current user email. * * @param string $email + * * @return string */ private static function replace_email_shortcode( $email ) { @@ -410,6 +422,7 @@ private static function replace_email_shortcode( $email ) { * * @param mixed $amount * @param array $atts + * * @return string */ public static function prepare_amount( $amount, $atts = array() ) { @@ -422,6 +435,7 @@ public static function prepare_amount( $amount, $atts = array() ) { * If this form submits with ajax, load the scripts on the first page. * * @param array $params + * * @return void */ public static function maybe_load_scripts( $params ) { @@ -470,6 +484,7 @@ public static function maybe_load_scripts( $params ) { * Load front end JavaScript for a Stripe form. * * @param int $form_id + * * @return void */ public static function load_scripts( $form_id ) { @@ -556,6 +571,7 @@ private static function get_location_id() { /** * @param int $form_id + * * @return array */ private static function get_style( $form_id ) { @@ -598,6 +614,7 @@ private static function get_style( $form_id ) { * @since x.x * * @param string $font + * * @return string */ private static function prepare_font_family_setting( $font ) { @@ -615,6 +632,7 @@ private static function prepare_font_family_setting( $font ) { * @since 6.22 * * @param array $settings + * * @return string */ private static function get_border_radius( $settings ) { @@ -636,6 +654,7 @@ private static function get_border_radius( $settings ) { * @since 6.22 * * @param int $form_id + * * @return array */ private static function get_style_settings_for_form( $form_id ) { @@ -668,6 +687,7 @@ private static function get_style_settings_for_form( $form_id ) { * @param array $errors * @param stdClass $field * @param array $values + * * @return array */ public static function remove_cc_validation( $errors, $field, $values ) { diff --git a/square/controllers/FrmSquareLiteAppController.php b/square/controllers/FrmSquareLiteAppController.php index 8316aee8ef..1db4bf89d6 100644 --- a/square/controllers/FrmSquareLiteAppController.php +++ b/square/controllers/FrmSquareLiteAppController.php @@ -10,6 +10,7 @@ class FrmSquareLiteAppController { * This adds the Stripe checkbox option to the list of gateways. * * @param array $gateways + * * @return array */ public static function add_gateway( $gateways ) { @@ -98,6 +99,7 @@ public static function verify_buyer() { * Get the amount value for verification. * * @param WP_Post $action + * * @return string */ private static function get_amount_value_for_verification( $action ) { @@ -120,6 +122,7 @@ private static function get_amount_value_for_verification( $action ) { /** * @param WP_Post $action + * * @return array */ public static function get_billing_contact( $action ) { @@ -166,6 +169,7 @@ public static function get_billing_contact( $action ) { * @param array $details * @param array $address * @param int $address_field_id + * * @return void */ private static function maybe_add_address_data( &$details, $address, $address_field_id ) { @@ -199,6 +203,7 @@ private static function maybe_add_address_data( &$details, $address, $address_fi * Create an entry object with posted values. * * @since 6.22 + * * @return stdClass */ private static function generate_false_entry() { diff --git a/square/controllers/FrmSquareLiteEventsController.php b/square/controllers/FrmSquareLiteEventsController.php index e85c43a4cf..7cdcaa05fb 100644 --- a/square/controllers/FrmSquareLiteEventsController.php +++ b/square/controllers/FrmSquareLiteEventsController.php @@ -62,6 +62,7 @@ public function process_events() { * @since 6.22 * * @param array $event_ids + * * @return void */ private function process_event_ids( $event_ids ) { @@ -88,6 +89,7 @@ private function process_event_ids( $event_ids ) { * @since 6.22 * * @param string $event_id + * * @return bool True if the event should be skipped. */ private function should_skip_event( $event_id ) { @@ -105,6 +107,7 @@ private function should_skip_event( $event_id ) { /** * @param string $event_id + * * @return bool */ private function last_attempt_to_process_event_is_too_recent( $event_id ) { @@ -116,6 +119,7 @@ private function last_attempt_to_process_event_is_too_recent( $event_id ) { * @since 6.22 * * @param string $event_id + * * @return void */ private function count_failed_event( $event_id ) { @@ -142,6 +146,7 @@ private function count_failed_event( $event_id ) { * @since 6.22 * * @param string $event_id + * * @return void */ private function track_handled_event( $event_id ) { @@ -224,6 +229,7 @@ private function handle_event() { * Add a payment row for the payments table. * * @param string $subscription_id The Square ID for the current subscription. + * * @return void */ private function add_subscription_payment( $subscription_id ) { diff --git a/square/controllers/FrmSquareLiteSettingsController.php b/square/controllers/FrmSquareLiteSettingsController.php index a6aa0eab22..75aeab6d56 100644 --- a/square/controllers/FrmSquareLiteSettingsController.php +++ b/square/controllers/FrmSquareLiteSettingsController.php @@ -11,6 +11,7 @@ class FrmSquareLiteSettingsController { * @since 6.22 * * @param array $sections + * * @return array */ public static function add_settings_section( $sections ) { @@ -36,6 +37,7 @@ public static function route() { * Print the Stripe section for Global settings. * * @param array $atts + * * @return void */ public static function global_settings_form( $atts = array() ) { diff --git a/square/helpers/FrmSquareLiteConnectHelper.php b/square/helpers/FrmSquareLiteConnectHelper.php index 42550ef4a2..db73d57aae 100644 --- a/square/helpers/FrmSquareLiteConnectHelper.php +++ b/square/helpers/FrmSquareLiteConnectHelper.php @@ -60,6 +60,7 @@ public static function render_settings_container() { /** * @param string $mode + * * @return void */ private static function render_settings_for_mode( $mode ) { @@ -169,6 +170,7 @@ public static function get_oauth_redirect_url() { /** * @param string $action * @param array $additional_body + * * @return object|string */ private static function post_to_connect_server( $action, $additional_body = array() ) { @@ -209,6 +211,7 @@ private static function post_to_connect_server( $action, $additional_body = arra /** * @param array $response + * * @return mixed */ private static function pull_response_body( $response ) { @@ -219,6 +222,7 @@ private static function pull_response_body( $response ) { /** * @param mixed $response + * * @return bool */ private static function validate_response( $response ) { @@ -269,6 +273,7 @@ private static function get_uuid() { * WPML might add a language to the url. Don't send that to the server. * * @param string $url URL to strip language from. + * * @return string */ private static function strip_lang_from_url( $url ) { @@ -284,6 +289,7 @@ private static function strip_lang_from_url( $url ) { * If it is active, use the WPML "absolute home" URL which is not modified. * * @param string $url URL to maybe fix. + * * @return string */ private static function maybe_fix_wpml_url( $url ) { @@ -325,6 +331,7 @@ private static function try_to_extend_server_timeout( $timeout ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_server_side_token_option_name( $mode = 'auto' ) { @@ -335,6 +342,7 @@ private static function get_server_side_token_option_name( $mode = 'auto' ) { * Generate a new client password for authenticating with Connect Service and save it locally as an option. * * @param string $mode 'live' or 'test'. + * * @return string the client password. */ private static function generate_client_password( $mode ) { @@ -345,6 +353,7 @@ private static function generate_client_password( $mode ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_client_side_token_option_name( $mode = 'auto' ) { @@ -361,6 +370,7 @@ private static function get_mode_value() { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return bool|string */ public static function get_merchant_id( $mode = 'auto' ) { @@ -372,6 +382,7 @@ public static function get_merchant_id( $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_merchant_id_option_name( $mode = 'auto' ) { @@ -380,6 +391,7 @@ private static function get_merchant_id_option_name( $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_location_id_option_name( $mode = 'auto' ) { @@ -388,6 +400,7 @@ private static function get_location_id_option_name( $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_merchant_currency_option_name( $mode = 'auto' ) { @@ -397,6 +410,7 @@ private static function get_merchant_currency_option_name( $mode = 'auto' ) { /** * @param string $key 'merchant_id', 'client_password', 'server_password'. * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_square_connect_option_name( $key, $mode = 'auto' ) { @@ -405,6 +419,7 @@ private static function get_square_connect_option_name( $key, $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string either _test or _live. */ private static function get_active_mode_option_name_suffix( $mode = 'auto' ) { @@ -435,6 +450,7 @@ private static function redirect_oauth() { /** * @param bool $connected + * * @return string */ private static function get_url_for_square_settings( $connected ) { @@ -583,6 +599,7 @@ public static function create_subscription( $info ) { /** * @param bool $force Whether to force refreshing the location id. * @param string $mode Either 'auto', 'live', or 'test'. + * * @return false|string */ public static function get_location_id( $force = false, $mode = 'auto' ) { @@ -621,6 +638,7 @@ public static function get_unprocessed_event_ids() { /** * @param string $event_id + * * @return false|object */ public static function get_event( $event_id ) { @@ -642,6 +660,7 @@ public static function get_event( $event_id ) { /** * @param string $event_id + * * @return false|object */ public static function process_event( $event_id ) { @@ -708,6 +727,7 @@ public static function reset_square_api_integration() { /** * @param bool $force * @param string $mode + * * @return false|string */ public static function get_merchant_currency( $force = false, $mode = 'auto' ) { diff --git a/square/models/FrmSquareLiteSettings.php b/square/models/FrmSquareLiteSettings.php index be3e5f6b3f..82ca72bd87 100644 --- a/square/models/FrmSquareLiteSettings.php +++ b/square/models/FrmSquareLiteSettings.php @@ -32,6 +32,7 @@ public function default_options() { /** * @param mixed $settings + * * @return void */ public function set_default_options( $settings = false ) { @@ -79,6 +80,7 @@ public function get_options() { /** * @param array $params + * * @return void */ public function update( $params ) { diff --git a/stripe/controllers/FrmStrpLiteActionsController.php b/stripe/controllers/FrmStrpLiteActionsController.php index 25f1c31510..c792b73b64 100644 --- a/stripe/controllers/FrmStrpLiteActionsController.php +++ b/stripe/controllers/FrmStrpLiteActionsController.php @@ -15,6 +15,7 @@ class FrmStrpLiteActionsController extends FrmTransLiteActionsController { * * @param string $callback * @param array|false|object $field + * * @return string */ public static function maybe_show_card( $callback, $field = false ) { @@ -43,6 +44,7 @@ public static function maybe_show_card( $callback, $field = false ) { * @param array $field * @param string $field_name * @param array $atts + * * @return void */ public static function show_card( $field, $field_name, $atts ) { @@ -64,6 +66,7 @@ public static function show_card( $field, $field_name, $atts ) { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param int|string $form_id + * * @return array */ public static function get_actions_before_submit( $form_id ) { @@ -86,6 +89,7 @@ public static function get_actions_before_submit( $form_id ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param int|string $form_id + * * @return false|WP_Post */ public static function get_stripe_link_action( $form_id ) { @@ -101,6 +105,7 @@ public static function get_stripe_link_action( $form_id ) { * @param WP_Post $action * @param stdClass $entry * @param mixed $form + * * @return array */ public static function trigger_gateway( $action, $entry, $form ) { @@ -148,6 +153,7 @@ private static function stripe_is_configured() { * Set a customer object to $_POST['customer'] to use later. * * @param array $atts + * * @return object|string */ private static function set_customer_with_token( $atts ) { @@ -178,6 +184,7 @@ private static function set_customer_with_token( $atts ) { * Replace an [email] shortcode with the current user email. * * @param string $email + * * @return string */ private static function replace_email_shortcode( $email ) { @@ -200,6 +207,7 @@ private static function replace_email_shortcode( $email ) { * * @param array $atts * @param array $payment_info + * * @return void */ private static function add_customer_name( $atts, &$payment_info ) { @@ -221,6 +229,7 @@ private static function add_customer_name( $atts, &$payment_info ) { * @since 6.5, introduced in v1.16 of the Stripe add on. * * @param array $atts Includes 'customer', 'entry', 'action', 'amount'. + * * @return int The timestamp when the trial should end. 0 for no trial */ public static function get_trial_end_time( $atts ) { @@ -251,6 +260,7 @@ public static function get_trial_end_time( $atts ) { * * @param mixed $amount * @param array $atts + * * @return string */ public static function prepare_amount( $amount, $atts = array() ) { @@ -263,6 +273,7 @@ public static function prepare_amount( $amount, $atts = array() ) { * Add defaults for additional Stripe action options. * * @param array $defaults + * * @return array */ public static function add_action_defaults( $defaults ) { @@ -276,6 +287,7 @@ public static function add_action_defaults( $defaults ) { * Print additional options for Stripe action settings. * * @param array $atts + * * @return void */ public static function add_action_options( $atts ) { @@ -289,6 +301,7 @@ public static function add_action_options( $atts ) { * * @param array $settings * @param array $action + * * @return array */ public static function before_save_settings( $settings, $action ) { @@ -314,6 +327,7 @@ public static function before_save_settings( $settings, $action ) { * Create any required Stripe plans, used for subscriptions. * * @param array $settings + * * @return array */ public static function create_plans( $settings ) { @@ -335,6 +349,7 @@ public static function create_plans( $settings ) { * Include settings in the plan description in order to make sure the correct plan is used. * * @param array $settings + * * @return string */ public static function create_plan_id( $settings ) { @@ -347,6 +362,7 @@ public static function create_plan_id( $settings ) { * If this form submits with ajax, load the scripts on the first page. * * @param array $params + * * @return void */ public static function maybe_load_scripts( $params ) { @@ -377,6 +393,7 @@ public static function maybe_load_scripts( $params ) { * Load front end JavaScript for a Stripe form. * * @param int $form_id + * * @return void */ public static function load_scripts( $form_id ) { @@ -471,6 +488,7 @@ public static function load_scripts( $form_id ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param mixed $form_id + * * @return array */ private static function get_style_settings_for_form( $form_id ) { @@ -503,6 +521,7 @@ private static function get_style_settings_for_form( $form_id ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param array $settings + * * @return array */ private static function get_appearance_rules( $settings ) { @@ -555,6 +574,7 @@ private static function get_appearance_rules( $settings ) { * @since 6.21 * * @param array $settings + * * @return string */ private static function get_border_width( $settings ) { @@ -570,6 +590,7 @@ private static function get_border_width( $settings ) { * @since 6.21 * * @param array $settings + * * @return string */ private static function get_border_radius( $settings ) { @@ -589,6 +610,7 @@ private static function get_border_radius( $settings ) { * Get the language to use for Stripe elements. * * @since 6.5, introduced in v2.0 of the Stripe add on. + * * @return string */ private static function get_locale() { @@ -608,6 +630,7 @@ private static function get_locale() { * @param array $errors * @param stdClass $field * @param array $values + * * @return array */ public static function remove_cc_validation( $errors, $field, $values ) { diff --git a/stripe/controllers/FrmStrpLiteAppController.php b/stripe/controllers/FrmStrpLiteAppController.php index 9b47785dd5..f4a047f786 100644 --- a/stripe/controllers/FrmStrpLiteAppController.php +++ b/stripe/controllers/FrmStrpLiteAppController.php @@ -18,6 +18,7 @@ class FrmStrpLiteAppController { * Install required tables. * * @param mixed $old_db_version + * * @return void */ public static function install( $old_db_version = false ) { @@ -75,6 +76,7 @@ public static function maybe_redirect_to_stripe_settings() { * This adds the Stripe checkbox option to the list of gateways. * * @param array $gateways + * * @return array */ public static function add_gateway( $gateways ) { @@ -100,6 +102,7 @@ public static function add_gateway( $gateways ) { * * @param array $errors Errors data. Is empty array if no errors found. * @param array $params Form params. See {@FrmForm::get_params()}. + * * @return array */ public static function maybe_add_payment_error( $errors, $params ) { @@ -117,6 +120,7 @@ public static function maybe_add_payment_error( $errors, $params ) { * * @param array $errors * @param int $form_id + * * @return array */ private static function maybe_add_payment_error_on_redirect( $errors, $form_id ) { @@ -175,6 +179,7 @@ private static function maybe_add_payment_error_on_redirect( $errors, $form_id ) * @param int $form_id * @param int $entry_id * @param array $errors + * * @return void */ private static function setup_form_after_payment_error( $form_id, $entry_id, $errors ) { @@ -202,6 +207,7 @@ private static function setup_form_after_payment_error( $form_id, $entry_id, $er * * @param string $html * @param int $entry_id + * * @return string */ function ( $html ) use ( $entry_id ) { @@ -219,6 +225,7 @@ function ( $html ) use ( $entry_id ) { * * @param array $values Entry edit values. * @param object $field Field object. + * * @return array */ public static function maybe_delete_pay_entry( $values, $field ) { diff --git a/stripe/controllers/FrmStrpLiteEventsController.php b/stripe/controllers/FrmStrpLiteEventsController.php index 6db8bb39dd..4c7f5b134d 100644 --- a/stripe/controllers/FrmStrpLiteEventsController.php +++ b/stripe/controllers/FrmStrpLiteEventsController.php @@ -114,6 +114,7 @@ private function set_payment_status() { * @since 6.5, introduced in v2.07 of the Stripe add on. * * @param stdClass $payment + * * @return bool */ private function should_skip_status_update_for_first_recurring_payment( $payment ) { @@ -162,6 +163,7 @@ private function flush_response() { * When a customer is deleted in Stripe, remove the link to a user. * * @since 6.5, introduced in v2.01 of the Stripe add on. + * * @return void */ private function reset_customer() { @@ -190,6 +192,7 @@ private function maybe_subscription_canceled() { /** * @param string $status + * * @return bool */ private function subscription_canceled( $status = 'canceled' ) { @@ -269,6 +272,7 @@ private function prepare_from_invoice() { * @since 6.11 * * @param object $sub + * * @return void */ private function maybe_cancel_subscription( $sub ) { @@ -319,6 +323,7 @@ private function maybe_cancel_subscription( $sub ) { * @since 6.11 * * @param string $sub_id Stripe subscriptino id prefixed with 'sub_'. + * * @return int */ private function get_payments_count( $sub_id ) { @@ -333,6 +338,7 @@ private function get_payments_count( $sub_id ) { * @since 6.5, introduced in v2.07 of the Stripe add on. * * @param stdClass $payment + * * @return bool */ private function is_first_payment( $payment ) { @@ -374,6 +380,7 @@ private function get_payment_for_sub( $sub_id ) { /** * @param array $payment_values + * * @return void */ private function set_payment_values( &$payment_values ) { @@ -397,6 +404,7 @@ private function set_payment_values( &$payment_values ) { /** * @param object $sub * @param array $payment + * * @return void */ private function update_next_bill_date( $sub, $payment ) { @@ -423,6 +431,7 @@ private function is_partial_refund() { /** * @param array $payment_values + * * @return void */ private function set_partial_refund( &$payment_values ) { @@ -447,6 +456,7 @@ public function process_connect_events() { * @since 6.5, introduced in v2.07 of the Stripe add on. * * @param array $event_ids + * * @return void */ private function process_event_ids( $event_ids ) { @@ -472,6 +482,7 @@ private function process_event_ids( $event_ids ) { * @since 6.5, introduced in v2.07 of the Stripe add on. * * @param string $event_id + * * @return bool True if the event should be skipped. */ private function should_skip_event( $event_id ) { @@ -489,6 +500,7 @@ private function should_skip_event( $event_id ) { /** * @param string $event_id + * * @return bool */ private function last_attempt_to_process_event_is_too_recent( $event_id ) { @@ -500,6 +512,7 @@ private function last_attempt_to_process_event_is_too_recent( $event_id ) { * @since 6.5, introduced in v2.07 of the Stripe add on. * * @param string $event_id + * * @return void */ private function count_failed_event( $event_id ) { @@ -526,6 +539,7 @@ private function count_failed_event( $event_id ) { * @since 6.5, introduced in v2.07 of the Stripe add on. * * @param string $event_id + * * @return void */ private function track_handled_event( $event_id ) { diff --git a/stripe/controllers/FrmStrpLiteLinkController.php b/stripe/controllers/FrmStrpLiteLinkController.php index 45b71619c6..1e4d34819a 100644 --- a/stripe/controllers/FrmStrpLiteLinkController.php +++ b/stripe/controllers/FrmStrpLiteLinkController.php @@ -50,6 +50,7 @@ public static function handle_return_url() { * * @param string $intent_id * @param string $client_secret + * * @return void */ private static function handle_one_time_stripe_link_return_url( $intent_id, $client_secret ) { @@ -138,6 +139,7 @@ private static function handle_one_time_stripe_link_return_url( $intent_id, $cli * @param object $intent * @param stdClass|WP_Post $action * @param stdClass $entry + * * @return void */ private static function maybe_update_intent( $intent, $action, $entry ) { @@ -163,6 +165,7 @@ private static function maybe_update_intent( $intent, $action, $entry ) { * * @param string $setup_id * @param string $client_secret + * * @return void */ private static function handle_recurring_stripe_link_return_url( $setup_id, $client_secret ) { @@ -318,6 +321,7 @@ private static function handle_recurring_stripe_link_return_url( $setup_id, $cli * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param object $setup_intent + * * @return false|string */ private static function get_link_payment_method( $setup_intent ) { @@ -353,6 +357,7 @@ private static function get_link_payment_method( $setup_intent ) { * @type string $amount * @type object $customer * } + * * @return void */ public static function create_pending_stripe_link_payment( $atts ) { @@ -408,6 +413,7 @@ public static function create_pending_stripe_link_payment( $atts ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param int|string $form_id + * * @return false|string String intent id on success, False if intent is missing or cannot be verified. */ private static function verify_intent( $form_id ) { @@ -439,6 +445,7 @@ private static function verify_intent( $form_id ) { * It is deleted after the redirect happens. * * @param int $entry_id + * * @return void */ private static function add_temporary_referer_meta( $entry_id ) { @@ -464,6 +471,7 @@ private static function add_temporary_referer_meta( $entry_id ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param stdClass $form + * * @return void */ public static function add_form_classes( $form ) { @@ -480,6 +488,7 @@ public static function add_form_classes( $form ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param mixed $form + * * @return mixed */ public static function force_ajax_submit_for_stripe_link( $form ) { diff --git a/stripe/controllers/FrmStrpLitePaymentsController.php b/stripe/controllers/FrmStrpLitePaymentsController.php index 595540f669..50fcae1163 100644 --- a/stripe/controllers/FrmStrpLitePaymentsController.php +++ b/stripe/controllers/FrmStrpLitePaymentsController.php @@ -9,6 +9,7 @@ class FrmStrpLitePaymentsController { * Get the receipt link for a Stripe payment. * * @param string $receipt + * * @return string */ public static function get_receipt_link( $receipt ) { diff --git a/stripe/controllers/FrmStrpLiteSettingsController.php b/stripe/controllers/FrmStrpLiteSettingsController.php index fe234eb8dc..4f23f6e21e 100644 --- a/stripe/controllers/FrmStrpLiteSettingsController.php +++ b/stripe/controllers/FrmStrpLiteSettingsController.php @@ -9,6 +9,7 @@ class FrmStrpLiteSettingsController { * Add Stripe section to Global Settings. * * @param array $sections + * * @return array */ public static function add_settings_section( $sections ) { @@ -22,6 +23,7 @@ public static function add_settings_section( $sections ) { 'frm_messages_settings_form', /** * @param object $frm_settings + * * @return void */ function ( $frm_settings ) { @@ -46,6 +48,7 @@ public static function route() { * Print the Stripe section for Global settings. * * @param array $atts + * * @return void */ public static function global_settings_form( $atts = array() ) { diff --git a/stripe/controllers/FrmTransLiteActionsController.php b/stripe/controllers/FrmTransLiteActionsController.php index 09f8cb330e..852d92324d 100755 --- a/stripe/controllers/FrmTransLiteActionsController.php +++ b/stripe/controllers/FrmTransLiteActionsController.php @@ -17,6 +17,7 @@ class FrmTransLiteActionsController { * Register payment action type. * * @param array $actions + * * @return array */ public static function register_actions( $actions ) { @@ -51,6 +52,7 @@ public static function actions_js() { * Add event types for actions so an email can trigger on a successful payment. * * @param array $triggers + * * @return array */ public static function add_payment_trigger( $triggers ) { @@ -65,6 +67,7 @@ public static function add_payment_trigger( $triggers ) { /** * @param array $options + * * @return array */ public static function add_trigger_to_action( $options ) { @@ -81,6 +84,7 @@ public static function add_trigger_to_action( $options ) { * @param WP_Post $action * @param stdClass $entry * @param mixed $form + * * @return void */ public static function trigger_action( $action, $entry, $form ) { @@ -107,6 +111,7 @@ public static function trigger_action( $action, $entry, $form ) { /** * @param WP_Post $action + * * @return array|string */ private static function get_gateway_for_action( $action ) { @@ -117,6 +122,7 @@ private static function get_gateway_for_action( $action ) { * @since 6.10 * * @param array $args + * * @return void */ private static function show_failed_message( $args ) { @@ -136,6 +142,7 @@ private static function show_failed_message( $args ) { * @since 6.10 * * @param stdClass $form + * * @return stdClass */ public static function include_form_with_success( $form ) { @@ -162,6 +169,7 @@ public static function replace_success_message() { * @param WP_Post $action * @param stdClass $entry * @param mixed $form + * * @return array */ public static function trigger_gateway( $action, $entry, $form ) { @@ -184,6 +192,7 @@ public static function force_message_after_create() { * @since 6.5, introduced in v1.12 of the Payments submodule. * * @param object $sub + * * @return void */ public static function trigger_subscription_status_change( $sub ) { @@ -202,6 +211,7 @@ public static function trigger_subscription_status_change( $sub ) { /** * @param array $atts + * * @return void */ public static function trigger_payment_status_change( $atts ) { @@ -242,6 +252,7 @@ public static function trigger_payment_status_change( $atts ) { * * @param object $payment * @param array $atts + * * @return void */ public static function trigger_actions_after_payment( $payment, $atts = array() ) { @@ -270,6 +281,7 @@ public static function trigger_actions_after_payment( $payment, $atts = array() * * @param WP_Post $action * @param array $atts + * * @return void */ public static function prepare_description( &$action, $atts ) { @@ -286,6 +298,7 @@ public static function prepare_description( &$action, $atts ) { * * @param mixed $amount * @param array $atts + * * @return string */ public static function prepare_amount( $amount, $atts = array() ) { @@ -318,6 +331,7 @@ public static function prepare_amount( $amount, $atts = array() ) { * Get currency to use when preparing amount. * * @param array $atts + * * @return array */ public static function get_currency_for_action( $atts ) { @@ -347,6 +361,7 @@ private static function get_amount_from_string( $amount ) { /** * @param string $amount * @param array $currency + * * @return void */ private static function maybe_use_decimal( &$amount, $currency ) { @@ -370,6 +385,7 @@ private static function maybe_use_decimal( &$amount, $currency ) { /** * @param string $amount * @param array $currency + * * @return void */ private static function normalize_number( &$amount, $currency ) { @@ -382,6 +398,7 @@ private static function normalize_number( &$amount, $currency ) { * These settings are included in frm_stripe_vars.settings global JavaScript object on Stripe forms. * * @param int $form_id + * * @return array */ public static function prepare_settings_for_js( $form_id ) { @@ -416,6 +433,7 @@ public static function prepare_settings_for_js( $form_id ) { * @since 6.5, introduced in v2.0 of the Payments submodule. * * @param WP_Post $action + * * @return array|int */ private static function get_fields_for_price( $action ) { @@ -428,6 +446,7 @@ private static function get_fields_for_price( $action ) { * Get all published payment actions. * * @param int|string $form_id + * * @return array */ public static function get_actions_for_form( $form_id ) { @@ -446,6 +465,7 @@ public static function get_actions_for_form( $form_id ) { * * @param array $values * @param stdClass $field + * * @return array */ public static function hide_gateway_field_on_front_end( $values, $field ) { @@ -470,6 +490,7 @@ public static function hide_gateway_field_on_front_end( $values, $field ) { * * @param array $values * @param stdClass $field + * * @return array */ public static function fill_entry_from_previous( $values, $field ) { @@ -499,6 +520,7 @@ public static function fill_entry_from_previous( $values, $field ) { * @since 6.5.1 * * @param int|string $entry_id + * * @return void */ private static function destroy_entry_later( $entry_id ) { @@ -513,6 +535,7 @@ private static function destroy_entry_later( $entry_id ) { * * @param int|string $entry_id * @param Closure $destroy_callback + * * @return void */ function () use ( $entry_id, &$destroy_callback ) { @@ -532,6 +555,7 @@ function () use ( $entry_id, &$destroy_callback ) { * * @param array $settings * @param array $action + * * @return array */ public static function before_save_settings( $settings, $action ) { @@ -584,6 +608,7 @@ public static function before_save_settings( $settings, $action ) { * A credit card field is added automatically if missing before a Stripe action is updated. * * @param int $form_id + * * @return false|int */ protected static function add_a_credit_card_field( $form_id ) { @@ -595,6 +620,7 @@ protected static function add_a_credit_card_field( $form_id ) { * The gateway field is not important for the Stripe Lite implementation. * * @param int $form_id + * * @return false|int */ protected static function add_a_gateway_field( $form_id ) { @@ -605,6 +631,7 @@ protected static function add_a_gateway_field( $form_id ) { * @param int $form_id * @param string $field_type * @param string $field_name + * * @return false|int */ protected static function add_a_field( $form_id, $field_type, $field_name ) { diff --git a/stripe/controllers/FrmTransLiteAppController.php b/stripe/controllers/FrmTransLiteAppController.php index 19bb28c2f6..d5e333796d 100755 --- a/stripe/controllers/FrmTransLiteAppController.php +++ b/stripe/controllers/FrmTransLiteAppController.php @@ -9,6 +9,7 @@ class FrmTransLiteAppController { * Install or upgrade database structures. * * @param mixed $old_db_version Previous database version, or false on fresh install. + * * @return void */ public static function install( $old_db_version = false ) { @@ -148,6 +149,7 @@ private static function update_sub_for_new_payment( $sub, $last_payment ) { * If the subscription has failed > 3 times, set it to canceled. * * @param object $sub + * * @return void */ private static function add_one_fail( $sub ) { @@ -168,6 +170,7 @@ private static function add_one_fail( $sub ) { /** * @param array $atts + * * @return void */ private static function maybe_trigger_changes( $atts ) { @@ -183,6 +186,7 @@ private static function maybe_trigger_changes( $atts ) { * @since 6.22 * * @param array $args + * * @return void */ public static function add_repeat_cadence_value( $args ) { diff --git a/stripe/controllers/FrmTransLiteCRUDController.php b/stripe/controllers/FrmTransLiteCRUDController.php index 2c93354868..82397e76f9 100644 --- a/stripe/controllers/FrmTransLiteCRUDController.php +++ b/stripe/controllers/FrmTransLiteCRUDController.php @@ -13,6 +13,7 @@ class FrmTransLiteCRUDController { * Show a table of either payments for subscriptions. * * @param int $id + * * @return void */ public static function show( $id = 0 ) { @@ -57,6 +58,7 @@ public static function show( $id = 0 ) { /** * @param int $id + * * @return object|null */ private static function get_payment_row( $id ) { diff --git a/stripe/controllers/FrmTransLiteEntriesController.php b/stripe/controllers/FrmTransLiteEntriesController.php index 589c9efa92..7650272bb4 100755 --- a/stripe/controllers/FrmTransLiteEntriesController.php +++ b/stripe/controllers/FrmTransLiteEntriesController.php @@ -9,6 +9,7 @@ class FrmTransLiteEntriesController { * Include payment details in the entry sidebar. * * @param stdClass $entry + * * @return void */ public static function sidebar_list( $entry ) { @@ -25,6 +26,7 @@ public static function sidebar_list( $entry ) { * Show the payment details in the entry sidebar. * * @param stdClass $entry + * * @return void */ public static function show_sidebar_list( $entry ) { diff --git a/stripe/controllers/FrmTransLiteListsController.php b/stripe/controllers/FrmTransLiteListsController.php index 54a30a034a..d3dbe44fd0 100755 --- a/stripe/controllers/FrmTransLiteListsController.php +++ b/stripe/controllers/FrmTransLiteListsController.php @@ -22,6 +22,7 @@ public static function add_list_hooks() { /** * @param array $columns + * * @return array */ public static function payment_columns( $columns = array() ) { @@ -110,6 +111,7 @@ public static function remove_screen_options( $show_screen, $screen ) { * Handle payment/subscription list routing. * * @param string $action + * * @return void */ public static function route( $action ) { @@ -139,6 +141,7 @@ public static function list_page_params() { * Display a list. * * @param array $response + * * @return void */ public static function display_list( $response = array() ) { diff --git a/stripe/controllers/FrmTransLitePaymentsController.php b/stripe/controllers/FrmTransLitePaymentsController.php index e8c62415d9..b4046a97f9 100755 --- a/stripe/controllers/FrmTransLitePaymentsController.php +++ b/stripe/controllers/FrmTransLitePaymentsController.php @@ -71,6 +71,7 @@ public static function route() { /** * @param object $payment + * * @return void */ public static function load_sidebar_actions( $payment ) { @@ -85,6 +86,7 @@ public static function load_sidebar_actions( $payment ) { * Echo a receipt link. * * @param object $payment + * * @return void */ public static function show_receipt_link( $payment ) { @@ -118,6 +120,7 @@ private static function should_filter_receipt_link( $paysys ) { * Echo a refund link. * * @param object $payment + * * @return void */ public static function show_refund_link( $payment ) { @@ -129,6 +132,7 @@ public static function show_refund_link( $payment ) { * Show a link to a payment entry (unless it is deleted). * * @param object $payment + * * @return void */ public static function show_entry_link( $payment ) { @@ -151,6 +155,7 @@ public static function show_entry_link( $payment ) { * Get a refund link. * * @param object $payment + * * @return string */ public static function refund_link( $payment ) { @@ -234,6 +239,7 @@ public static function refund_payment() { * * @param object $payment * @param string $status + * * @return void */ public static function change_payment_status( $payment, $status ) { diff --git a/stripe/controllers/FrmTransLiteSubscriptionsController.php b/stripe/controllers/FrmTransLiteSubscriptionsController.php index a19cf6728e..a0021ac9d4 100755 --- a/stripe/controllers/FrmTransLiteSubscriptionsController.php +++ b/stripe/controllers/FrmTransLiteSubscriptionsController.php @@ -7,6 +7,7 @@ class FrmTransLiteSubscriptionsController extends FrmTransLiteCRUDController { /** * @param object $subscription + * * @return void */ public static function load_sidebar_actions( $subscription ) { @@ -24,6 +25,7 @@ public static function load_sidebar_actions( $subscription ) { * @since 6.5 * * @param object $subscription + * * @return void */ public static function show_receipt_link( $subscription ) { @@ -46,6 +48,7 @@ public static function show_receipt_link( $subscription ) { /** * @param object $sub * @param array $atts + * * @return void */ public static function show_cancel_link( $sub, $atts = array() ) { @@ -61,6 +64,7 @@ public static function show_cancel_link( $sub, $atts = array() ) { /** * @param object $sub * @param array $atts + * * @return string */ public static function cancel_link( $sub, $atts = array() ) { @@ -135,6 +139,7 @@ public static function cancel_subscription() { * @since 6.5, introduced in v1.12 of the Payments submodule. * * @param array $atts + * * @return void */ public static function change_subscription_status( $atts ) { diff --git a/stripe/helpers/FrmStrpLiteApiHelper.php b/stripe/helpers/FrmStrpLiteApiHelper.php index d88a8e2c92..7d94272a70 100644 --- a/stripe/helpers/FrmStrpLiteApiHelper.php +++ b/stripe/helpers/FrmStrpLiteApiHelper.php @@ -14,6 +14,7 @@ class FrmStrpLiteApiHelper { * This function exists so payments can be refunded when Authorize.Net is active. * * @param int $payment_id + * * @return bool */ public static function refund_payment( $payment_id ) { @@ -28,6 +29,7 @@ public static function refund_payment( $payment_id ) { * This function exists so subscriptions can be cancelled when Authorize.Net is active. * * @param string $sub_id + * * @return bool */ public static function cancel_subscription( $sub_id ) { diff --git a/stripe/helpers/FrmStrpLiteAppHelper.php b/stripe/helpers/FrmStrpLiteAppHelper.php index 706f2db7d4..5d8a9f1e4f 100644 --- a/stripe/helpers/FrmStrpLiteAppHelper.php +++ b/stripe/helpers/FrmStrpLiteAppHelper.php @@ -34,6 +34,7 @@ public static function plugin_url() { /** * @param string $function * @param array ...$params + * * @return mixed */ public static function call_stripe_helper_class( $function, ...$params ) { diff --git a/stripe/helpers/FrmStrpLiteConnectApiAdapter.php b/stripe/helpers/FrmStrpLiteConnectApiAdapter.php index 34011e109c..ea1bf92990 100644 --- a/stripe/helpers/FrmStrpLiteConnectApiAdapter.php +++ b/stripe/helpers/FrmStrpLiteConnectApiAdapter.php @@ -18,6 +18,7 @@ public static function initialize_api() { /** * @param string $sub_id + * * @return bool */ public static function cancel_subscription( $sub_id ) { @@ -36,6 +37,7 @@ public static function cancel_subscription( $sub_id ) { /** * @param string $payment_id + * * @return bool */ public static function refund_payment( $payment_id ) { @@ -46,6 +48,7 @@ public static function refund_payment( $payment_id ) { * Get the payment intent from Stripe * * @param string $payment_id + * * @return mixed */ public static function get_intent( $payment_id ) { @@ -61,6 +64,7 @@ public static function get_customer_subscriptions() { /** * @param array $options + * * @return object|string */ public static function get_customer( $options = array() ) { @@ -118,6 +122,7 @@ public static function get_customer( $options = array() ) { /** * @param string $customer_id + * * @return object */ private static function create_decoy_customer( $customer_id ) { @@ -129,6 +134,7 @@ private static function create_decoy_customer( $customer_id ) { /** * @param int $user_id + * * @return mixed */ public static function get_customer_by_id( $user_id ) { @@ -149,6 +155,7 @@ public static function get_customer_by_id( $user_id ) { /** * @param string $event_id + * * @return mixed */ public static function get_event( $event_id ) { @@ -166,6 +173,7 @@ public static function maybe_create_plan( $plan ) { /** * @param array $new_charge + * * @return false|object|string */ public static function create_subscription( $new_charge ) { @@ -174,6 +182,7 @@ public static function create_subscription( $new_charge ) { /** * @param array $new_charge + * * @return mixed */ public static function create_intent( $new_charge ) { @@ -183,6 +192,7 @@ public static function create_intent( $new_charge ) { /** * @param string $intent_id * @param array $data + * * @return mixed */ public static function update_intent( $intent_id, $data ) { @@ -197,6 +207,7 @@ public static function update_intent( $intent_id, $data ) { * * @param string $customer_id Customer ID beginning with cus_. * @param array|false $payment_method_types If false the types will defaults to array( 'card', 'link' ). + * * @return false|object|string */ public static function create_setup_intent( $customer_id, $payment_method_types = false ) { @@ -209,6 +220,7 @@ public static function create_setup_intent( $customer_id, $payment_method_types * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param string $setup_id + * * @return false|object|string */ public static function get_setup_intent( $setup_id ) { diff --git a/stripe/helpers/FrmStrpLiteConnectHelper.php b/stripe/helpers/FrmStrpLiteConnectHelper.php index 0d384843f3..5ab1dd103f 100644 --- a/stripe/helpers/FrmStrpLiteConnectHelper.php +++ b/stripe/helpers/FrmStrpLiteConnectHelper.php @@ -129,6 +129,7 @@ private static function initialize() { * Generate a new client password for authenticating with Connect Service and save it locally as an option. * * @param string $mode 'live' or 'test'. + * * @return string the client password. */ private static function generate_client_password( $mode ) { @@ -140,6 +141,7 @@ private static function generate_client_password( $mode ) { /** * @param string $action * @param array $additional_body + * * @return object|string */ private static function post_to_connect_server( $action, $additional_body = array() ) { @@ -193,6 +195,7 @@ private static function try_to_extend_server_timeout( $timeout ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string either _test or _live. */ private static function get_active_mode_option_name_suffix( $mode = 'auto' ) { @@ -205,6 +208,7 @@ private static function get_active_mode_option_name_suffix( $mode = 'auto' ) { /** * @param string $key 'account_id', 'client_password', 'server_password', 'details_submitted'. * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_strp_connect_option_name( $key, $mode = 'auto' ) { @@ -213,6 +217,7 @@ private static function get_strp_connect_option_name( $key, $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_account_id_option_name( $mode = 'auto' ) { @@ -221,6 +226,7 @@ private static function get_account_id_option_name( $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_client_side_token_option_name( $mode = 'auto' ) { @@ -229,6 +235,7 @@ private static function get_client_side_token_option_name( $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_server_side_token_option_name( $mode = 'auto' ) { @@ -237,6 +244,7 @@ private static function get_server_side_token_option_name( $mode = 'auto' ) { /** * @param string $mode either 'auto', 'live', or 'test'. + * * @return string */ private static function get_stripe_details_submitted_option_name( $mode = 'auto' ) { @@ -397,6 +405,7 @@ private static function check_server_for_oauth_account_id() { * On a successful account status check, set details_submitted option. * * @param string $mode 'live' or 'test'. + * * @return void */ private static function set_stripe_details_as_submitted( $mode ) { @@ -471,6 +480,7 @@ public static function check_server_for_connected_account_status() { /** * @param string $mode + * * @return bool */ public static function stripe_connect_is_setup( $mode = 'auto' ) { @@ -479,6 +489,7 @@ public static function stripe_connect_is_setup( $mode = 'auto' ) { /** * @param mixed $response + * * @return bool */ private static function validate_response( $response ) { @@ -524,6 +535,7 @@ private static function build_headers_for_post() { * If it is active, use the WPML "absolute home" URL which is not modified. * * @param string $url + * * @return string */ private static function maybe_fix_wpml_url( $url ) { @@ -538,6 +550,7 @@ private static function maybe_fix_wpml_url( $url ) { * WPML might add a language to the url. Don't send that to the server. * * @param string $url URL. + * * @return string */ private static function strip_lang_from_url( $url ) { @@ -576,6 +589,7 @@ private static function get_uuid() { /** * @param bool $connected + * * @return string */ private static function get_url_for_stripe_settings( $connected ) { @@ -625,6 +639,7 @@ private static function render_settings() { /** * @todo I can probably remove this. + * * @return void */ public static function stripe_icon() { @@ -657,6 +672,7 @@ private static function register_settings_scripts() { /** * @param string $mode + * * @return bool|string */ public static function get_account_id( $mode = 'auto' ) { @@ -665,6 +681,7 @@ public static function get_account_id( $mode = 'auto' ) { /** * @param array $options + * * @return false|string */ public static function get_customer_id( $options ) { @@ -681,6 +698,7 @@ public static function get_customer_id( $options ) { /** * @param string $customer_id + * * @return bool */ public static function validate_customer( $customer_id ) { @@ -716,6 +734,7 @@ private static function post_with_authenticated_body( $action, $additional_body /** * @param array $new_charge + * * @return mixed */ public static function create_intent( $new_charge ) { @@ -729,6 +748,7 @@ public static function create_intent( $new_charge ) { /** * @param string $payment_id + * * @return bool */ public static function refund_payment( $payment_id ) { @@ -739,6 +759,7 @@ public static function refund_payment( $payment_id ) { /** * @param array $new_charge + * * @return mixed */ public static function create_subscription( $new_charge ) { @@ -757,6 +778,7 @@ public static function create_subscription( $new_charge ) { /** * @param string $sub_id * @param false|string $customer_id if specified, this will enforce a customer id match (bypassed for users with administrator permission). + * * @return bool */ public static function cancel_subscription( $sub_id, $customer_id = false ) { @@ -768,6 +790,7 @@ public static function cancel_subscription( $sub_id, $customer_id = false ) { /** * @param string $payment_id + * * @return mixed */ public static function get_intent( $payment_id ) { @@ -792,6 +815,7 @@ public static function get_customer_subscriptions() { /** * @param string $event_id + * * @return false|object */ public static function get_event( $event_id ) { @@ -811,6 +835,7 @@ public static function get_event( $event_id ) { /** * @param string $event_id + * * @return mixed */ public static function process_event( $event_id ) { @@ -819,6 +844,7 @@ public static function process_event( $event_id ) { /** * @param array $plan + * * @return false|string */ public static function maybe_create_plan( $plan ) { @@ -831,6 +857,7 @@ public static function maybe_create_plan( $plan ) { /** * @param array $plan + * * @return mixed */ public static function create_plan( $plan ) { @@ -840,6 +867,7 @@ public static function create_plan( $plan ) { /** * @param string $intent_id * @param array $data + * * @return bool */ public static function update_intent( $intent_id, $data ) { @@ -867,6 +895,7 @@ public static function get_unprocessed_event_ids() { * * @param string $customer_id * @param array|false $payment_method_types + * * @return false|object|string */ public static function create_setup_intent( $customer_id, $payment_method_types = false ) { @@ -889,6 +918,7 @@ public static function create_setup_intent( $customer_id, $payment_method_types * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param string $setup_id + * * @return false|object|string */ public static function get_setup_intent( $setup_id ) { diff --git a/stripe/helpers/FrmStrpLiteLinkRedirectHelper.php b/stripe/helpers/FrmStrpLiteLinkRedirectHelper.php index a8bf418abb..20eec47432 100644 --- a/stripe/helpers/FrmStrpLiteLinkRedirectHelper.php +++ b/stripe/helpers/FrmStrpLiteLinkRedirectHelper.php @@ -26,6 +26,7 @@ class FrmStrpLiteLinkRedirectHelper { /** * @param string $stripe_id either a Payment Intent ID (prefixed with pi_) or a Setup Intent ID (prefixed with seti_). * @param string $client_secret + * * @return void */ public function __construct( $stripe_id, $client_secret ) { @@ -38,6 +39,7 @@ public function __construct( $stripe_id, $client_secret ) { * This is separate from the constructor as the entry ID isn't known for some error cases. * * @param int|string $entry_id + * * @return void */ public function set_entry_id( $entry_id ) { @@ -47,6 +49,7 @@ public function set_entry_id( $entry_id ) { /** * @param string $error_code * @param string $charge_id + * * @return void */ public function handle_error( $error_code, $charge_id = '' ) { @@ -76,6 +79,7 @@ public function handle_error( $error_code, $charge_id = '' ) { * * @param stdClass $entry * @param string $charge_id + * * @return void */ public function handle_success( $entry, $charge_id ) { @@ -133,6 +137,7 @@ private function url_is_external( $url ) { * If it is found, it will also be deleted as it is only required once. * * @param int|string $entry_id + * * @return false|string */ private function get_referer_url( $entry_id ) { @@ -164,6 +169,7 @@ private function get_referer_url( $entry_id ) { * Delete the referer meta as we'll no longer need it. * * @param int $row_id + * * @return void */ private static function delete_temporary_referer_meta( $row_id ) { diff --git a/stripe/helpers/FrmStrpLiteSubscriptionHelper.php b/stripe/helpers/FrmStrpLiteSubscriptionHelper.php index eb1ad1f35a..d7c423c604 100644 --- a/stripe/helpers/FrmStrpLiteSubscriptionHelper.php +++ b/stripe/helpers/FrmStrpLiteSubscriptionHelper.php @@ -14,11 +14,13 @@ class FrmStrpLiteSubscriptionHelper { * Prepare a charge object for a Stripe subscription. * * @since 6.5, introduced in v3.0 of the Stripe add on. + * * @todo I removed the $charge_object->paid = false; line from here is it isn't required for Stripe link. * Make sure that if/when we re-use this in Stripe that we still include that. * * @param object $subscription A Stripe Subscription object. * @param string $amount + * * @return stdClass */ public static function prepare_charge_object_for_subscription( $subscription, $amount ) { @@ -37,6 +39,7 @@ public static function prepare_charge_object_for_subscription( $subscription, $a * @since 6.5 * * @param array $atts + * * @return int|string $sub_id */ public static function create_new_subscription( $atts ) { @@ -82,6 +85,7 @@ public static function create_new_subscription( $atts ) { * @type WP_Post $action * @type string $amount * } + * * @return string Plan id. */ public static function get_plan_from_atts( $atts ) { @@ -94,6 +98,7 @@ public static function get_plan_from_atts( $atts ) { * @since 6.5 * * @param WP_Post $action + * * @return false|string */ private static function get_plan_for_action( $action ) { @@ -112,6 +117,7 @@ private static function get_plan_for_action( $action ) { * @since 6.5 * * @param array $settings + * * @return array */ public static function prepare_plan_options( $settings ) { @@ -138,6 +144,7 @@ public static function prepare_plan_options( $settings ) { * @since 3.0 This was moved from FrmStrpLiteActionsController. * * @param array $plan + * * @return mixed */ public static function maybe_create_plan( $plan ) { @@ -153,6 +160,7 @@ public static function maybe_create_plan( $plan ) { * @since 6.5 * * @param mixed $trial + * * @return int */ private static function get_trial_with_default( $trial ) { @@ -172,6 +180,7 @@ private static function get_trial_with_default( $trial ) { * @param array $charge_data * @param WP_Post $action * @param int $amount + * * @return false|object|string */ public static function maybe_create_missing_plan_and_create_subscription( $subscription, $charge_data, $action, $amount ) { @@ -209,6 +218,7 @@ public static function should_cancel_at_period_end() { * @param string $payment_limit The raw payment value string. It is not empty. * @param int $form_id Required for processing shortcodes. * @param int $entry_id Required for processing shortcodes. + * * @return int|WP_Error */ public static function prepare_payment_limit( $payment_limit, $form_id, $entry_id ) { @@ -238,6 +248,7 @@ public static function prepare_payment_limit( $payment_limit, $form_id, $entry_i * @since 6.11 * * @param string $payment_limit + * * @return WP_Error */ private static function get_invalid_payment_limit_error( $payment_limit ) { diff --git a/stripe/helpers/FrmStrpLiteUrlParamHelper.php b/stripe/helpers/FrmStrpLiteUrlParamHelper.php index 7492341e6f..196bd37ed8 100644 --- a/stripe/helpers/FrmStrpLiteUrlParamHelper.php +++ b/stripe/helpers/FrmStrpLiteUrlParamHelper.php @@ -23,6 +23,7 @@ class FrmStrpLiteUrlParamHelper { * This includes the intent, the entry, and the payments table model instance. * * @param int|string $form_id + * * @return array|false */ public static function get_details_for_form( $form_id ) { @@ -45,6 +46,7 @@ public static function get_details_for_form( $form_id ) { * @since 6.5.1 * * @param int|string $form_id + * * @return void */ private static function set_details_for_form( $form_id ) { @@ -104,6 +106,7 @@ private static function set_details_for_form( $form_id ) { * * @param object $intent * @param bool $is_setup_intent + * * @return bool True if the client secret is set and valid. */ private static function verify_client_secret( $intent, $is_setup_intent ) { diff --git a/stripe/helpers/FrmTransLiteAppHelper.php b/stripe/helpers/FrmTransLiteAppHelper.php index ba05cebb3b..9d2d47b016 100755 --- a/stripe/helpers/FrmTransLiteAppHelper.php +++ b/stripe/helpers/FrmTransLiteAppHelper.php @@ -62,6 +62,7 @@ public static function payments_table_exists() { * Get a payment status label. * * @param string $status The lowercase payment status value. + * * @return string */ public static function show_status( $status ) { @@ -73,6 +74,7 @@ public static function show_status( $status ) { * Get Payment status from a payment with support for PayPal backward compatibility. * * @param stdClass $payment + * * @return string */ public static function get_payment_status( $payment ) { @@ -117,6 +119,7 @@ public static function get_subscription_statuses() { * * @param array $payment_values * @param string $message + * * @return void */ public static function add_note_to_payment( &$payment_values, $message = '' ) { @@ -185,6 +188,7 @@ public static function get_action_settings( $atts ) { * Allow entry values, default values, and other shortcodes * * @param array $atts Includes value (required), form, entry. + * * @return int|string */ public static function process_shortcodes( $atts ) { @@ -210,6 +214,7 @@ public static function process_shortcodes( $atts ) { /** * @param object $sub + * * @return string */ public static function format_billing_cycle( $sub ) { @@ -239,6 +244,7 @@ public static function get_repeat_times() { * @since 6.5, introduced in v1.16 of the Payments submodule. * * @param int $number + * * @return array */ private static function get_plural_repeat_times( $number ) { @@ -255,6 +261,7 @@ private static function get_plural_repeat_times( $number ) { * * @param string $value * @param int $number + * * @return string */ public static function get_repeat_label_from_value( $value, $number ) { @@ -297,6 +304,7 @@ public static function formatted_amount( $payment ) { * @since 6.7 * * @param array|float|object|string $payment Payment object, payment array or amount. + * * @return array Return the array with the first element is the amount, the second one is the currency value. */ public static function get_amount_and_currency_from_payment( $payment ) { @@ -319,6 +327,7 @@ public static function get_amount_and_currency_from_payment( $payment ) { /** * @param array $currency * @param float $amount + * * @return void */ public static function format_amount_for_currency( $currency, &$amount ) { @@ -348,6 +357,7 @@ public static function get_date_format() { /** * @param string $date * @param string $format + * * @return string */ public static function format_the_date( $date, $format = '' ) { @@ -372,6 +382,7 @@ public static function get_user_id_for_current_payment() { /** * @param int $user_id + * * @return string */ public static function get_user_link( $user_id ) { @@ -388,6 +399,7 @@ public static function get_user_link( $user_id ) { /** * @param mixed $value * @param string $label + * * @return void */ public static function show_in_table( $value, $label ) { @@ -409,6 +421,7 @@ public static function show_in_table( $value, $label ) { * @since 6.5 * * @param string $link + * * @return void */ public static function echo_confirmation_link( $link ) { @@ -425,6 +438,7 @@ public static function echo_confirmation_link( $link ) { * @since 6.5 * * @param array $allowed + * * @return array */ public static function allow_deleteconfirm_data_attribute( $allowed ) { @@ -491,6 +505,7 @@ public static function should_fallback_to_paypal() { * @since 6.6 * * @param stdClass $payment + * * @return string */ public static function get_test_mode_display_string( $payment ) { diff --git a/stripe/helpers/FrmTransLiteListHelper.php b/stripe/helpers/FrmTransLiteListHelper.php index 702ecbe4cd..23cfbc3398 100755 --- a/stripe/helpers/FrmTransLiteListHelper.php +++ b/stripe/helpers/FrmTransLiteListHelper.php @@ -182,6 +182,7 @@ public function get_sortable_columns() { /** * @param string $which + * * @return void */ public function extra_tablenav( $which ) { @@ -380,6 +381,7 @@ private function get_action_column( $item, $field ) { /** * @param object $item + * * @return array */ private function get_row_actions( $item ) { @@ -404,6 +406,7 @@ private function get_row_actions( $item ) { * Get the column value for displaying an entry ID. * * @param object $item A payment or subscription object. + * * @return string */ private function get_item_id_column( $item ) { @@ -421,6 +424,7 @@ private function get_item_id_column( $item ) { /** * @param object $item * @param array $atts + * * @return mixed */ private function get_form_id_column( $item, $atts ) { @@ -434,6 +438,7 @@ private function get_form_id_column( $item, $atts ) { /** * @param object $item + * * @return string */ private function get_user_id_column( $item ) { @@ -445,6 +450,7 @@ private function get_user_id_column( $item ) { /** * @param object $item * @param array $atts + * * @return string */ private function get_created_at_column( $item, $atts ) { @@ -515,6 +521,7 @@ function () { /** * @param object $item + * * @return string */ private function get_sub_id_column( $item ) { @@ -535,6 +542,7 @@ private function get_sub_id_column( $item ) { * * @param object $item * @param array $atts + * * @return string */ private function get_paysys_column( $item, $atts ) { @@ -556,6 +564,7 @@ private function get_paysys_column( $item, $atts ) { * @since 6.6 * * @param stdClass $item Payment or Subscription object. + * * @return string */ private function get_mode_column( $item ) { diff --git a/stripe/models/FrmStrpLiteAuth.php b/stripe/models/FrmStrpLiteAuth.php index 10307bccaf..806ff714fd 100644 --- a/stripe/models/FrmStrpLiteAuth.php +++ b/stripe/models/FrmStrpLiteAuth.php @@ -19,6 +19,7 @@ class FrmStrpLiteAuth { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param string $html Form HTML that gets filtered through frm_filter_final_form. + * * @return string */ public static function maybe_show_message( $html ) { @@ -78,6 +79,7 @@ public static function maybe_show_message( $html ) { /** * @param int|string $form_id + * * @return array|false */ private static function check_request_params( $form_id ) { @@ -103,6 +105,7 @@ private static function check_request_params( $form_id ) { * @since 6.5 * * @param string $html + * * @return false|int Matching form id or false if there is no match. */ private static function check_html_for_form_id_match( $html ) { @@ -123,6 +126,7 @@ private static function check_html_for_form_id_match( $html ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param string $code + * * @return string */ private static function get_message_for_stripe_link_code( $code ) { @@ -153,6 +157,7 @@ private static function get_message_for_stripe_link_code( $code ) { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param array $atts + * * @return void */ private static function prepare_success_atts( &$atts ) { @@ -192,6 +197,7 @@ private static function insert_error_message( $message, &$form ) { * Include the token if going between pages. * * @param object $form The form being submitted. + * * @return void */ public static function add_hidden_token_field( $form ) { @@ -223,6 +229,7 @@ public static function add_hidden_token_field( $form ) { * * @param array $intents * @param stdClass $form + * * @return void */ private static function include_intents_in_form( $intents, $form ) { @@ -245,6 +252,7 @@ private static function include_intents_in_form( $intents, $form ) { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param string $name + * * @return mixed */ public static function get_payment_intents( $name ) { @@ -305,8 +313,10 @@ public static function update_intent_ajax() { * Update pricing on page turn and non-ajax validation. * * @since 6.5, introduced in v2.0 of the Stripe add on. + * * @param int $form_id * @param array $intents + * * @return void */ private static function update_intent_pricing( $form_id, &$intents ) { @@ -374,6 +384,7 @@ private static function update_intent_pricing( $form_id, &$intents ) { * Create an entry object with posted values. * * @since 6.5, introduced in v2.0 of the Stripe add on. + * * @return stdClass */ private static function generate_false_entry() { @@ -408,6 +419,7 @@ private static function generate_false_entry() { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param array $form + * * @return void */ private static function format_form_data( &$form ) { @@ -436,6 +448,7 @@ private static function format_form_data( &$form ) { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param int|string $form_id + * * @return array */ private static function maybe_create_intents( $form_id ) { @@ -498,6 +511,7 @@ private static function maybe_create_intents( $form_id ) { * @since 3.0 This code was moved out of self::maybe_create_intents into a new function. * * @param WP_Post $action + * * @return mixed */ private static function create_intent( $action ) { @@ -536,6 +550,7 @@ private static function create_intent( $action ) { * Add the statement descriptor to the intent data, if it is valid. * * @param array $intent_data + * * @return array */ private static function maybe_add_statement_descriptor( $intent_data ) { @@ -586,6 +601,7 @@ private static function get_statement_descriptor() { * @since 6.23 * * @param string $name The name of the site. + * * @return string The name with special characters removed. */ private static function strip_special_characters_from_statement_descriptor( $name ) { @@ -607,6 +623,7 @@ private static function strip_special_characters_from_statement_descriptor( $nam * @since 6.23 * * @param string $name Passed by reference, as this is updated if it is too long. + * * @return bool */ private static function statement_descriptor_is_valid( &$name ) { @@ -631,6 +648,7 @@ private static function statement_descriptor_is_valid( &$name ) { * @since 6.5, introduced in v3.0 of the Stripe add on. * * @param array $payment_method_types + * * @return false|object */ private static function create_setup_intent( $payment_method_types ) { @@ -652,6 +670,7 @@ private static function create_setup_intent( $payment_method_types ) { * * @param int|string $form_id * @param array $actions + * * @return void */ private static function add_amount_to_actions( $form_id, &$actions ) { @@ -670,6 +689,7 @@ private static function add_amount_to_actions( $form_id, &$actions ) { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param array $atts + * * @return string */ private static function get_amount_before_submit( $atts ) { @@ -684,6 +704,7 @@ private static function get_amount_before_submit( $atts ) { * @since 6.5, introduced in v2.0 of the Stripe add on. * * @param array $atts + * * @return string */ public static function return_url( $atts ) { @@ -712,6 +733,7 @@ public static function return_url( $atts ) { * @type stdClass $form * @type stdClass $entry * } + * * @return string */ private static function get_redirect_url( $atts ) { @@ -755,6 +777,7 @@ private static function get_message_url( $atts ) { * * @param int|string $entry_id * @param bool $delete_meta + * * @return false|string */ public static function get_referer_url( $entry_id, $delete_meta = true ) { @@ -786,6 +809,7 @@ public static function get_referer_url( $entry_id, $delete_meta = true ) { * Delete the referer meta as we'll no longer need it. * * @param int $row_id + * * @return void */ private static function delete_temporary_referer_meta( $row_id ) { @@ -799,6 +823,7 @@ private static function delete_temporary_referer_meta( $row_id ) { * @since 6.5.1 * * @param object $intent + * * @return bool */ private static function intent_has_failed_status( $intent ) { @@ -812,6 +837,7 @@ private static function intent_has_failed_status( $intent ) { * * @param object $payment * @param object $intent + * * @return bool */ public static function payment_failed( $payment, $intent ) { diff --git a/stripe/models/FrmStrpLitePaymentTypeHandler.php b/stripe/models/FrmStrpLitePaymentTypeHandler.php index b844458567..38cade7d2f 100644 --- a/stripe/models/FrmStrpLitePaymentTypeHandler.php +++ b/stripe/models/FrmStrpLitePaymentTypeHandler.php @@ -19,6 +19,7 @@ class FrmStrpLitePaymentTypeHandler { * @since 6.5, introduced in v3.1 of the Stripe add on. * * @param WP_Post $action + * * @return bool */ public static function should_use_automatic_payment_methods( $action ) { @@ -31,6 +32,7 @@ public static function should_use_automatic_payment_methods( $action ) { * @since 6.5, introduced in v3.1 of the Stripe add on. * * @param WP_Post $action + * * @return string[] An empty array is treated as automatic. */ public static function get_payment_method_types( $action ) { @@ -44,6 +46,7 @@ public static function get_payment_method_types( $action ) { * @since 6.5, introduced in v3.1 of the Stripe add on. * * @param WP_Post $action + * * @return string[] */ private static function get_filtered_payment_method_types( $action ) { @@ -55,6 +58,7 @@ private static function get_filtered_payment_method_types( $action ) { * * @param array $payment_method_types * @param array $args { + * * @type WP_Post $action * } */ diff --git a/stripe/models/FrmStrpLiteSettings.php b/stripe/models/FrmStrpLiteSettings.php index 7b46dfe897..48680c9809 100644 --- a/stripe/models/FrmStrpLiteSettings.php +++ b/stripe/models/FrmStrpLiteSettings.php @@ -34,6 +34,7 @@ public function default_options() { /** * @param mixed $settings + * * @return void */ public function set_default_options( $settings = false ) { @@ -81,6 +82,7 @@ public function get_options() { /** * @param array $params + * * @return void */ public function update( $params ) { diff --git a/stripe/models/FrmTransLiteAction.php b/stripe/models/FrmTransLiteAction.php index a6c908093e..6648a3a815 100755 --- a/stripe/models/FrmTransLiteAction.php +++ b/stripe/models/FrmTransLiteAction.php @@ -52,6 +52,7 @@ public function form( $instance, $args = array() ) { * @since 6.5 * * @param string $selected_gateway The selected gateway for the given payment action. + * * @return void */ public function echo_capture_payment_upsell( $selected_gateway = 'stripe' ) { @@ -106,6 +107,7 @@ private function default_currency() { /** * @param mixed $form_id + * * @return array */ public function get_field_options( $form_id ) { @@ -140,6 +142,7 @@ public function get_field_options( $form_id ) { * This is saved as part of the Stripe payment action. * * @param array $form_atts + * * @return int */ public function get_credit_card_field_id( $form_atts ) { @@ -163,6 +166,7 @@ public function get_credit_card_field_id( $form_atts ) { * * @param array $form_atts * @param array $field_atts + * * @return void */ public function show_fields_dropdown( $form_atts, $field_atts ) { diff --git a/stripe/models/FrmTransLiteDb.php b/stripe/models/FrmTransLiteDb.php index 756c43117c..2926569a7b 100755 --- a/stripe/models/FrmTransLiteDb.php +++ b/stripe/models/FrmTransLiteDb.php @@ -27,6 +27,7 @@ class FrmTransLiteDb { /** * @param mixed $old_db_version + * * @return void */ public function upgrade( $old_db_version = false ) { @@ -99,6 +100,7 @@ public function upgrade( $old_db_version = false ) { /** * @param array $values + * * @return int */ public function create( $values ) { @@ -116,6 +118,7 @@ public function create( $values ) { /** * @param int|string $id * @param array $values + * * @return false|int */ public function update( $id, $values ) { @@ -130,6 +133,7 @@ public function update( $id, $values ) { /** * @param int|string $id + * * @return bool|int */ public function &destroy( $id ) { @@ -157,6 +161,7 @@ public function &destroy( $id ) { /** * @param int|string $id + * * @return array|object|null */ public function get_one( $id ) { @@ -174,6 +179,7 @@ public function get_one( $id ) { /** * @param int|string $id * @param string $field + * * @return object|null */ public function get_one_by( $id, $field = 'receipt_id' ) { @@ -282,6 +288,7 @@ public function get_defaults() { /** * @param array $values * @param array $new_values + * * @return void */ private function fill_values( $values, &$new_values ) { diff --git a/stripe/models/FrmTransLiteLog.php b/stripe/models/FrmTransLiteLog.php index 658d0a9ef5..a38ffa3731 100644 --- a/stripe/models/FrmTransLiteLog.php +++ b/stripe/models/FrmTransLiteLog.php @@ -11,6 +11,7 @@ class FrmTransLiteLog { * @param string $title * @param string $text * @param bool $is_error When this is false, the message will not be logged to the error log if the logging add-on is unavailable. + * * @return void */ public static function log_message( $title, $text, $is_error = true ) { diff --git a/stripe/models/FrmTransLitePayment.php b/stripe/models/FrmTransLitePayment.php index f57f411fdc..3bda98abed 100755 --- a/stripe/models/FrmTransLitePayment.php +++ b/stripe/models/FrmTransLitePayment.php @@ -76,6 +76,7 @@ public function get_defaults() { * * @param string $from_date From date. * @param string $to_date To date. + * * @return array Contains `count` and `total`. */ public function get_payments_stats( $from_date = null, $to_date = null ) { @@ -126,6 +127,7 @@ public function get_payments_stats( $from_date = null, $to_date = null ) { * @since 6.7 * * @param object[] $payments Array of payment objects. + * * @return array Return array of total amount for each currency. */ private function get_payment_total_data( $payments ) { diff --git a/stripe/views/action-settings/payments-options.php b/stripe/views/action-settings/payments-options.php index a3e9cd75a3..768de4b0ef 100755 --- a/stripe/views/action-settings/payments-options.php +++ b/stripe/views/action-settings/payments-options.php @@ -153,6 +153,7 @@ * @since 6.5 * * @param array $args { + * * @type FrmFormAction $action_control * @type array $field_dropdown_atts * } diff --git a/stubs.php b/stubs.php index 69d25ee5a8..c365293899 100644 --- a/stubs.php +++ b/stubs.php @@ -65,6 +65,7 @@ public static function use_chosen_js() { * @param array|string $selected * @param string $current * @param bool $echo + * * @return string */ public static function selected( $selected, $current, $echo = true ) { @@ -89,6 +90,7 @@ public static function get_post_or_meta_value( $entry, $field, $atts = array() ) * @param int|object|string $field_id * @param array|string $value * @param false|int|string $entry_id + * * @return array|object|string|null */ public static function &value_exists( $field_id, $value, $entry_id = false ) { @@ -100,6 +102,7 @@ class FrmProFormActionsController { /** * @param WP_Post $action * @param stdClass $entry + * * @return bool */ public static function action_conditions_met( $action, $entry ) { @@ -116,6 +119,7 @@ public static function maybe_create_layouts_for_view( $view_id, $listing_layout, /** * @param int $view_id * @param false|string $type + * * @return array|false|object */ public static function get_layouts_for_view( $view_id, $type = false ) { @@ -128,6 +132,7 @@ public static function get_shortcodes( $content, $form_id ) { class FrmProAddonsController { /** * @param bool $force_type + * * @return string */ public static function license_type( $force_type = false ) { @@ -140,12 +145,14 @@ public static function is_license_expiring() { /** * @param string $plugin * @param array|string $upgrade_link_args + * * @return void */ public static function conditional_action_button( $plugin, $upgrade_link_args ) { } /** * @param array $atts + * * @return void */ public static function show_conditional_action_button( $atts ) { @@ -173,12 +180,14 @@ class FrmProDb { class FrmProStylesController extends FrmStylesController { /** * @param int $form_id + * * @return WP_Post */ public static function get_active_style_for_form( $form_id ) { } /** * @param stdClass|WP_Post $active_style + * * @return array */ public static function get_styles_for_styler( $active_style ) { @@ -198,6 +207,7 @@ class FrmProPost { /** * @param array $field * @param array $args + * * @return string */ public static function get_category_dropdown( $field, $args ) { @@ -208,6 +218,7 @@ public static function show_entry_shortcode( $atts ) { } /** * @param array $atts + * * @return string */ public static function entry_delete_link( $atts ) { @@ -217,11 +228,13 @@ public static function entry_delete_link( $atts ) { * @param stdClass $form * @param int $entry_id * @param array $args + * @param array $form_options */ public static function confirmation( $method, $form, $form_options, $entry_id, $args = array() ) { } /** * @param object $form + * * @return bool */ public static function is_form_displayed_after_edit( $form ) { @@ -229,6 +242,7 @@ public static function is_form_displayed_after_edit( $form ) { /** * @param object $entry * @param array $args + * * @return void */ public static function show_front_end_form_with_entry( $entry, $args ) { @@ -247,6 +261,7 @@ class FrmProEntry { /** * @param array|false $values * @param string $location + * * @return array */ public static function mod_other_vals( $values = false, $location = 'front' ) { @@ -261,6 +276,7 @@ public static function get_search_str( $where_clause, $search_str, $form_id = 0, * @param object $field * @param object $entry * @param array|int|string $field_value + * * @return void */ public static function get_dynamic_list_values( $field, $entry, &$field_value ) { @@ -280,12 +296,14 @@ class FrmProFieldsHelper { /** * @param array $args * @param string $value + * * @return void */ public static function replace_non_standard_formidable_shortcodes( $args, &$value ) { } /** * @param array|object $field + * * @return bool */ public static function &is_field_visible_to_user( $field ) { @@ -303,6 +321,7 @@ class FrmProCreditCardsController { * @param array $field * @param string $field_name * @param array $atts + * * @return void */ public static function show_in_form( $field, $field_name, $atts ) { @@ -320,6 +339,7 @@ class Akismet { * @param string $request * @param string $path * @param string $ip + * * @return array */ public static function http_post( $request, $path, $ip = null ) { @@ -338,6 +358,7 @@ class FrmPaymentsController { public static $db_opt_name = 'frm_pay_db_version'; /** * @param array $cols + * * @return array */ public static function payment_columns( $cols = array() ) { @@ -351,18 +372,21 @@ public static function should_display_videos() { } /** * @param array $entries_template + * * @return void */ public static function get_main_widget( $entries_template ) { } /** * @param array $entries_template + * * @return void */ public static function get_bottom_widget( $entries_template ) { } /** * @param array $template + * * @return void */ public static function load_license_management( $template ) { @@ -419,6 +443,7 @@ function WP_Optimize() { * Function from W3 Total cache. * * @param array|null $extras Extras. + * * @return void */ function w3tc_flush_all( $extras = null ) { @@ -426,6 +451,7 @@ function w3tc_flush_all( $extras = null ) { class FrmTransListsController { /** * @param array $columns + * * @return array */ public static function payment_columns( $columns = array() ) { @@ -434,6 +460,7 @@ public static function payment_columns( $columns = array() ) { class FrmProSettingsController { /** * @param string $count + * * @return string */ public static function inbox_badge( $count ) {} @@ -445,6 +472,7 @@ public static function add_currency_settings() {} class FrmProAddressesController extends FrmProComboFieldsController { /** * @param string $country + * * @return string */ public static function get_country_code( $country ) { @@ -493,6 +521,7 @@ public static function init() { * @param string $group * @param string $key * @param bool $strip_slashes + * * @return mixed|null */ public function get( $group, $key, $strip_slashes = true ) { diff --git a/tests/phpunit/base/FrmUnitTest.php b/tests/phpunit/base/FrmUnitTest.php index b980a165dc..cfe06d694e 100644 --- a/tests/phpunit/base/FrmUnitTest.php +++ b/tests/phpunit/base/FrmUnitTest.php @@ -395,6 +395,10 @@ public function set_admin_screen( $page = 'index.php' ) { * Set the admin page parameters for the later code to use * * @since 3.0 + * + * @param string $url + * + * @return void */ protected function set_get_params( $url ) { if ( strpos( $url, '?' ) === false ) { @@ -637,6 +641,7 @@ protected function run_private_method( $method, $args = array() ) { * * @param mixed $object * @param string $property + * * @return ReflectionProperty */ protected function get_accessible_property( $object, $property ) { diff --git a/tests/phpunit/base/frm_factory.php b/tests/phpunit/base/frm_factory.php index 6f653e2c61..8899e2cad7 100644 --- a/tests/phpunit/base/frm_factory.php +++ b/tests/phpunit/base/frm_factory.php @@ -115,6 +115,10 @@ public function generate_entry_array( $form ) { /** * Get all fields in a form + * + * @param int|string $form_id + * + * @return array */ public function get_fields_from_form( $form_id ) { return FrmField::get_all_for_form( $form_id ); @@ -122,6 +126,10 @@ public function get_fields_from_form( $form_id ) { /** * When creating an entry, set the correct data formats + * + * @param object $field + * + * @return mixed */ public function set_field_value( $field ) { $value = rand_str(); diff --git a/tests/phpunit/database/test_FrmMigrate.php b/tests/phpunit/database/test_FrmMigrate.php index 72e2144d31..5947422710 100644 --- a/tests/phpunit/database/test_FrmMigrate.php +++ b/tests/phpunit/database/test_FrmMigrate.php @@ -7,6 +7,7 @@ class test_FrmMigrate extends FrmUnitTest { /** * @covers FrmMigrate::upgrade + * * @todo Check if style was created */ public function test_upgrade() { diff --git a/tests/phpunit/entries/test_FrmShowEntryShortcode.php b/tests/phpunit/entries/test_FrmShowEntryShortcode.php index afc2ff7732..1ae57e2cb3 100644 --- a/tests/phpunit/entries/test_FrmShowEntryShortcode.php +++ b/tests/phpunit/entries/test_FrmShowEntryShortcode.php @@ -969,6 +969,7 @@ protected function get_field_plain_text_value( $entry, $field, $atts ) { /** * @param stdClass $entry * @param stdClass $field + * @param array $atts * * @return mixed|string */ diff --git a/tests/phpunit/fields/test_FrmFieldType.php b/tests/phpunit/fields/test_FrmFieldType.php index d2a6a63528..ccba0db7e7 100644 --- a/tests/phpunit/fields/test_FrmFieldType.php +++ b/tests/phpunit/fields/test_FrmFieldType.php @@ -353,6 +353,7 @@ private function reset_should_hide_draft_fields_flag() { /** * @param string $html * @param stdClass $field + * * @return void */ private function make_text_field_html_assertions( $html, $field ) { diff --git a/tests/phpunit/fields/test_FrmFieldsAjax.php b/tests/phpunit/fields/test_FrmFieldsAjax.php index 106f9ec2b8..911b33914f 100644 --- a/tests/phpunit/fields/test_FrmFieldsAjax.php +++ b/tests/phpunit/fields/test_FrmFieldsAjax.php @@ -100,6 +100,10 @@ public function test_duplicating_text_field() { /** * Get a field object by key. + * + * @param string $field_key + * + * @return object */ protected function get_field_by_key( $field_key ) { $divider_field_id = FrmField::get_id_by_key( $field_key ); @@ -111,6 +115,10 @@ protected function get_field_by_key( $field_key ) { /** * Check in_section variable prior to duplication. + * + * @param mixed $field + * + * @return void */ protected function check_field_prior_to_duplication( $field ) { $this->assertTrue( isset( $field->field_options['in_section'] ), 'The in_section variable is not set correctly on import.' ); @@ -118,6 +126,10 @@ protected function check_field_prior_to_duplication( $field ) { /** * Check if a field is created correctly. + * + * @param int|string $newest_field_id + * + * @return void */ protected function check_if_field_id_is_created_correctly( $newest_field_id ) { $this->assertTrue( is_numeric( $newest_field_id ) ); @@ -126,6 +138,11 @@ protected function check_if_field_id_is_created_correctly( $newest_field_id ) { /** * Check for a specific in section value. + * + * @param mixed $field + * @param mixed $expected + * + * @return void */ protected function check_in_section_variable( $field, $expected ) { $message = 'The in_section variable is not set correctly when a ' . $field->type . ' field is duplicated.'; diff --git a/tests/phpunit/forms/test_FrmForm.php b/tests/phpunit/forms/test_FrmForm.php index 27996ce97b..daf2c08ba8 100644 --- a/tests/phpunit/forms/test_FrmForm.php +++ b/tests/phpunit/forms/test_FrmForm.php @@ -72,6 +72,7 @@ public function test_destroy() { /** * @group visibility + * * @covers FrmForm::is_visible_to_user */ public function test_is_form_visible_to_user() { @@ -103,6 +104,7 @@ public function test_is_form_visible_to_user() { /** * @param string $capability * @param array|string $visibility + * * @return bool */ private function form_is_visible( $capability, $visibility ) { diff --git a/tests/phpunit/forms/test_FrmFormsController.php b/tests/phpunit/forms/test_FrmFormsController.php index 0ade065d50..2f9d1e5ecc 100644 --- a/tests/phpunit/forms/test_FrmFormsController.php +++ b/tests/phpunit/forms/test_FrmFormsController.php @@ -291,6 +291,10 @@ public function test_redirect_after_create() { /** * Trigger migration check and the flag. + * + * @param int|string $form_id + * + * @return void */ private function trigger_migrate_actions( $form_id ) { FrmOnSubmitHelper::maybe_migrate_submit_settings_to_action( $form_id ); diff --git a/tests/phpunit/misc/test_FrmAppHelper.php b/tests/phpunit/misc/test_FrmAppHelper.php index 77c2cd646a..9a7fcd514c 100644 --- a/tests/phpunit/misc/test_FrmAppHelper.php +++ b/tests/phpunit/misc/test_FrmAppHelper.php @@ -452,6 +452,7 @@ public function test_maybe_add_permissions() { /** * @group visibility + * * @covers FrmAppHelper::wp_roles_dropdown (single) */ public function test_wp_roles_dropdown() { @@ -468,6 +469,7 @@ public function test_wp_roles_dropdown() { /** * @group visibility + * * @covers FrmAppHelper::roles_options ($public = 'private') */ public function test_roles_options() { @@ -485,6 +487,7 @@ public function test_roles_options() { /** * @group visibility + * * @covers FrmAppHelper::roles_options */ public function test_roles_options_empty_string_option() { diff --git a/tests/phpunit/misc/test_FrmCurrencyHelper.php b/tests/phpunit/misc/test_FrmCurrencyHelper.php index 817fdd88b9..66c1aa9853 100644 --- a/tests/phpunit/misc/test_FrmCurrencyHelper.php +++ b/tests/phpunit/misc/test_FrmCurrencyHelper.php @@ -34,6 +34,7 @@ private function assert_currency( $currency ) { /** * @param array $currency + * * @return void */ private function assert_usd( $currency ) { @@ -44,6 +45,7 @@ private function assert_usd( $currency ) { /** * @param array $currency + * * @return void */ private function assert_euro( $currency ) { @@ -54,6 +56,7 @@ private function assert_euro( $currency ) { /** * @param array $currency + * * @return void */ private function assert_cad( $currency ) { diff --git a/tests/phpunit/misc/test_FrmDirectFileAccess.php b/tests/phpunit/misc/test_FrmDirectFileAccess.php index 7ff74fe063..10622bd111 100644 --- a/tests/phpunit/misc/test_FrmDirectFileAccess.php +++ b/tests/phpunit/misc/test_FrmDirectFileAccess.php @@ -7,6 +7,9 @@ class test_FrmDirectFileAccess extends FrmUnitTest { /** * @param string $dir + * @param array $results + * + * @return array */ private function all_php_file_paths( $dir = false, &$results = array() ) { if ( ! $dir ) { diff --git a/tests/phpunit/stripe/FrmStrpLiteUnitTest.php b/tests/phpunit/stripe/FrmStrpLiteUnitTest.php index 4389f8c16a..4ae13677e6 100644 --- a/tests/phpunit/stripe/FrmStrpLiteUnitTest.php +++ b/tests/phpunit/stripe/FrmStrpLiteUnitTest.php @@ -172,6 +172,8 @@ protected function create_payment_intent_with_action_id( $action_id ) { } /** + * @param array $metadata + * * @return object */ protected function create_payment_intent( $metadata = array() ) { @@ -398,6 +400,7 @@ protected function assert_confirm_intent( $confirmed ) { /** * @param object $setup_intent + * * @return void */ protected function assert_setup_intent( $setup_intent ) { diff --git a/tests/phpunit/stripe/test_FrmStrpLiteActionsController.php b/tests/phpunit/stripe/test_FrmStrpLiteActionsController.php index bc42d060dd..9e91220d37 100644 --- a/tests/phpunit/stripe/test_FrmStrpLiteActionsController.php +++ b/tests/phpunit/stripe/test_FrmStrpLiteActionsController.php @@ -19,6 +19,7 @@ public function test_replace_email_shortcode() { /** * @param string $email + * * @return string */ private function replace_email_shortcode( $email ) { diff --git a/tests/phpunit/stripe/test_FrmTransLiteActionsController.php b/tests/phpunit/stripe/test_FrmTransLiteActionsController.php index 207cd4cf43..15257420de 100644 --- a/tests/phpunit/stripe/test_FrmTransLiteActionsController.php +++ b/tests/phpunit/stripe/test_FrmTransLiteActionsController.php @@ -73,6 +73,7 @@ public function test_maybe_use_decimal() { /** * @param string $amount * @param array $currency + * * @return string */ private function maybe_use_decimal( &$amount, $currency ) { diff --git a/tests/phpunit/styles/test_FrmStyle.php b/tests/phpunit/styles/test_FrmStyle.php index 4ee9047fd0..1806340f85 100644 --- a/tests/phpunit/styles/test_FrmStyle.php +++ b/tests/phpunit/styles/test_FrmStyle.php @@ -146,6 +146,7 @@ public function test_trim_braces() { /** * @param string $value + * * @return string */ private function trim_braces( $value ) { diff --git a/tests/phpunit/styles/test_FrmStylesHelper.php b/tests/phpunit/styles/test_FrmStylesHelper.php index 735d8c2345..d45dd2384e 100644 --- a/tests/phpunit/styles/test_FrmStylesHelper.php +++ b/tests/phpunit/styles/test_FrmStylesHelper.php @@ -229,6 +229,7 @@ public function test_get_color_brightness() { /** * @param float $expected * @param string $color + * * @return void */ private function assert_color_brightness( $expected, $color ) { diff --git a/tests/phpunit/xml/test_FrmXMLController.php b/tests/phpunit/xml/test_FrmXMLController.php index 93b9587f71..2482aaf1f3 100644 --- a/tests/phpunit/xml/test_FrmXMLController.php +++ b/tests/phpunit/xml/test_FrmXMLController.php @@ -17,6 +17,7 @@ public function test_validate_xml_url() { /** * @param string $url + * * @return bool */ private function validate_xml_url( $url ) {