From cc1c9ba839f40df0450bf27b380e30ce9b2bf144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 21 Sep 2023 09:08:33 -0400 Subject: [PATCH] fix rules --- inc/Engine/Admin/Metaboxes/PostEditOptionsSubscriber.php | 6 ++---- inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber.php | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/inc/Engine/Admin/Metaboxes/PostEditOptionsSubscriber.php b/inc/Engine/Admin/Metaboxes/PostEditOptionsSubscriber.php index 0c5ea5a166..ab096d8ba7 100644 --- a/inc/Engine/Admin/Metaboxes/PostEditOptionsSubscriber.php +++ b/inc/Engine/Admin/Metaboxes/PostEditOptionsSubscriber.php @@ -159,10 +159,8 @@ public function save_metabox_options() { if ( ! isset( $rejected_uris[ $path ] ) ) { array_push( $new_cache_reject_uri, $path ); } - } else { - if ( isset( $rejected_uris[ $path ] ) ) { - unset( $new_cache_reject_uri[ $rejected_uris[ $path ] ] ); - } + } elseif ( isset( $rejected_uris[ $path ] ) ) { + unset( $new_cache_reject_uri[ $rejected_uris[ $path ] ] ); } if ( $new_cache_reject_uri !== $cache_reject_uri ) { diff --git a/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber.php b/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber.php index e796457e1d..48c34d959a 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber.php +++ b/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber.php @@ -45,7 +45,7 @@ public static function get_subscribed_events() { * * @return array */ - public function add_options_first_time( $options ) : array { + public function add_options_first_time( $options ): array { return $this->settings->add_options( $options ); } @@ -59,7 +59,7 @@ public function add_options_first_time( $options ) : array { * * @return array */ - public function sanitize_options( $input, AdminSettings $settings ) : array { + public function sanitize_options( $input, AdminSettings $settings ): array { return $this->settings->sanitize_options( $input, $settings ); }