Skip to content

Commit

Permalink
Update wpcs to 3.0 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Oct 15, 2023
1 parent 4f42564 commit 1760493
Show file tree
Hide file tree
Showing 5 changed files with 244 additions and 27 deletions.
2 changes: 1 addition & 1 deletion classes/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function admin_enqueue_scripts( $hook_suffix ) {
}

// Enqueue option page scripts.
$asset_file = include( CHBE_PATH . '/build/admin.asset.php' );
$asset_file = include CHBE_PATH . '/build/admin.asset.php';

wp_enqueue_style(
CHBE_NAMESPACE . '-admin',
Expand Down
4 changes: 2 additions & 2 deletions classes/class-block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BlockEditor {
/**
* Constructor
*/
function __construct() {
public function __construct() {
// Abort the process if the editor isn't allowed to use this extension.
$options = Settings::get_options();
if ( ! $options['permissionBlockEditor'] ) {
Expand All @@ -36,7 +36,7 @@ function __construct() {
* Enqueue block editor scripts
*/
public function enqueue_editor_scripts() {
$asset_file = include( CHBE_PATH . '/build/block-editor.asset.php' );
$asset_file = include CHBE_PATH . '/build/block-editor.asset.php';

// Abort the process if the user role isn't allowed to use this extension.
if ( ! Settings::is_allowed_user() ) {
Expand Down
12 changes: 6 additions & 6 deletions classes/class-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public function add_action_links( $links ) {
* Load classes
*/
public function load_classes() {
require_once( CHBE_PATH . '/classes/class-settings.php' );
require_once( CHBE_PATH . '/classes/class-admin.php' );
require_once( CHBE_PATH . '/classes/class-block-editor.php' );
require_once( CHBE_PATH . '/classes/class-classic-editor.php' );
require_once( CHBE_PATH . '/classes/class-theme-plugin-editor.php' );
require_once( CHBE_PATH . '/classes/class-api.php' );
require_once CHBE_PATH . '/classes/class-settings.php';
require_once CHBE_PATH . '/classes/class-admin.php';
require_once CHBE_PATH . '/classes/class-block-editor.php';
require_once CHBE_PATH . '/classes/class-classic-editor.php';
require_once CHBE_PATH . '/classes/class-theme-plugin-editor.php';
require_once CHBE_PATH . '/classes/class-api.php';
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 1760493

Please sign in to comment.