Skip to content
This repository was archived by the owner on Nov 6, 2022. It is now read-only.

Commit 8cc9205

Browse files
committed
Address more phpcs issues, add a wrapper script for phpcbf
This should be most of the remaining issues. And running phpcbf should make this easier.
1 parent f0f5956 commit 8cc9205

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"require-dev": {
1111
"brain/monkey": "^2",
12-
"squizlabs/php_codesniffer": "^3.4"
12+
"squizlabs/php_codesniffer": "^3.4",
13+
"wp-coding-standards/wpcs": "2.1.1"
1314
}
1415
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
},
1010
"scripts": {
1111
"dev": "cross-env BABEL_ENV=default webpack --watch",
12-
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack"
12+
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
13+
"lint:php": "vendor/bin/phpcs",
14+
"lint:php:fix": "vendor/bin/phpcbf"
1315
},
1416
"author": "Block Lab",
1517
"license": "GPL-2.0+",

tests/php/unit/admin/test-class-import.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ function wp_handle_upload_error( $file, $message ) {
212212
$this->assertNotContains( $welcome_text, $output );
213213

214214
// The file is now a real file.
215-
$file = array( 'file' => $this->import_file_valid_json );
216-
$tmp_name = $this->import_file_valid_json;
217-
$files_import = array_merge(
215+
$file = array( 'file' => $this->import_file_valid_json );
216+
$tmp_name = $this->import_file_valid_json;
217+
$files_import = array_merge(
218218
$file,
219219
array(
220220
'name' => 'mock-import-valid-format',

tests/php/unit/admin/test-class-license.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ public function test_activate_license() {
231231
$this->instance->init();
232232
$license_key = '6234234';
233233
add_filter(
234-
self::HTTP_FILTER_NAME, function( $response ) {
234+
self::HTTP_FILTER_NAME,
235+
function( $response ) {
235236
unset( $response );
236237
return new WP_Error();
237238
}

0 commit comments

Comments
 (0)