Skip to content

Commit

Permalink
Update wpcs to 3.0 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Oct 15, 2023
1 parent 0411c70 commit 2406f19
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 21 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "t-hamano/piano-block",
"description": "WordPress Plugin",
"description": "WordPress Plugin",
"license": "GPL-2.0-or-later",
"authors": [
{
Expand All @@ -9,10 +9,10 @@
],
"require-dev": {
"squizlabs/php_codesniffer": "*",
"wp-coding-standards/wpcs": "*"
"wp-coding-standards/wpcs": "^3.0"
},
"scripts": {
"phpcs": "phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"phpcs": "phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcsstandards/phpcsextra,vendor/phpcsstandards/phpcsutils",
"lint": "phpcs ./ --standard=./phpcs.ruleset.xml"
}
}
249 changes: 233 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions piano-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ function piano_block_render_callback( $attributes ) {

if ( ! empty( $attributes['synthesizerSetting'] ) ) {
$escaped_synthesizer_setting = array_map(
function( $attribute ) {
function ( $attribute ) {
if ( is_array( $attribute ) ) {
return array_map(
function( $child_attribute ) {
function ( $child_attribute ) {
return esc_attr( $child_attribute );
},
$attribute
Expand Down

0 comments on commit 2406f19

Please sign in to comment.