From f04852680b8bc679499412092a9048ce7f280e1a Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 11 Nov 2023 10:42:21 +0100 Subject: [PATCH 1/6] use `printf()` instead of `echo sprintf()` --- inc/class-snitch-cpt.php | 18 +++++++++--------- inc/class-snitch.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/inc/class-snitch-cpt.php b/inc/class-snitch-cpt.php index c543301..307633e 100644 --- a/inc/class-snitch-cpt.php +++ b/inc/class-snitch-cpt.php @@ -252,7 +252,7 @@ public static function actions_above_table() { $filter = ( ! isset( $_GET['snitch_state_filter'] ) ? '' : (int) $_GET['snitch_state_filter'] ); /* Filter dropdown */ - echo sprintf( + printf( '', '', '', @@ -484,7 +484,7 @@ private static function _html_url( $post_id ) { $blacklisted = in_array( $host, self::$options['hosts'] ); /* Print output */ - echo sprintf( + printf( '

%s
%s
', esc_attr( $blacklisted ), wp_kses( @@ -541,7 +541,7 @@ private static function _html_file( $post_id ) { $blacklisted = in_array( $file, self::$options['files'] ); /* Print output */ - echo sprintf( + printf( '

%s: %s
/%s:%d
%s
', esc_attr( $blacklisted ), esc_html( $meta['type'] ), @@ -583,7 +583,7 @@ private static function _html_state( $post_id ) { ); /* Print the state */ - echo sprintf( + printf( '%s', esc_attr( strtolower( $states[ $state ] ) ), esc_html( $states[ $state ] ) @@ -591,7 +591,7 @@ private static function _html_state( $post_id ) { /* Colorize blocked item */ if ( SNITCH_BLOCKED === $state ) { - echo sprintf( + printf( '', esc_attr( $post_id ) ); @@ -640,7 +640,7 @@ private static function _html_code( $post_id ) { private static function _html_duration( $post_id ) { $duration = self::_get_meta( $post_id, 'duration' ); if ( $duration ) { - echo sprintf( + printf( /* translators: duration in seconds */ esc_html__( '%s seconds', 'snitch' ), esc_html( $duration ) @@ -657,7 +657,7 @@ private static function _html_duration( $post_id ) { * @param integer $post_id Post-ID. */ private static function _html_created( $post_id ) { - echo sprintf( + printf( /* translators: duration (e. g. "15 mins") since the post was created */ esc_html__( '%s ago', 'snitch' ), esc_html( human_time_diff( get_post_time( 'G', true, $post_id ) ) ) @@ -692,7 +692,7 @@ private static function _html_postdata( $post_id ) { } /* Thickbox content start */ - echo sprintf( + printf( '
',
 			esc_attr( $post_id )
 		);
@@ -922,7 +922,7 @@ public static function updated_notice() {
 		$update_message = $_GET['updated'] > 0
 			? __( 'New rule added to the Snitch filter. Matches are labeled in red.', 'snitch' )
 			: __( 'An existing rule removed from the Snitch filter.', 'snitch' );
-		echo sprintf(
+		printf(
 			'

%s

', esc_html( $update_message ) ); diff --git a/inc/class-snitch.php b/inc/class-snitch.php index f86fc01..bdaad86 100644 --- a/inc/class-snitch.php +++ b/inc/class-snitch.php @@ -204,7 +204,7 @@ public static function updated_notice() { } /* Print */ - echo sprintf( + printf( '

%s

', wp_kses( __( 'Outgoing connections are blocked in wp-config.php. Check the constant WP_HTTP_BLOCK_EXTERNAL.', 'snitch' ), From a22abebaf08d3a1e865df4b828104dcd89fe2979 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 11 Nov 2023 10:43:04 +0100 Subject: [PATCH 2/6] remove parentheses around `require_once` --- inc/class-snitch-http.php | 2 +- snitch.php | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/inc/class-snitch-http.php b/inc/class-snitch-http.php index 1e55e96..8bf8d10 100644 --- a/inc/class-snitch-http.php +++ b/inc/class-snitch-http.php @@ -276,7 +276,7 @@ private static function _localize_plugin( $path ) { /* Frontend */ if ( ! function_exists( 'get_plugins' ) ) { - require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); + require_once ABSPATH . 'wp-admin/includes/plugin.php'; } /* All active plugins */ diff --git a/snitch.php b/snitch.php index 744522c..b5db3f4 100644 --- a/snitch.php +++ b/snitch.php @@ -86,12 +86,10 @@ */ function snitch_autoload( $class ) { if ( in_array( $class, array( 'Snitch', 'Snitch_HTTP', 'Snitch_CPT', 'Snitch_Blocklist' ) ) ) { - require_once( - sprintf( - '%s/inc/class-%s.php', - SNITCH_DIR, - strtolower( str_replace( '_', '-', $class ) ) - ) + require_once sprintf( + '%s/inc/class-%s.php', + SNITCH_DIR, + strtolower( str_replace( '_', '-', $class ) ) ); } } From 22b3185f1a020cc05b22d5dfee124d45a0005c0e Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 11 Nov 2023 10:49:44 +0100 Subject: [PATCH 3/6] fix precision alignment, equals signs and double arrows --- inc/class-snitch-blocklist.php | 2 +- inc/class-snitch-cpt.php | 54 +++++++++++++++++----------------- inc/class-snitch-http.php | 6 ++-- inc/class-snitch.php | 16 +++++----- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/inc/class-snitch-blocklist.php b/inc/class-snitch-blocklist.php index a9ee367..5545cf0 100644 --- a/inc/class-snitch-blocklist.php +++ b/inc/class-snitch-blocklist.php @@ -24,7 +24,7 @@ class Snitch_Blocklist { * @param string $type Typ des Eintrags (hosts|files). */ public static function block( $items, $type ) { - /* Type check */ + /* Type check */ if ( ! in_array( $type, array( 'hosts', 'files' ) ) ) { return; } diff --git a/inc/class-snitch-cpt.php b/inc/class-snitch-cpt.php index 307633e..8b17d0e 100644 --- a/inc/class-snitch-cpt.php +++ b/inc/class-snitch-cpt.php @@ -30,7 +30,7 @@ class Snitch_CPT { * @change 0.0.1 */ public static function instance() { - new self(); + new self(); } /** @@ -40,30 +40,30 @@ public static function instance() { * @change 1.1.3 */ public function __construct() { - /* Set plugin options */ + /* Set plugin options */ self::$options = Snitch::get_options(); /* Post Type */ register_post_type( 'snitch', array( - 'label' => 'Snitch', - 'labels' => array( - 'not_found' => esc_html__( 'No items found. Future connections will be shown at this place.', 'snitch' ), + 'label' => 'Snitch', + 'labels' => array( + 'not_found' => esc_html__( 'No items found. Future connections will be shown at this place.', 'snitch' ), 'not_found_in_trash' => esc_html__( 'No items found in trash.', 'snitch' ), - 'search_items' => esc_html__( 'Search in destination', 'snitch' ), + 'search_items' => esc_html__( 'Search in destination', 'snitch' ), ), - 'public' => false, - 'show_ui' => true, - 'query_var' => true, - 'hierarchical' => false, - 'capabilities' => array( + 'public' => false, + 'show_ui' => true, + 'query_var' => true, + 'hierarchical' => false, + 'capabilities' => array( 'create_posts' => false, 'delete_posts' => false, ), - 'menu_position' => 50, - 'capability_type' => 'snitch', - 'publicly_queryable' => false, + 'menu_position' => 50, + 'capability_type' => 'snitch', + 'publicly_queryable' => false, 'exclude_from_search' => true, ) ); @@ -280,7 +280,7 @@ public static function actions_above_table() { */ public static function expand_query_vars( $query ) { if ( ! empty( $_GET['snitch_state_filter'] ) ) { - $query->query_vars['meta_key'] = '_snitch_state'; + $query->query_vars['meta_key'] = '_snitch_state'; $query->query_vars['meta_value'] = (int) $_GET['snitch_state_filter']; } } @@ -437,7 +437,7 @@ public static function sortable_columns() { * @param integer $post_id Post-ID. */ public static function custom_column( $column, $post_id ) { - /* Column types */ + /* Column types */ $types = (array) apply_filters( 'snitch_custom_column', array( @@ -476,8 +476,8 @@ public static function custom_column( $column, $post_id ) { * @param integer $post_id Post-ID. */ private static function _html_url( $post_id ) { - /* Init data */ - $url = self::_get_meta( $post_id, 'url' ); + /* Init data */ + $url = self::_get_meta( $post_id, 'url' ); $host = self::_get_meta( $post_id, 'host' ); /* Already blacklisted? */ @@ -504,7 +504,7 @@ private static function _html_url( $post_id ) { array( 'a' => array( 'class' => array(), - 'href' => array(), + 'href' => array(), ), ) ) @@ -557,7 +557,7 @@ private static function _html_file( $post_id ) { array( 'a' => array( 'class' => array(), - 'href' => array(), + 'href' => array(), ), ) ) @@ -607,7 +607,7 @@ private static function _html_state( $post_id ) { */ private static function _html_https( $post_id ) { /* Item state */ - $url = self::_get_meta( $post_id, 'url' ); + $url = self::_get_meta( $post_id, 'url' ); $parsed_url = wp_parse_url( $url ); /* Print the state */ @@ -713,7 +713,7 @@ private static function _html_postdata( $post_id ) { array( 'a' => array( 'class' => array(), - 'href' => array(), + 'href' => array(), ), ) ); @@ -733,12 +733,12 @@ private static function _html_postdata( $post_id ) { private static function _action_link( $post_id, $type, $blacklisted = false ) { if ( $blacklisted ) { $action = 'unblock'; - $text = 'host' === $type + $text = 'host' === $type ? __( 'Unblock this host', 'snitch' ) : __( 'Unblock this file', 'snitch' ); } else { $action = 'block'; - $text = 'host' === $type + $text = 'host' === $type ? __( 'Block this host', 'snitch' ) : __( 'Block this file', 'snitch' ); } @@ -848,7 +848,7 @@ public static function bulk_action() { /* Set vars */ $action = sanitize_text_field( wp_unslash( $_GET['action'] ) ); - $type = sanitize_text_field( wp_unslash( $_GET['type'] ) ); + $type = sanitize_text_field( wp_unslash( $_GET['type'] ) ); /* Validate action and type */ if ( ! in_array( $action, array( 'block', 'unblock' ) ) || ! in_array( $type, array( 'host', 'file' ) ) ) { @@ -970,8 +970,8 @@ private static function _get_meta( $post_id, $key ) { */ public static function views_edit( $views ) { $links = array( - 'paypal' => '' . esc_html__( 'Donate', 'snitch' ) . '', - 'wiki' => '' . esc_html__( 'Manual', 'snitch' ) . '', + 'paypal' => '' . esc_html__( 'Donate', 'snitch' ) . '', + 'wiki' => '' . esc_html__( 'Manual', 'snitch' ) . '', 'support' => '' . esc_html__( 'Support', 'snitch' ) . '', ); diff --git a/inc/class-snitch-http.php b/inc/class-snitch-http.php index 8bf8d10..ee60dbb 100644 --- a/inc/class-snitch-http.php +++ b/inc/class-snitch-http.php @@ -193,7 +193,7 @@ private static function _debug_backtrace() { if ( ! empty( $item['function'] ) && strpos( $item['function'], 'wp_remote_' ) !== false ) { /* Use prev item */ if ( empty( $item['file'] ) ) { - $item = $trace[ -- $index ]; + $item = $trace[ --$index ]; } /* Get file and line */ @@ -214,7 +214,7 @@ private static function _debug_backtrace() { * @return array $meta Array mit Informationen. */ private static function _face_detect( $path ) { - /* Default */ + /* Default */ $meta = array( 'type' => 'WordPress', 'name' => 'Core', @@ -256,7 +256,7 @@ private static function _face_detect( $path ) { * @return array|bool Array mit Plugin-Daten. */ private static function _localize_plugin( $path ) { - /* Check path */ + /* Check path */ if ( strpos( $path, WP_PLUGIN_DIR ) === false ) { return false; } diff --git a/inc/class-snitch.php b/inc/class-snitch.php index bdaad86..7d6ed91 100644 --- a/inc/class-snitch.php +++ b/inc/class-snitch.php @@ -21,7 +21,7 @@ class Snitch { * @change 0.0.1 */ public static function instance() { - new self(); + new self(); } /** @@ -31,7 +31,7 @@ public static function instance() { * @change 1.0.5 */ public function __construct() { - /* Register CPT */ + /* Register CPT */ add_action( 'init', array( @@ -79,9 +79,9 @@ public function __construct() { /* Skip secondary hooks */ if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) - || ( defined( 'DOING_CRON' ) && DOING_CRON ) - || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) - || ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) ) { + || ( defined( 'DOING_CRON' ) && DOING_CRON ) + || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) + || ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) ) { return; } @@ -143,7 +143,7 @@ public function __construct() { * @return array Array mit erweiterten Links */ public static function meta_links( $data, $file ) { - /* Skip the rest */ + /* Skip the rest */ if ( SNITCH_BASE !== $file ) { return $data; } @@ -199,7 +199,7 @@ public static function action_links( $data ) { public static function updated_notice() { /* Skip requests */ if ( 'plugins.php' !== $GLOBALS['pagenow'] - || ! ( defined( 'WP_HTTP_BLOCK_EXTERNAL' ) && WP_HTTP_BLOCK_EXTERNAL ) ) { + || ! ( defined( 'WP_HTTP_BLOCK_EXTERNAL' ) && WP_HTTP_BLOCK_EXTERNAL ) ) { return; } @@ -342,7 +342,7 @@ public static function activation() { * @change 1.0.5 */ public static function deactivation() { - wp_clear_scheduled_hook( 'snitch_cleanup' ); + wp_clear_scheduled_hook( 'snitch_cleanup' ); } /** From c0dc4807c6b2da3a338536cf21ab5136a666ef91 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 11 Nov 2023 10:51:43 +0100 Subject: [PATCH 4/6] rename $class parameter of autoload function to $class_name --- snitch.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snitch.php b/snitch.php index b5db3f4..b719c79 100644 --- a/snitch.php +++ b/snitch.php @@ -82,14 +82,14 @@ /** * Autoload the class. * - * @param string $class the class name. + * @param string $class_name the class name. */ -function snitch_autoload( $class ) { - if ( in_array( $class, array( 'Snitch', 'Snitch_HTTP', 'Snitch_CPT', 'Snitch_Blocklist' ) ) ) { +function snitch_autoload( $class_name ) { + if ( in_array( $class_name, array( 'Snitch', 'Snitch_HTTP', 'Snitch_CPT', 'Snitch_Blocklist' ) ) ) { require_once sprintf( '%s/inc/class-%s.php', SNITCH_DIR, - strtolower( str_replace( '_', '-', $class ) ) + strtolower( str_replace( '_', '-', $class_name ) ) ); } } From 84b4664ad66012f9b370308d3a923a7176514f94 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 11 Nov 2023 10:54:07 +0100 Subject: [PATCH 5/6] use `wp_parse_url()` in favor of `parse_url()` --- inc/class-snitch-http.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/class-snitch-http.php b/inc/class-snitch-http.php index ee60dbb..c7be389 100644 --- a/inc/class-snitch-http.php +++ b/inc/class-snitch-http.php @@ -36,7 +36,7 @@ public static function inspect_request( $pre, $args, $url ) { } /* Invalid host */ - $host = parse_url( $url, PHP_URL_HOST ); + $host = wp_parse_url( $url, PHP_URL_HOST ); if ( ! $host ) { return $pre; } @@ -129,7 +129,7 @@ public static function log_response( $response, $type, $class, $args, $url ) { } /* Validate host */ - $host = parse_url( $url, PHP_URL_HOST ); + $host = wp_parse_url( $url, PHP_URL_HOST ); if ( ! $host ) { return false; } @@ -363,7 +363,7 @@ private static function _get_postdata( $args ) { */ private static function _is_internal( $host ) { /* Get the blog host */ - $blog_host = parse_url( + $blog_host = wp_parse_url( get_bloginfo( 'url' ), PHP_URL_HOST ); From e6dfcf257bb2fb040f0955baa2d8263f5fd38a51 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 11 Nov 2023 10:54:28 +0100 Subject: [PATCH 6/6] update WPCS to v3.0 --- composer.json | 2 +- composer.lock | 171 +++++++++++++++++++++++++++++++++++++++++++++++--- phpcs.xml | 5 +- 3 files changed, 166 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index e13ff3e..a8f62c0 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "matthiasmullie/minify": "^1.3", "squizlabs/php_codesniffer": "^3.7", "phpcompatibility/phpcompatibility-wp": "^2.1", - "wp-coding-standards/wpcs": "^2.3" + "wp-coding-standards/wpcs": "^3.0" }, "scripts": { "post-install-cmd": [ diff --git a/composer.lock b/composer.lock index b329d88..a04ba30 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "60f11ad50916a1a60f6dda352f981e09", + "content-hash": "763d3e4c47d789e7be799c7be8332e62", "packages": [], "packages-dev": [ { @@ -383,6 +383,142 @@ }, "time": "2022-10-24T09:00:36+00:00" }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/746c3190ba8eb2f212087c947ba75f4f5b9a58d5", + "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.0.8", + "squizlabs/php_codesniffer": "^3.7.1" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" + } + ], + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" + }, + "time": "2023-09-20T22:06:18+00:00" + }, + { + "name": "phpcsstandards/phpcsutils", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/69465cab9d12454e5e7767b9041af0cd8cd13be7", + "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.7.1 || 4.0.x-dev@dev" + }, + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPCSUtils/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" + } + ], + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "phpcs3", + "standards", + "static analysis", + "tokens", + "utility" + ], + "support": { + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" + }, + "time": "2023-07-16T21:39:41+00:00" + }, { "name": "squizlabs/php_codesniffer", "version": "3.7.2", @@ -442,30 +578,38 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "2.3.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b4caf9689f1a0e4a4c632679a44e638c1c67aff1", + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1", "shasum": "" }, "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" + "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsutils": "^1.0.8", + "squizlabs/php_codesniffer": "^3.7.2" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", + "phpcsstandards/phpcsdevtools": "^1.2.0", "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -482,6 +626,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -489,7 +634,13 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2020-05-13T23:57:56+00:00" + "funding": [ + { + "url": "https://opencollective.com/thewpcc/contribute/wp-php-63406", + "type": "custom" + } + ], + "time": "2023-09-14T07:06:09+00:00" } ], "aliases": [], diff --git a/phpcs.xml b/phpcs.xml index 235e868..0879a02 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -20,7 +20,10 @@ - + + + +