From b91b870980e783eb02544f63b744a6dc5d28c3c4 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 24 Nov 2025 16:44:02 +1100 Subject: [PATCH] Updated own reference to the standard and fixed violations. --- phpcs.xml | 3 +-- tests/Unit/AbstractVariableSnakeCaseSniffTest.php | 4 ++-- tests/Unit/LocalVariableSnakeCaseSniffTest.php | 4 ++-- tests/Unit/ParameterSnakeCaseSniffTest.php | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/phpcs.xml b/phpcs.xml index 5209a52..2b0781f 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -7,8 +7,7 @@ - - + diff --git a/tests/Unit/AbstractVariableSnakeCaseSniffTest.php b/tests/Unit/AbstractVariableSnakeCaseSniffTest.php index b92ca3a..c1c63d2 100644 --- a/tests/Unit/AbstractVariableSnakeCaseSniffTest.php +++ b/tests/Unit/AbstractVariableSnakeCaseSniffTest.php @@ -27,7 +27,7 @@ class AbstractVariableSnakeCaseSniffTest extends UnitTestCase { * @param bool $expected * Expected result. */ - #[DataProvider('providerSnakeCase')] + #[DataProvider('dataProviderSnakeCaseDetection')] public function testSnakeCaseDetection(string $name, bool $expected): void { $sniff = new LocalVariableSnakeCaseSniff(); $reflection = new \ReflectionClass($sniff); @@ -43,7 +43,7 @@ public function testSnakeCaseDetection(string $name, bool $expected): void { * @return array> * Test cases. */ - public static function providerSnakeCase(): array { + public static function dataProviderSnakeCaseDetection(): array { return [ 'valid_single_word' => ['test', TRUE], 'valid_with_underscore' => ['test_variable', TRUE], diff --git a/tests/Unit/LocalVariableSnakeCaseSniffTest.php b/tests/Unit/LocalVariableSnakeCaseSniffTest.php index 3342451..86fec62 100644 --- a/tests/Unit/LocalVariableSnakeCaseSniffTest.php +++ b/tests/Unit/LocalVariableSnakeCaseSniffTest.php @@ -44,7 +44,7 @@ public function testErrorCodeConstant(): void { * @param bool $should_have_errors * Whether errors should be detected. */ - #[DataProvider('providerProcessCases')] + #[DataProvider('dataProviderProcess')] public function testProcess(string $code, bool $should_have_errors): void { $file = $this->processCode($code); $errors = $file->getErrors(); @@ -63,7 +63,7 @@ public function testProcess(string $code, bool $should_have_errors): void { * @return array> * Test cases. */ - public static function providerProcessCases(): array { + public static function dataProviderProcess(): array { return [ 'valid_snake_case_variable' => [ 'processCode($code); $errors = $file->getErrors(); @@ -73,7 +73,7 @@ public function testProcess(string $code, bool $should_have_errors): void { * @return array> * Test cases. */ - public static function providerProcessCases(): array { + public static function dataProviderProcess(): array { return [ 'valid_snake_case_variable' => [ '