From 62be9c9f068b6fc7fee0450a0c736045c05f8a83 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 16 Sep 2023 19:51:16 +0200 Subject: [PATCH 1/2] CS: minor tweaks to comply with YoastCS 3.0 --- src/domain-dropdown.php | 1 - src/downgrader.php | 2 +- src/feature-toggler.php | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/domain-dropdown.php b/src/domain-dropdown.php index 3709726..41d9499 100644 --- a/src/domain-dropdown.php +++ b/src/domain-dropdown.php @@ -140,4 +140,3 @@ private function replace_domain( $domain, $url, $headers ) { ]; } } - diff --git a/src/downgrader.php b/src/downgrader.php index cc849f8..3c1ca04 100644 --- a/src/downgrader.php +++ b/src/downgrader.php @@ -188,7 +188,7 @@ protected function downgrade( $target_version ) { throw new Exception( \__( 'Could not install the requested version.', 'yoast-test-helper' ) ); } - $downgrade_version = static function( $option ) use ( $target_version ) { + $downgrade_version = static function ( $option ) use ( $target_version ) { $option['version'] = \sanitize_text_field( $target_version ); return $option; }; diff --git a/src/feature-toggler.php b/src/feature-toggler.php index 3ad81d6..0d301e8 100644 --- a/src/feature-toggler.php +++ b/src/feature-toggler.php @@ -54,7 +54,6 @@ public function get_controls() { return ''; } - $fields = ''; foreach ( $this->features as $feature => $label ) { From 85cffe244fe233bdac18596bad26dd39e386272d Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 30 Nov 2023 16:53:32 +0100 Subject: [PATCH 2/2] CS/QA: use import `use` statements --- yoast-test-helper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yoast-test-helper.php b/yoast-test-helper.php index f23fb2e..fda4435 100644 --- a/yoast-test-helper.php +++ b/yoast-test-helper.php @@ -33,6 +33,8 @@ * along with this program. If not, see . */ +use Yoast\WP\Test_Helper\Plugin; + define( 'YOAST_TEST_HELPER_FILE', __FILE__ ); define( 'YOAST_TEST_HELPER_DIR', dirname( YOAST_TEST_HELPER_FILE ) ); define( 'YOAST_TEST_HELPER_VERSION', '1.18-RC6' ); @@ -41,5 +43,5 @@ require __DIR__ . '/vendor/autoload.php'; } -$yoast_test_helper = new Yoast\WP\Test_Helper\Plugin(); +$yoast_test_helper = new Plugin(); $yoast_test_helper->add_hooks();