Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
31f3d3a
Add type comments
Crabcyborg Nov 26, 2025
33d3688
Fix type order
Crabcyborg Nov 26, 2025
0dbd127
Update type comments
Crabcyborg Nov 26, 2025
ebee6fd
Update a few more files
Crabcyborg Nov 26, 2025
a95932f
Fix issues
Crabcyborg Nov 26, 2025
99a20a5
Add more comments
Crabcyborg Nov 26, 2025
8d4f587
Add more type comments
Crabcyborg Nov 26, 2025
cec1f11
Add more type comments
Crabcyborg Nov 26, 2025
aa43551
Add more type comments
Crabcyborg Nov 26, 2025
41be327
Add more type comments
Crabcyborg Nov 26, 2025
c9fe427
Add more type comments
Crabcyborg Nov 26, 2025
5f60bf4
Add more type comments
Crabcyborg Nov 26, 2025
f301340
Add more type comments
Crabcyborg Nov 26, 2025
b118892
Fix type order
Crabcyborg Nov 26, 2025
d040fa6
Add more type comments
Crabcyborg Nov 26, 2025
51da525
Add more type comments
Crabcyborg Nov 26, 2025
b874777
Add more type comments
Crabcyborg Nov 26, 2025
6fa3c45
Add more type comments
Crabcyborg Nov 26, 2025
a866a4c
Remove extra char
Crabcyborg Nov 26, 2025
c1f1019
Remove extra char
Crabcyborg Nov 26, 2025
2cbe61c
Fix incorrect type
Crabcyborg Nov 26, 2025
058af9c
Fix incorrect type
Crabcyborg Nov 26, 2025
96493ed
Fix incorrect type
Crabcyborg Nov 26, 2025
1fa36d5
Fix incorrect type
Crabcyborg Nov 26, 2025
0d4cbb6
Fix incorrect type
Crabcyborg Nov 26, 2025
3d84ebe
Fix incorrect type
Crabcyborg Nov 26, 2025
6bc240c
Fix incorrect type
Crabcyborg Nov 26, 2025
8841617
Fix incorrect type
Crabcyborg Nov 26, 2025
e696364
Fix typo
Crabcyborg Nov 26, 2025
b4967db
Add e2e test exception
Crabcyborg Nov 26, 2025
8ccd4d2
Add e2e exception
Crabcyborg Nov 27, 2025
ebbad5e
Merge branch 'master' into phpcs_force_type_comments
Crabcyborg Nov 27, 2025
763b63f
Fix return type
Crabcyborg Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions classes/controllers/FrmAddonsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,9 @@ public static function get_primary_license_info() {

/**
* @since 3.04.03
*
* @param mixed $transient
* @return object
*/
public static function check_update( $transient ) {
if ( ! FrmAppHelper::pro_is_installed() ) {
Expand Down Expand Up @@ -744,6 +747,8 @@ public static function get_addon_for_license( $addons, $license ) {
}

/**
* @param array $addons
*
* @return void
*/
protected static function prepare_addons( &$addons ) {
Expand Down Expand Up @@ -808,6 +813,9 @@ protected static function prepare_addons( &$addons ) {
}

/**
* @param string $file_name
* @param string $slug
*
* @return bool
*/
private static function is_plugin_active( $file_name, $slug ) {
Expand All @@ -831,6 +839,8 @@ private static function get_active_views_version() {
/**
* @since 3.04.02
*
* @param string $link
*
* @return void
*/
protected static function prepare_addon_link( &$link ) {
Expand All @@ -852,6 +862,8 @@ protected static function prepare_addon_link( &$link ) {
*
* @since 3.04.02
*
* @param array $addon
*
* @return void
*/
protected static function set_addon_status( &$addon ) {
Expand Down Expand Up @@ -1490,6 +1502,8 @@ private static function allowed_external_urls() {
*
* @since 6.4.2
*
* @param int|string $addon_id
*
* @return string Empty string if no plan is required for active license.
*/
public static function get_addon_required_plan( $addon_id ) {
Expand Down
3 changes: 3 additions & 0 deletions classes/controllers/FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ private static function menu_icon() {

/**
* @since 3.0
*
* @param string $classes
* @return string
*/
public static function add_admin_class( $classes ) {
if ( self::is_white_page() ) {
Expand Down
1 change: 1 addition & 0 deletions classes/controllers/FrmDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ private static function view_args_inbox() {
/**
* Prepare inbox messages data.
*
* @param array $data
* @return array
*/
private static function inbox_prepare_messages( $data ) {
Expand Down
90 changes: 90 additions & 0 deletions classes/controllers/FrmEntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public static function route() {
* editing or creating an entry
*
* @since 3.0
*
* @param bool $show_screen Whether to show the screen options tab.
* @param object $screen The current screen object.
*
* @return bool
*/
public static function remove_screen_options( $show_screen, $screen ) {
$menu_name = sanitize_title( FrmAppHelper::get_menu_name() );
Expand Down Expand Up @@ -209,6 +214,12 @@ private static function get_columns_for_form( $form_id, &$columns ) {

/**
* @since 3.01
*
* @param object $field The field object.
* @param int|string $form_id The form ID.
* @param array $columns The columns array.
*
* @return void
*/
private static function add_subform_cols( $field, $form_id, &$columns ) {
$sub_form_cols = FrmField::get_all_for_form( $field->field_options['form_select'] );
Expand All @@ -228,6 +239,12 @@ private static function add_subform_cols( $field, $form_id, &$columns ) {

/**
* @since 3.01
*
* @param object $field The field object.
* @param int|string $form_id The form ID.
* @param array $columns The columns array.
*
* @return void
*/
private static function add_field_cols( $field, $form_id, &$columns ) {
$col_id = $field->field_key;
Expand Down Expand Up @@ -266,12 +283,27 @@ private static function maybe_format_field_name_for_column_title( $field, $inclu
return sprintf( '%s (%s)', $field_name, $append_text );
}

/**
* @param int|string $form_id The form ID.
* @param array $columns The columns array.
*
* @return void
*/
private static function maybe_add_ip_col( $form_id, &$columns ) {
if ( FrmAppHelper::ips_saved() ) {
$columns[ $form_id . '_ip' ] = 'IP';
}
}

/**
* @param bool $check The check value.
* @param int $object_id The object ID.
* @param string $meta_key The meta key.
* @param mixed $meta_value The meta value.
* @param mixed $prev_value The previous value.
*
* @return bool
*/
public static function check_hidden_cols( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
$this_page_name = self::hidden_column_key();
if ( $meta_key != $this_page_name || $meta_value == $prev_value ) {
Expand All @@ -291,6 +323,13 @@ public static function check_hidden_cols( $check, $object_id, $meta_key, $meta_v

/**
* Add hidden columns back from other forms
*
* @param int $meta_id The meta ID.
* @param int $object_id The object ID.
* @param string $meta_key The meta key.
* @param array $meta_value The meta value.
*
* @return void
*/
public static function update_hidden_cols( $meta_id, $object_id, $meta_key, $meta_value ) {
$this_page_name = self::hidden_column_key();
Expand Down Expand Up @@ -342,6 +381,10 @@ public static function update_hidden_cols( $meta_id, $object_id, $meta_key, $met

/**
* @since 2.05.07
*
* @param string $menu_name
*
* @return string
*/
private static function hidden_column_key( $menu_name = '' ) {
$base = self::base_column_key( $menu_name );
Expand All @@ -351,6 +394,10 @@ private static function hidden_column_key( $menu_name = '' ) {

/**
* @since 2.05.07
*
* @param string $menu_name
*
* @return string
*/
private static function base_column_key( $menu_name = '' ) {
if ( empty( $menu_name ) ) {
Expand All @@ -362,6 +409,13 @@ private static function base_column_key( $menu_name = '' ) {
return sanitize_title( $menu_name ) . ( $unread_count ? '-' . $unread_count : '' ) . '_page_formidable-entries';
}

/**
* @param int $save
* @param string $option
* @param string $value
*
* @return int
*/
public static function save_per_page( $save, $option, $value ) {
if ( $option === 'formidable_page_formidable_entries_per_page' ) {
$save = (int) $value;
Expand Down Expand Up @@ -445,6 +499,11 @@ public static function hidden_columns( $result ) {

/**
* @since 2.05.07
*
* @param int|string $form_id
* @param mixed $result
*
* @return array
*/
private static function user_hidden_columns_for_form( $form_id, $result ) {
$hidden = array();
Expand Down Expand Up @@ -536,6 +595,12 @@ public static function display_list( $message = '', $errors = array() ) {
require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/list.php';
}

/**
* @param object $form
* @param array $errors
*
* @return void
*/
private static function get_delete_form_time( $form, &$errors ) {
if ( 'trash' === $form->status ) {
$delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
Expand All @@ -548,6 +613,9 @@ private static function get_delete_form_time( $form, &$errors ) {

/**
* Back End CRUD.
*
* @param int $id
* @return void
*/
public static function show( $id = 0 ) {
FrmAppHelper::permission_check( 'frm_view_entries' );
Expand Down Expand Up @@ -691,6 +759,15 @@ public static function prepare_redirect_url( $url ) {
return str_replace( array( ' ', '[', ']', '|', '@' ), array( '%20', '%5B', '%5D', '%7C', '%40' ), $url );
}

/**
* Delete entry if redirected.
*
* @param string $url
* @param object $form
* @param array $atts
*
* @return string
*/
public static function delete_entry_before_redirect( $url, $form, $atts ) {
self::_delete_entry( $atts['id'], $form );

Expand All @@ -701,11 +778,20 @@ 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 ) {
self::_delete_entry( $atts['entry_id'], $atts['form'] );
}

/**
* Delete entry if not redirected.
*
* @param int $entry_id
* @param object $form
*
* @return void
*/
private static function _delete_entry( $entry_id, $form ) {
if ( ! $form ) {
return;
Expand All @@ -720,6 +806,10 @@ private static function _delete_entry( $entry_id, $form ) {

/**
* Unlink entry from post
*
* @param int $entry_id
*
* @return void
*/
private static function unlink_post( $entry_id ) {
global $wpdb;
Expand Down
3 changes: 3 additions & 0 deletions classes/controllers/FrmFieldsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@ public static function get_default_value_from_name( $field ) {
* in a dropdown.
*
* @since 4.04
*
* @param array|object $field
*
* @return bool True if placeholder was added.
*/
public static function add_placeholder_to_select( $field ) {
Expand Down
34 changes: 33 additions & 1 deletion classes/controllers/FrmFormActionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public static function email_settings( $values ) {
* Add unknown actions to a group.
*
* @since 4.0
*
* @param array $action_controls
* @param array $groups
* @return void
*/
private static function maybe_add_action_to_group( $action_controls, &$groups ) {
$grouped = array();
Expand Down Expand Up @@ -224,6 +228,7 @@ private static function get_crm_actions() {
*
* @since 4.0
*
* @param array $action_controls
* @return array
*/
private static function active_actions( $action_controls ) {
Expand Down Expand Up @@ -322,6 +327,11 @@ public static function get_form_actions( $action = 'all' ) {

/**
* @since 2.0
*
* @param object $form
* @param array $values
*
* @return void
*/
public static function list_actions( $form, $values ) {
if ( empty( $form ) ) {
Expand Down Expand Up @@ -457,13 +467,22 @@ public static function fill_action() {

/**
* @since 3.06.04
*
* @param string $action_type
*
* @return bool
*/
private static function should_show_log_message( $action_type ) {
$logging = array( 'api', 'salesforce', 'constantcontact', 'activecampaign' );
return in_array( $action_type, $logging, true ) && ! function_exists( 'frm_log_autoloader' );
}

/**
* @param int|string $form_id
* @param array $values
*
* @return object
*/
private static function fields_to_values( $form_id, array &$values ) {
$form = FrmForm::getOne( $form_id );

Expand Down Expand Up @@ -553,6 +572,13 @@ public static function delete_missing_actions( $old_actions ) {
}
}

/**
* @param int|string $entry_id
* @param int|string $form_id
* @param array $args
*
* @return void
*/
public static function trigger_create_actions( $entry_id, $form_id, $args = array() ) {
$filter_args = $args;
$filter_args['entry_id'] = $entry_id;
Expand All @@ -571,7 +597,13 @@ public static function trigger_create_actions( $entry_id, $form_id, $args = arra
}

/**
* @param string $event
* @param string $event
* @param int|object|string $form
* @param int|string $entry
* @param string $type
* @param array $args
*
* @return void
*/
public static function trigger_actions( $event, $form, $entry, $type = 'all', $args = array() ) {
$action_status = array(
Expand Down
Loading
Loading