Skip to content

Commit

Permalink
CS Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromcp90 committed Jan 29, 2025
1 parent 0c948f7 commit d7c692f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doofinder-for-woocommerce/includes/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ class Settings {

/**
* List of valid regions
*
* @var array
*/
const VALID_REGIONS = array("eu1", "us1");
const VALID_REGIONS = array( 'eu1', 'us1' );

/**
* Array of tab settings, indexed by the id of the tag (the GET variable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function () use ( $region_option_name ) {
)
);

register_setting( self::$top_level_menu, $region_option_name, array('sanitize_callback' => array($this, 'validate_region')));
register_setting( self::$top_level_menu, $region_option_name, array( 'sanitize_callback' => array( $this, 'validate_region' ) ) );

// Search engine hash.
$search_engine_hash_option_name =
Expand Down Expand Up @@ -447,7 +447,7 @@ public function validate_update_on_save( $input ) {
* @return string|null
*/
public function validate_region( $region_input ) {
if ( !in_array($region_input, Settings::VALID_REGIONS) ) {
if ( ! in_array( $region_input, Settings::VALID_REGIONS ) ) {
add_settings_error(
'doofinder_for_wp_messages',
'doofinder_for_wp_message',
Expand Down

0 comments on commit d7c692f

Please sign in to comment.