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
2 changes: 1 addition & 1 deletion classes/controllers/FrmEntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public static function update_hidden_cols( $meta_id, $object_id, $meta_key, $met

$form_prefix = explode( '_', $prev_hidden );
$form_prefix = $form_prefix[0];
if ( $form_prefix == $cur_form_prefix ) {
if ( $form_prefix === $cur_form_prefix ) {
// Don't add back columns that are meant to be hidden.
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions classes/helpers/FrmAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2856,7 +2856,7 @@ public static function truncate( $original_string, $length, $minword = 3, $conti
}

foreach ( $words as $word ) {
$part = ( $sub != '' ? ' ' : '' ) . $word;
$part = ( $sub !== '' ? ' ' : '' ) . $word;
$total_len = self::mb_function( array( 'mb_strlen', 'strlen' ), array( $sub . $part ) );
if ( $total_len > $length && substr_count( $sub, ' ' ) ) {
break;
Expand Down Expand Up @@ -2927,7 +2927,7 @@ public static function get_formatted_time( $date, $date_format = '', $time_forma

$formatted = self::get_localized_date( $date_format, $date );

$do_time = ( gmdate( 'H:i:s', strtotime( $date ) ) != '00:00:00' );
$do_time = ( gmdate( 'H:i:s', strtotime( $date ) ) !== '00:00:00' );
if ( $do_time ) {
$formatted .= self::add_time_to_date( $time_format, $date );
}
Expand Down
4 changes: 2 additions & 2 deletions classes/helpers/FrmEntriesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ public static function set_other_validation_val( &$value, $other_vals, $field, &
public static function entry_array_to_string( $values ) {
$content = '';
foreach ( $values['item_meta'] as $val ) {
if ( $content != '' ) {
if ( $content !== '' ) {
$content .= "\n\n";
}

Expand Down Expand Up @@ -633,7 +633,7 @@ public static function get_browser( $u_agent ) {
}

// check if we have a number
if ( $version == '' ) {
if ( $version === '' ) {
$version = '?';
}

Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmFieldsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ public static function include_other_input( $args ) {
}

$classes = array( 'frm_other_input' );
if ( ! $args['checked'] || trim( $args['checked'] ) == '' ) {
if ( ! $args['checked'] || trim( $args['checked'] ) === '' ) {
// hide the field if the other option is not selected
$classes[] = 'frm_pos_none';
}
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmFormsListHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ private function get_actions( &$actions, $item, $edit_link ) {
*/
private function get_form_name( $item, $actions, $edit_link, $mode = 'list' ) {
$form_name = $item->name;
if ( is_null( $form_name ) || trim( $form_name ) == '' ) {
if ( is_null( $form_name ) || trim( $form_name ) === '' ) {
$form_name = FrmFormsHelper::get_no_title_text();
}
$form_name = FrmAppHelper::kses( $form_name );
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmListHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ protected function row_actions( $actions, $always_visible = false ) {
$out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
foreach ( $actions as $action => $link ) {
++$i;
$sep = $i == $action_count ? '' : ' | ';
$sep = $i === $action_count ? '' : ' | ';
$out .= "<span class='$action'>$link$sep</span>";
}
$out .= '</div>';
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmXMLHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ private static function remove_default_html( $html_name, $defaults, &$options )

// Account for some of the older field default HTML.
$default_html = str_replace( ' id="frm_desc_field_[key]"', '', $default_html );
if ( $old_html == $default_html ) {
if ( $old_html === $default_html ) {
unset( $options[ $html_name ] );
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/models/FrmCreateFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private function get_ftp_creds( $type ) {
}

$has_creds = ( ! empty( $credentials['password'] ) && ! empty( $credentials['username'] ) && ! empty( $credentials['hostname'] ) );
$can_ssh = ( 'ssh' == $credentials['connection_type'] && ! empty( $credentials['public_key'] ) && ! empty( $credentials['private_key'] ) );
$can_ssh = ( 'ssh' === $credentials['connection_type'] && ! empty( $credentials['public_key'] ) && ! empty( $credentials['private_key'] ) );
if ( $has_creds || $can_ssh ) {
$stored_credentials = $credentials;
if ( ! empty( $stored_credentials['port'] ) ) {
Expand Down
2 changes: 1 addition & 1 deletion classes/models/FrmDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private static function interpret_array_to_sql( $key, $value, &$where, &$values
if ( $lowercase_key === 'like%' ) {
$start = '';
$where = rtrim( $where, '%' );
} elseif ( $lowercase_key == '%like' ) {
} elseif ( $lowercase_key === '%like' ) {
$end = '';
$where = rtrim( rtrim( $where, '%like' ), '%LIKE' );
$where .= 'like';
Expand Down
2 changes: 1 addition & 1 deletion classes/models/FrmEntryMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public static function update_entry_metas( $entry_id, $values ) {

if ( $previous_field_ids && in_array( $field_id, $previous_field_ids ) ) {

if ( ( is_array( $meta_value ) && empty( $meta_value ) ) || ( ! is_array( $meta_value ) && trim( $meta_value ) == '' ) ) {
if ( ( is_array( $meta_value ) && empty( $meta_value ) ) || ( ! is_array( $meta_value ) && trim( $meta_value ) === '' ) ) {
// Remove blank fields.
unset( $values_indexed_by_field_id[ $field_id ] );
} else {
Expand Down
2 changes: 1 addition & 1 deletion classes/models/FrmField.php
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ private static function set_field_transient( &$fields, $form_id, $next = 0, $arg
$set = set_transient( $name, $field, 60 * 60 * 6 );
if ( ! $set ) {
// the transient didn't save
if ( $name != $base_name ) {
if ( $name !== $base_name ) {
// if the first saved an others fail, this will show an incomplete form
self::delete_form_transient( $form_id );
}
Expand Down
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Rector\CodeQuality\Rector\Assign\CombinedAssignRector;
use Rector\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\Equal\UseIdenticalOverEqualWithSameTypeRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\DeadCode\Rector\If_\ReduceAlwaysFalseIfOrRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
Expand Down Expand Up @@ -90,7 +89,6 @@
CombinedAssignRector::class,
ExplicitReturnNullRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
UseIdenticalOverEqualWithSameTypeRector::class,
SimplifyUselessVariableRector::class,
ReduceAlwaysFalseIfOrRector::class,
CountArrayToEmptyArrayComparisonRector::class,
Expand Down
Loading