Skip to content

Commit 0e318f4

Browse files
committed
Updated own reference to the standard and fixed violations.
1 parent d5a6b58 commit 0e318f4

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

phpcs.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
<!-- Checks that the strict_types has been declared. -->
88
<rule ref="Generic.PHP.RequireStrictTypes" />
99
<!-- Apply our own DrevOps variable naming standards. -->
10-
<rule ref="DrevOps.NamingConventions.LocalVariableSnakeCase"/>
11-
<rule ref="DrevOps.NamingConventions.ParameterSnakeCase"/>
10+
<rule ref="DrevOps"/>
1211

1312
<!-- Show sniff codes in all reports -->
1413
<arg value="s"/>

tests/Unit/AbstractVariableSnakeCaseSniffTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AbstractVariableSnakeCaseSniffTest extends UnitTestCase {
2727
* @param bool $expected
2828
* Expected result.
2929
*/
30-
#[DataProvider('providerSnakeCase')]
30+
#[DataProvider('dataProviderSnakeCaseDetection')]
3131
public function testSnakeCaseDetection(string $name, bool $expected): void {
3232
$sniff = new LocalVariableSnakeCaseSniff();
3333
$reflection = new \ReflectionClass($sniff);
@@ -43,7 +43,7 @@ public function testSnakeCaseDetection(string $name, bool $expected): void {
4343
* @return array<string, array<string|bool>>
4444
* Test cases.
4545
*/
46-
public static function providerSnakeCase(): array {
46+
public static function dataProviderSnakeCaseDetection(): array {
4747
return [
4848
'valid_single_word' => ['test', TRUE],
4949
'valid_with_underscore' => ['test_variable', TRUE],

tests/Unit/LocalVariableSnakeCaseSniffTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testErrorCodeConstant(): void {
4444
* @param bool $should_have_errors
4545
* Whether errors should be detected.
4646
*/
47-
#[DataProvider('providerProcessCases')]
47+
#[DataProvider('dataProviderProcess')]
4848
public function testProcess(string $code, bool $should_have_errors): void {
4949
$file = $this->processCode($code);
5050
$errors = $file->getErrors();
@@ -63,7 +63,7 @@ public function testProcess(string $code, bool $should_have_errors): void {
6363
* @return array<string, array<mixed>>
6464
* Test cases.
6565
*/
66-
public static function providerProcessCases(): array {
66+
public static function dataProviderProcess(): array {
6767
return [
6868
'valid_snake_case_variable' => [
6969
'<?php $valid_variable = 1;',

tests/Unit/ParameterSnakeCaseSniffTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testErrorCodeConstant(): void {
5454
* @param bool $should_have_errors
5555
* Whether errors should be detected.
5656
*/
57-
#[DataProvider('providerProcessCases')]
57+
#[DataProvider('dataProviderProcess')]
5858
public function testProcess(string $code, bool $should_have_errors): void {
5959
$file = $this->processCode($code);
6060
$errors = $file->getErrors();
@@ -73,7 +73,7 @@ public function testProcess(string $code, bool $should_have_errors): void {
7373
* @return array<string, array<mixed>>
7474
* Test cases.
7575
*/
76-
public static function providerProcessCases(): array {
76+
public static function dataProviderProcess(): array {
7777
return [
7878
'valid_snake_case_variable' => [
7979
'<?php $valid_variable = 1;',

0 commit comments

Comments
 (0)