Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coding-standards issues #50656

Merged
merged 1 commit into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<rule ref="WordPress.WP.I18n.MissingArgDomainDefault">
<exclude-pattern>lib/compat/*</exclude-pattern>
<exclude-pattern>packages/block-library/src/*</exclude-pattern>
<exclude-pattern>build/block-library/*</exclude-pattern>
</rule>

<arg value="ps"/>
Expand All @@ -45,6 +46,10 @@

<!-- Exclude generated files -->
<exclude-pattern>./packages/block-serialization-spec-parser/parser.php</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>

<!-- Exclude third party libraries -->
<exclude-pattern>./vendor/*</exclude-pattern>

<!-- These special comments are markers for the build process -->
<rule ref="Squiz.Commenting.InlineComment.WrongStyle">
Expand All @@ -57,6 +62,7 @@
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>phpunit/*</exclude-pattern>
<exclude-pattern>**/*.min.asset.php</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>phpunit/*</exclude-pattern>
Expand Down
10 changes: 9 additions & 1 deletion test/emptytheme/functions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<?php
/**
* Empty theme functions and definitions.
*
* @package Gutenberg
*/

if ( ! function_exists( 'emptytheme_support' ) ) :
function emptytheme_support() {
/**
* Add theme support for various features.
*/
function emptytheme_support() {

// Adding support for core block visual styles.
add_theme_support( 'wp-block-styles' );
Expand Down
9 changes: 9 additions & 0 deletions test/emptytheme/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
/**
* Empty theme index.php file.
*
* @package Gutenberg
*/

// Silence is golden.
return;
8 changes: 8 additions & 0 deletions test/gutenberg-test-themes/emptyhybrid/functions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<?php
/**
* Empty theme functions and definitions.
*
* @package Gutenberg
*/

if ( ! function_exists( 'emptyhybrid_support' ) ) :
/**
* Add theme support for various features.
*/
function emptyhybrid_support() {

// Adding support for core block visual styles.
Expand Down
8 changes: 8 additions & 0 deletions test/gutenberg-test-themes/emptyhybrid/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php
/**
* Empty-Hybrid theme index.php file.
*
* @package Gutenberg
*/

?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
Expand Down
9 changes: 9 additions & 0 deletions test/gutenberg-test-themes/style-variations/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
/**
* Theme index.php file.
*
* @package Gutenberg
*/

// Silence is golden.
return;