From 0c8ef6957c8cd63268c4ca9590f82d6548a2c759 Mon Sep 17 00:00:00 2001 From: Anton Vlasenko Date: Tue, 30 Jan 2024 22:51:49 +0100 Subject: [PATCH] Improve the regular expression. --- phpcs.xml.dist | 4 ++-- .../CodeAnalysis/ForbiddenFunctionsAndClassesUnitTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 2f51a2f364f457..4502b5f95fe9b8 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -157,10 +157,10 @@ ./packages/block-library/src/*/*.php - + - + diff --git a/test/php/gutenberg-coding-standards/Gutenberg/Tests/CodeAnalysis/ForbiddenFunctionsAndClassesUnitTest.php b/test/php/gutenberg-coding-standards/Gutenberg/Tests/CodeAnalysis/ForbiddenFunctionsAndClassesUnitTest.php index ab147688b98e09..dc161ceac8a103 100644 --- a/test/php/gutenberg-coding-standards/Gutenberg/Tests/CodeAnalysis/ForbiddenFunctionsAndClassesUnitTest.php +++ b/test/php/gutenberg-coding-standards/Gutenberg/Tests/CodeAnalysis/ForbiddenFunctionsAndClassesUnitTest.php @@ -118,11 +118,11 @@ public function setCliValues( $filename, $config ) { $sniff = $current_ruleset->sniffs[ ForbiddenFunctionsAndClassesSniff::class ]; $sniff->forbidden_functions = array( - '(G|g)utenberg.*', + '[Gg]utenberg.*', ); $sniff->forbidden_classes = array( - '(G|g)utenberg.*', + '[Gg]utenberg.*', ); } }