From acd384d9b2d849e1bfac0f3e63caacb0396b8ac9 Mon Sep 17 00:00:00 2001 From: Nikhil Joshua Date: Tue, 11 Apr 2023 18:03:08 +0530 Subject: [PATCH 1/2] Update phpcs.xml to ignore build files and e2e test files --- phpcs.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpcs.xml b/phpcs.xml index bf525b6c..2cec3e0a 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -23,7 +23,8 @@ */languages/* */admin/predis.php */vendor/* - + */build/* + */tests/e2e-playwright/* From 737e8b46c0129a726ce8bb7b56c93a7c26b068d7 Mon Sep 17 00:00:00 2001 From: Nikhil Joshua Date: Tue, 11 Apr 2023 18:03:31 +0530 Subject: [PATCH 2/2] Fix PHPCS issues via PHPCBF --- admin/class-nginx-helper-admin.php | 12 ++++++------ admin/class-purger.php | 2 +- admin/partials/nginx-helper-general-options.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index d94d86b9..9f2aca06 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -725,12 +725,12 @@ public function purge_all() { if ( 'purge' === $action ) { - /** - * Fire an action after the entire cache has been purged whatever caching type is used. - * - * @since 2.2.2 - */ - do_action( 'rt_nginx_helper_after_purge_all' ); + /** + * Fire an action after the entire cache has been purged whatever caching type is used. + * + * @since 2.2.2 + */ + do_action( 'rt_nginx_helper_after_purge_all' ); } diff --git a/admin/class-purger.php b/admin/class-purger.php index ac54b8d0..6058accb 100644 --- a/admin/class-purger.php +++ b/admin/class-purger.php @@ -232,7 +232,7 @@ private function _purge_by_options( $post_id, $blog_id, $_purge_page, $_purge_ar $url = get_sample_permalink( $post_id ); if ( ! empty( $url[0] ) && ! empty( $url[1] ) ) { - $url = str_replace( array('%postname%', '%pagename%'), $url[1], $url[0] ); + $url = str_replace( array( '%postname%', '%pagename%' ), $url[1], $url[0] ); } else { $url = ''; } diff --git a/admin/partials/nginx-helper-general-options.php b/admin/partials/nginx-helper-general-options.php index 0dc388a4..ff186498 100644 --- a/admin/partials/nginx-helper-general-options.php +++ b/admin/partials/nginx-helper-general-options.php @@ -720,7 +720,7 @@ - +