Skip to content
Merged
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
5 changes: 0 additions & 5 deletions classes/controllers/FrmDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ private static function view_args_counters( $latest_available_form, $counters_va
* @return array
*/
public static function view_args_build_counter( $heading, $cta = array(), $value = 0, $type = 'default' ) {

$counter_args = array(
'heading' => $heading,
'counter' => $value,
Expand Down Expand Up @@ -228,7 +227,6 @@ public static function view_args_build_cta( $title, $link = '#', $display = true
* @return array
*/
private static function view_args_payments() {

$prepared_data = array();

$model_payments = new FrmTransLitePayment();
Expand All @@ -254,7 +252,6 @@ private static function view_args_payments() {
* @return array
*/
private static function view_args_entries_placeholder( $forms_count ) {

if ( ! $forms_count ) {
$copy = sprintf(
/* translators: %1$s: HTML start of a tag, %2$s: HTML close a tag */
Expand Down Expand Up @@ -405,7 +402,6 @@ public static function register_assets() {
* @return void
*/
public static function enqueue_assets() {

if ( ! self::is_dashboard_page() ) {
return;
}
Expand Down Expand Up @@ -450,7 +446,6 @@ private static function inbox_prepare_messages( $data ) {
* @return string
*/
private static function inbox_clean_messages_cta( $cta ) {

// remove dismiss button
$pattern = '/<a[^>]*class="[^"]*frm_inbox_dismiss[^"]*"[^>]*>.*?<\/a>/is';
return preg_replace( $pattern, ' ', $cta );
Expand Down
7 changes: 0 additions & 7 deletions classes/controllers/FrmSMTPController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class FrmSMTPController {
* @return void
*/
public static function load_hooks() {

add_filter( 'wp_mail_smtp_is_white_labeled', '__return_true' );

$self = new self();
Expand Down Expand Up @@ -179,7 +178,6 @@ protected function output_section_heading() {
* @return void
*/
protected function output_section_screenshot() {

printf(
'<section class="screenshot">
<div class="cont">
Expand Down Expand Up @@ -210,7 +208,6 @@ protected function output_section_screenshot() {
* @return void
*/
protected function output_section_step_install() {

$step = $this->get_data_step_install();

if ( ! $step ) {
Expand Down Expand Up @@ -259,7 +256,6 @@ protected function output_section_step_install() {
* @return void
*/
protected function output_section_step_setup() {

$step = $this->get_data_step_setup();

if ( ! $step ) {
Expand Down Expand Up @@ -305,7 +301,6 @@ protected function output_section_step_setup() {
* @return array Step data.
*/
protected function get_data_step_install() {

$lite_plugin = new FrmInstallPlugin( array( 'plugin_file' => $this->config['lite_plugin'] ) );
$pro_plugin = new FrmInstallPlugin( array( 'plugin_file' => $this->config['pro_plugin'] ) );

Expand Down Expand Up @@ -356,7 +351,6 @@ protected function get_data_step_install() {
* @return array Step data.
*/
protected function get_data_step_setup() {

$step = array();

$step['icon'] = 'frm_step2_icon';
Expand All @@ -383,7 +377,6 @@ protected function get_data_step_setup() {
* @return bool True if some mailer is selected and configured properly.
*/
protected function is_smtp_configured() {

if ( ! $this->is_smtp_activated() ) {
return false;
}
Expand Down
2 changes: 0 additions & 2 deletions classes/helpers/FrmEntriesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ public static function prepare_display_value( $entry, $field, $atts ) {
* @return string
*/
public static function display_value( $value, $field, $atts = array() ) {

$defaults = array(
'type' => '',
'html' => false,
Expand Down Expand Up @@ -926,7 +925,6 @@ public static function get_entry_status_label( $status ) {
* @return array<string>
*/
public static function get_entry_statuses() {

$default_entry_statuses = array(
self::SUBMITTED_ENTRY_STATUS => __( 'Submitted', 'formidable' ),
self::DRAFT_ENTRY_STATUS => __( 'Draft', 'formidable' ),
Expand Down
2 changes: 0 additions & 2 deletions classes/helpers/FrmFieldsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class FrmFieldsHelper {
* @return array
*/
public static function setup_new_vars( $type = '', $form_id = '' ) {

if ( str_contains( $type, '|' ) ) {
list( $type, $setting ) = explode( '|', $type );
}
Expand Down Expand Up @@ -1371,7 +1370,6 @@ public static function process_get_shortcode( $atts, $return_array = false ) {
* @return mixed
*/
public static function get_display_value( $value, $field, $atts = array() ) {

$value = apply_filters( 'frm_get_' . $field->type . '_display_value', $value, $field, $atts );
$value = apply_filters( 'frm_get_display_value', $value, $field, $atts );

Expand Down
3 changes: 0 additions & 3 deletions classes/models/FrmAddon.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class FrmAddon {
protected $should_clear_cache = true;

public function __construct() {

if ( empty( $this->plugin_slug ) ) {
$this->plugin_slug = preg_replace( '/[^a-zA-Z0-9_\s]/', '', str_replace( ' ', '_', strtolower( $this->plugin_name ) ) );
}
Expand Down Expand Up @@ -159,7 +158,6 @@ public static function get_addon( $plugin_slug ) {
* @return void
*/
public function edd_plugin_updater() {

$this->is_license_revoked();
$license = $this->license;

Expand Down Expand Up @@ -187,7 +185,6 @@ public function edd_plugin_updater() {
* @return object $_data
*/
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {

if ( $_action !== 'plugin_information' ) {
return $_data;
}
Expand Down
1 change: 0 additions & 1 deletion classes/models/FrmEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ private function format_from_email( $name, $email ) {
* @return void
*/
private function handle_phone_numbers() {

foreach ( $this->to as $key => $recipient ) {
if ( '[admin_email]' !== $recipient && ! is_email( $recipient ) ) {
$recipient = explode( ' ', $recipient );
Expand Down
2 changes: 0 additions & 2 deletions classes/models/FrmEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,6 @@ public static function getPageCount( $p_size, $where = '' ) {
* @return array $new_values
*/
private static function before_insert_entry_in_database( &$values, $type ) {

self::sanitize_entry_post( $values );

if ( $type !== 'xml' ) {
Expand Down Expand Up @@ -1121,7 +1120,6 @@ private static function after_entry_created_actions( $entry_id, $values, $new_va
* @return void
*/
private static function after_insert_entry_in_database( $values, $new_values, $entry_id ) {

self::add_new_entry_to_frm_vars( $entry_id );

self::maybe_add_entry_metas( $values, $entry_id );
Expand Down
1 change: 0 additions & 1 deletion classes/models/FrmEntryValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ protected function init_form_id() {
* @return void
*/
protected function init_include_fields( $atts ) {

// For reverse compatibility with the fields parameter.
if ( empty( $atts['include_fields'] ) && ! empty( $atts['fields'] ) ) {
if ( ! is_array( $atts['fields'] ) ) {
Expand Down
2 changes: 0 additions & 2 deletions classes/models/FrmForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,6 @@ public static function is_ajax_on( $form ) {
* @return object
*/
public static function get_latest_form() {

$args = array(
array(
'or' => 1,
Expand All @@ -1368,7 +1367,6 @@ public static function get_latest_form() {
* @return int
*/
public static function get_forms_count() {

$args = array(
array(
'or' => 1,
Expand Down
4 changes: 0 additions & 4 deletions classes/models/FrmFormMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ public function import_page() {
* @return void
*/
public function import_forms() {

check_ajax_referer( 'frm_ajax', 'nonce' );
FrmAppHelper::permission_check( 'frm_edit_forms' );

Expand Down Expand Up @@ -208,7 +207,6 @@ public function import_forms() {
* @return array
*/
protected function import_form( $source_id ) {

$source_form = $this->get_form( $source_id );
$source_form_name = $this->get_form_name( $source_form );
$source_fields = $this->get_form_fields( $source_form );
Expand Down Expand Up @@ -456,7 +454,6 @@ protected function convert_field_type( $type, $field = array(), $use = '' ) {
* @return array
*/
protected function add_form( $form, $upgrade_omit = array() ) {

// Create empty form so we have an ID to work with.
$form_id = $this->create_form( $form );

Expand Down Expand Up @@ -584,7 +581,6 @@ protected function save_action( $action, $form, $form_id ) {
* @return void
*/
protected function track_import( $source_id, $new_form_id ) {

$imported = $this->get_tracked_import();

$imported[ $this->slug ][ $new_form_id ] = $source_id;
Expand Down
1 change: 0 additions & 1 deletion classes/models/FrmMigrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ private function migrate_to_90() {
* @return void
*/
private function migrate_to_86() {

$fields = $this->get_fields_with_size();

foreach ( $fields as $f ) {
Expand Down
2 changes: 0 additions & 2 deletions classes/models/FrmReviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class FrmReviews {
* @return void
*/
public function review_request() {

// Only show the review request to high-level users on Formidable pages
if ( ! current_user_can( 'frm_change_settings' ) || ! FrmAppHelper::is_formidable_admin() ) {
return;
Expand Down Expand Up @@ -85,7 +84,6 @@ private function set_review_status() {
* @return void
*/
private function review() {

// show the review request 3 times, depending on the number of entries
$show_intervals = array( 50, 200, 500 );
$asked = $this->review_status['asked'];
Expand Down
2 changes: 0 additions & 2 deletions classes/models/FrmSolution.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public function plugin_links( $links ) {
* @return void
*/
public function register() {

// Getting started - shows after installation.
add_dashboard_page(
esc_html( $this->page_title() ),
Expand Down Expand Up @@ -166,7 +165,6 @@ protected function page_description() {
* @return void
*/
public function redirect() {

$current_page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );

if ( $current_page === $this->page ) {
Expand Down
1 change: 0 additions & 1 deletion classes/models/FrmTableHTMLGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ private function table_row_background_color() {
* @return string
*/
public function tr_style() {

if ( $this->type === 'shortcode' ) {
$tr_style = ' style="[frm-alt-color]"';
} elseif ( $this->use_inline_style ) {
Expand Down
2 changes: 0 additions & 2 deletions classes/views/styles/components/FrmSliderStyleComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class FrmSliderStyleComponent extends FrmStyleComponent {
* @param array $data
*/
public function __construct( $field_name, $field_value, $data ) {

$this->init_field_data( $data, $field_name, $field_value );

if ( true === $this->hide_component() ) {
Expand Down Expand Up @@ -177,7 +176,6 @@ private function detect_unit_measurement( $value = null ) {
* @return array
*/
private function init_icon() {

if ( ! empty( $this->data['icon'] ) ) {
return;
}
Expand Down
2 changes: 2 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
<exclude-pattern>views/frm-forms/preview/header.php</exclude-pattern>
</rule>

<rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace" />

<!-- MEDIUM PRIORITY ITEMS TO FIX -->
<rule ref="Squiz.PHP.EmbeddedPhp.ContentBeforeOpen">
<exclude-pattern>views/*</exclude-pattern>
Expand Down
1 change: 0 additions & 1 deletion stripe/models/FrmTransLiteAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ private function default_currency() {
* @return array
*/
public function get_field_options( $form_id ) {

$form_id = absint( $form_id );
$form_ids = $form_id;

Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/entries/test_FrmShowEntryShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,6 @@ protected function get_field_plain_text_value( $entry, $field, $atts ) {
* @return mixed|string
*/
protected function get_field_value( $entry, $field, $atts ) {

if ( $field->field_key === 'free-html-field' ) {
$field_value = 'Lorem ipsum.';
} else {
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/fields/test_FrmFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ public function test_get_import_value() {
* @covers FrmFieldType::is_not_unique
*/
public function test_is_not_unique() {

$form_id = $this->factory->form->create();
$field1 = $this->factory->field->create_and_get(
array(
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/misc/test_FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public function test_needs_update() {
* @covers FrmAppController::compare_for_update
*/
public function test_compare_for_update() {

$tests = array(
array(
'version' => '',
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/misc/test_FrmOverlayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public function setUp(): void {
}

public function test_open_overlay() {

$test_data = array(
'hero_image' => FrmAppHelper::plugin_url() . '/images/overlay/lock.svg',
'heading' => 'Overlay Heading Test',
Expand Down
Loading