Skip to content
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
3 changes: 1 addition & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<!-- Checks that the strict_types has been declared. -->
<rule ref="Generic.PHP.RequireStrictTypes" />
<!-- Apply our own DrevOps variable naming standards. -->
<rule ref="DrevOps.NamingConventions.LocalVariableSnakeCase"/>
<rule ref="DrevOps.NamingConventions.ParameterSnakeCase"/>
<rule ref="DrevOps"/>

<!-- Show sniff codes in all reports -->
<arg value="s"/>
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/AbstractVariableSnakeCaseSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -43,7 +43,7 @@ public function testSnakeCaseDetection(string $name, bool $expected): void {
* @return array<string, array<string|bool>>
* Test cases.
*/
public static function providerSnakeCase(): array {
public static function dataProviderSnakeCaseDetection(): array {
return [
'valid_single_word' => ['test', TRUE],
'valid_with_underscore' => ['test_variable', TRUE],
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/LocalVariableSnakeCaseSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -63,7 +63,7 @@ public function testProcess(string $code, bool $should_have_errors): void {
* @return array<string, array<mixed>>
* Test cases.
*/
public static function providerProcessCases(): array {
public static function dataProviderProcess(): array {
return [
'valid_snake_case_variable' => [
'<?php $valid_variable = 1;',
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/ParameterSnakeCaseSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,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();
Expand All @@ -73,7 +73,7 @@ public function testProcess(string $code, bool $should_have_errors): void {
* @return array<string, array<mixed>>
* Test cases.
*/
public static function providerProcessCases(): array {
public static function dataProviderProcess(): array {
return [
'valid_snake_case_variable' => [
'<?php $valid_variable = 1;',
Expand Down