diff --git a/classes/controllers/FrmEntriesController.php b/classes/controllers/FrmEntriesController.php
index f97592bca8..f793df170b 100644
--- a/classes/controllers/FrmEntriesController.php
+++ b/classes/controllers/FrmEntriesController.php
@@ -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;
}
diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php
index f7e9afc1a7..6dff5a405e 100644
--- a/classes/helpers/FrmAppHelper.php
+++ b/classes/helpers/FrmAppHelper.php
@@ -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;
@@ -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 );
}
diff --git a/classes/helpers/FrmEntriesHelper.php b/classes/helpers/FrmEntriesHelper.php
index 391ae4baef..02a52c1651 100644
--- a/classes/helpers/FrmEntriesHelper.php
+++ b/classes/helpers/FrmEntriesHelper.php
@@ -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";
}
@@ -633,7 +633,7 @@ public static function get_browser( $u_agent ) {
}
// check if we have a number
- if ( $version == '' ) {
+ if ( $version === '' ) {
$version = '?';
}
diff --git a/classes/helpers/FrmFieldsHelper.php b/classes/helpers/FrmFieldsHelper.php
index e9d94b7048..74dc7bfb62 100644
--- a/classes/helpers/FrmFieldsHelper.php
+++ b/classes/helpers/FrmFieldsHelper.php
@@ -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';
}
diff --git a/classes/helpers/FrmFormsListHelper.php b/classes/helpers/FrmFormsListHelper.php
index 265511eff5..b233c95f48 100644
--- a/classes/helpers/FrmFormsListHelper.php
+++ b/classes/helpers/FrmFormsListHelper.php
@@ -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 );
diff --git a/classes/helpers/FrmListHelper.php b/classes/helpers/FrmListHelper.php
index 6621a925a5..176e189c30 100644
--- a/classes/helpers/FrmListHelper.php
+++ b/classes/helpers/FrmListHelper.php
@@ -475,7 +475,7 @@ protected function row_actions( $actions, $always_visible = false ) {
$out = '
';
foreach ( $actions as $action => $link ) {
++$i;
- $sep = $i == $action_count ? '' : ' | ';
+ $sep = $i === $action_count ? '' : ' | ';
$out .= "$link$sep";
}
$out .= '
';
diff --git a/classes/helpers/FrmXMLHelper.php b/classes/helpers/FrmXMLHelper.php
index c51e966a24..cc715c36b0 100644
--- a/classes/helpers/FrmXMLHelper.php
+++ b/classes/helpers/FrmXMLHelper.php
@@ -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 ] );
}
}
diff --git a/classes/models/FrmCreateFile.php b/classes/models/FrmCreateFile.php
index f9547e2339..ab8f250c6f 100644
--- a/classes/models/FrmCreateFile.php
+++ b/classes/models/FrmCreateFile.php
@@ -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'] ) ) {
diff --git a/classes/models/FrmDb.php b/classes/models/FrmDb.php
index 0586dc45da..f7b4adc970 100644
--- a/classes/models/FrmDb.php
+++ b/classes/models/FrmDb.php
@@ -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';
diff --git a/classes/models/FrmEntryMeta.php b/classes/models/FrmEntryMeta.php
index eb6710cd2e..e248398cf4 100644
--- a/classes/models/FrmEntryMeta.php
+++ b/classes/models/FrmEntryMeta.php
@@ -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 {
diff --git a/classes/models/FrmField.php b/classes/models/FrmField.php
index 10574ff76b..71194ae29c 100644
--- a/classes/models/FrmField.php
+++ b/classes/models/FrmField.php
@@ -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 );
}
diff --git a/rector.php b/rector.php
index 2e6398cfca..8db622800d 100644
--- a/rector.php
+++ b/rector.php
@@ -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;
@@ -90,7 +89,6 @@
CombinedAssignRector::class,
ExplicitReturnNullRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
- UseIdenticalOverEqualWithSameTypeRector::class,
SimplifyUselessVariableRector::class,
ReduceAlwaysFalseIfOrRector::class,
CountArrayToEmptyArrayComparisonRector::class,