Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions classes/controllers/FrmAddonsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function enqueue_assets() {
*
* @since 6.15
*
* @return array
* @return array<string, bool|string>
*/
private static function get_js_variables() {
return array(
Expand Down Expand Up @@ -1240,7 +1240,7 @@ protected static function handle_addon_action( $installed, $action ) {
}

/**
* @return array
* @return array<string, mixed>
*/
private static function get_addon_activation_response() {
$activating_page = self::get_activating_page();
Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/FrmDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static function view_args_build_counter( $heading, $cta = array(), $value
* @param string $link
* @param bool $display
*
* @return array
* @return array<string, bool|string>
*/
public static function view_args_build_cta( $title, $link = '#', $display = true ) {
return array(
Expand Down
34 changes: 17 additions & 17 deletions classes/controllers/FrmFieldsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ private static function add_input_classes( $field, array &$class ) {
}

/**
* @param array $field
* @param array $add_html
* @param array $field
* @param array<string, mixed> $add_html
*
* @return void
*/
Expand Down Expand Up @@ -611,8 +611,8 @@ private static function add_html_size( $field, array &$add_html ) {
}

/**
* @param array $field
* @param array $add_html
* @param array $field
* @param array<string, mixed> $add_html
*
* @return void
*/
Expand Down Expand Up @@ -642,8 +642,8 @@ private static function add_html_cols( $field, array &$add_html ) {
}

/**
* @param array $field
* @param array $add_html
* @param array $field
* @param array<string, mixed> $add_html
*
* @return void
*/
Expand All @@ -669,9 +669,9 @@ private static function add_html_length( $field, array &$add_html ) {
}

/**
* @param array $field
* @param array $add_html
* @param array $class
* @param array $field
* @param array<string, mixed> $add_html
* @param array $class
*
* @return void
*/
Expand Down Expand Up @@ -799,8 +799,8 @@ private static function add_frmval_to_input( $field, &$add_html ) {
}

/**
* @param array $field
* @param array $add_html
* @param array $field
* @param array<string, mixed> $add_html
*
* @return void
*/
Expand Down Expand Up @@ -859,8 +859,8 @@ private static function get_validation_data_attribute_visibility_info( $field )
/**
* @since 5.0.03
*
* @param array $field
* @param array $add_html
* @param array $field
* @param array<string, mixed> $add_html
*
* @return void
*/
Expand Down Expand Up @@ -950,8 +950,8 @@ public static function pull_custom_error_body_from_custom_html( $form, $field, $
*
* @since 3.06.01
*
* @param array $field
* @param array $add_html
* @param array $field
* @param array<string, mixed> $add_html
*
* @return void
*/
Expand Down Expand Up @@ -1035,8 +1035,8 @@ private static function should_allow_input_attribute( $key ) {
*
* @since 3.0
*
* @param array $field
* @param array $add_html
* @param array $field
* @param array<string, mixed> $add_html
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions classes/controllers/FrmFormActionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ private static function should_show_log_message( $action_type ) {
}

/**
* @param int|string $form_id
* @param array $values
* @param int|string $form_id
* @param array<string, mixed> $values
*
* @return object
*/
Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/FrmInboxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function get_notice_count( $filtered = true ) {
/**
* @since 6.8
*
* @return array
* @return array<string, mixed>
*/
public static function get_inbox_messages() {
self::add_tracking_request();
Expand Down
4 changes: 2 additions & 2 deletions classes/controllers/FrmOnboardingWizardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public static function enqueue_assets() {
*
* @since 6.9
*
* @return array
* @return array<string, string>
*/
private static function get_js_variables() {
return array(
Expand Down Expand Up @@ -463,7 +463,7 @@ public static function mark_onboarding_as_skipped() {
*
* @param array $inbox_messages The array of existing inbox messages.
*
* @return array Configuration for the onboarding wizard slide-in notification.
* @return array<string, array<string, mixed>> Configuration for the onboarding wizard slide-in notification.
*/
public static function add_wizard_to_floating_links( $inbox_messages ) {
$message = __( 'Welcome to Formidable Forms! Click here to run the Onboarding Wizard and it will guide you through the basic settings and get you started in 2 minutes.', 'formidable' );
Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/FrmOverlayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function __construct( $config = array() ) {
/**
* Get next execution time. Return the next execution timestamp and date.
*
* @return array
* @return array<string, bool|int|string>
*/
private function get_next_execution() {
$next_timestamp = strtotime( '+' . $this->config['execution-frequency'], $this->get_time() );
Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/FrmSimpleBlocksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private static function get_forms_options() {
*
* @param object $form
*
* @return array
* @return array<string, mixed>
*/
private static function set_form_options( $form ) {
return array(
Expand Down
4 changes: 2 additions & 2 deletions classes/controllers/FrmWelcomeTourController.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static function setup_checklist_progress() {
/**
* Gets the checklist steps.
*
* @return array
* @return array<string, mixed[]>
*/
private static function get_steps() {
$steps = array(
Expand Down Expand Up @@ -494,7 +494,7 @@ public static function enqueue_assets() {
/**
* Get the Welcome Tour JS variables as an array.
*
* @return array
* @return array<string, mixed>
*/
private static function get_js_variables() {
return array(
Expand Down
16 changes: 9 additions & 7 deletions classes/helpers/FrmAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ public static function get_ip_address() {
/**
* @since 6.1
*
* @return array
* @return array<int, string>
*/
public static function get_custom_header_keys_for_ip() {
return array(
Expand Down Expand Up @@ -1163,6 +1163,8 @@ private static function allowed_html( $allowed ) {

/**
* @since 2.05.03
*
* @return array<string, array<string, bool>|mixed[]>
*/
private static function safe_html() {
$allow_class = array(
Expand Down Expand Up @@ -2895,10 +2897,10 @@ private static function prepare_field_arrays( $fields, $record, array &$values,
}

/**
* @param object $field
* @param object $record
* @param array $values
* @param array $args
* @param object $field
* @param object $record
* @param array<string, mixed> $values
* @param array $args
*
* @return void
*/
Expand Down Expand Up @@ -2959,7 +2961,7 @@ private static function fill_field_defaults( $field, $record, array &$values, $a
*
* @param object $field
*
* @return array
* @return array<string, mixed>
*/
public static function start_field_array( $field ) {
return array(
Expand Down Expand Up @@ -3366,7 +3368,7 @@ private static function get_unit( $unit ) {
*
* @since 2.0.20
*
* @return array
* @return array<string, array<int, mixed>>
*/
private static function get_time_strings() {
return array(
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmCSVExportHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private static function generate_csv_filename( $form ) {
/**
* @since 5.0.16
*
* @return array
* @return array<string, mixed[]|string>
*/
private static function get_standard_filter_args() {
return array(
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmDashboardHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class="<?php echo esc_attr( $button_classes . $add_classes ); ?>"
*
* @since 6.8
*
* @return array
* @return array<int, array<string, mixed>>
*/
public static function get_license_buttons() {
$cta_text = FrmSalesApi::get_best_sale_value( 'dashboard_license_cta_text' );
Expand Down
12 changes: 6 additions & 6 deletions classes/helpers/FrmFieldsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public static function field_object_to_array( $field ) {
}

/**
* @param object $field
* @param array $field_array
* @param object $field
* @param array<string, mixed> $field_array
*
* @return void
*/
Expand Down Expand Up @@ -194,8 +194,8 @@ public static function get_default_field_options( $type ) {
/**
* @since 3.0
*
* @param object $field
* @param array $values
* @param object $field
* @param mixed[] $values
*
* @return void
*/
Expand Down Expand Up @@ -274,8 +274,8 @@ private static function context_is_safe_to_load_field_options_from_request_data(
*
* @since 3.0
*
* @param object $field
* @param array $field_array
* @param object $field
* @param array<string, mixed> $field_array
*
* @return void
*/
Expand Down
8 changes: 4 additions & 4 deletions classes/helpers/FrmFormsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public static function fill_default_opts( $values, $record, $post_values ) {
}

/**
* @return array
* @return array<string, int|string>
*/
public static function get_default_opts() {
$frm_settings = FrmAppHelper::get_settings();
Expand Down Expand Up @@ -1404,7 +1404,7 @@ public static function delete_trash_info( $id, $status ) {
*
* @param int $id
*
* @return array
* @return array<string, array<string, mixed>>
*/
public static function delete_trash_links( $id ) {
$current_page = FrmAppHelper::get_simple_request( array( 'param' => 'form_type' ) );
Expand Down Expand Up @@ -1481,7 +1481,7 @@ public static function css_classes() {
}

/**
* @return array
* @return array<string, string>
*/
public static function grid_classes() {
return array(
Expand Down Expand Up @@ -1893,7 +1893,7 @@ private static function create_unsafe_param_warning( $unsafe_params_in_redirect
*
* @since 4.04
*
* @return array Array of WordPress reserved words.
* @return array<int, string> Array of WordPress reserved words.
*/
public static function reserved_words() {
return array(
Expand Down
11 changes: 7 additions & 4 deletions classes/helpers/FrmListHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@
return current_user_can( 'administrator' );
}

/**
* @return array{}
*/
public function get_columns() {
return array();
}
Expand Down Expand Up @@ -307,7 +310,7 @@
*
* @since 2.0.18
*
* @return array
* @return array{}
*/
protected function get_views() {
return array();
Expand Down Expand Up @@ -351,7 +354,7 @@
*
* @since 2.0.18
*
* @return array
* @return array{}
*/
protected function get_bulk_actions() {
return array();
Expand Down Expand Up @@ -802,7 +805,7 @@
*
* @since 2.0.18
*
* @return array
* @return array{}
*/
protected function get_sortable_columns() {
return array();
Expand All @@ -821,7 +824,7 @@

// We need a primary defined so responsive views show something,
// so let's fall back to the first non-checkbox column.
foreach ( $columns as $col => $column_name ) {

Check failure on line 827 in classes/helpers/FrmListHelper.php

View workflow job for this annotation

GitHub Actions / PHPStan

Empty array passed to foreach.
if ( 'cb' === $col ) {
continue;
}
Expand Down Expand Up @@ -1119,7 +1122,7 @@
*
* @since 2.0.18
*
* @return array List of CSS classes for the table tag.
* @return array<int, mixed> List of CSS classes for the table tag.
*/
protected function get_table_classes() {
return array( 'widefat', 'fixed', 'striped', $this->_args['plural'] );
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmShortcodeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static function get_shortcode_attribute_array( $text ) {
*
* @since 6.16.3
*
* @return array
* @return array<string, array<string, mixed>>
*/
public static function get_contextual_shortcodes() {
return array(
Expand Down
Loading
Loading