From a6ebc201623f971dfdad56fa9b08afffdff77f2f Mon Sep 17 00:00:00 2001 From: Thrijith Thankachan Date: Sun, 28 Jan 2018 00:25:43 +0530 Subject: [PATCH 1/2] fix phpcs warnings plugin --- templates/plugin-bootstrap.mustache | 2 +- templates/plugin-test-sample.mustache | 2 +- templates/plugin.mustache | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/plugin-bootstrap.mustache b/templates/plugin-bootstrap.mustache index c0344b343..d81c7c46a 100644 --- a/templates/plugin-bootstrap.mustache +++ b/templates/plugin-bootstrap.mustache @@ -12,7 +12,7 @@ if ( ! $_tests_dir ) { } if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) { - echo "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; + esc_html( "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" ) . PHP_EOL; exit( 1 ); } diff --git a/templates/plugin-test-sample.mustache b/templates/plugin-test-sample.mustache index 2e897d13d..1fe7bf4f7 100644 --- a/templates/plugin-test-sample.mustache +++ b/templates/plugin-test-sample.mustache @@ -13,7 +13,7 @@ class SampleTest extends WP_UnitTestCase { /** * A single example test. */ - function test_sample() { + public function test_sample() { // Replace this with some actual testing code. $this->assertTrue( true ); } diff --git a/templates/plugin.mustache b/templates/plugin.mustache index fc502b67a..1f6190bda 100644 --- a/templates/plugin.mustache +++ b/templates/plugin.mustache @@ -11,3 +11,5 @@ * * @package {{plugin_package}} */ + +// Your code starts here. From e1cb6cf14e1267ac1bad1214f9529182646a321d Mon Sep 17 00:00:00 2001 From: gitlost Date: Sat, 27 Jan 2018 21:52:11 +0000 Subject: [PATCH 2/2] Just make plugin.mustache change for the mo. --- templates/plugin-bootstrap.mustache | 2 +- templates/plugin-test-sample.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/plugin-bootstrap.mustache b/templates/plugin-bootstrap.mustache index d81c7c46a..c0344b343 100644 --- a/templates/plugin-bootstrap.mustache +++ b/templates/plugin-bootstrap.mustache @@ -12,7 +12,7 @@ if ( ! $_tests_dir ) { } if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) { - esc_html( "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" ) . PHP_EOL; + echo "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; exit( 1 ); } diff --git a/templates/plugin-test-sample.mustache b/templates/plugin-test-sample.mustache index 1fe7bf4f7..2e897d13d 100644 --- a/templates/plugin-test-sample.mustache +++ b/templates/plugin-test-sample.mustache @@ -13,7 +13,7 @@ class SampleTest extends WP_UnitTestCase { /** * A single example test. */ - public function test_sample() { + function test_sample() { // Replace this with some actual testing code. $this->assertTrue( true ); }