Skip to content

Commit a255c0e

Browse files
authored
Make DataProviderStaticFixer always risky (#929)
1 parent 4721d3f commit a255c0e

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Latest stable version](https://img.shields.io/packagist/v/kubawerlos/php-cs-fixer-custom-fixers.svg?label=current%20version)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
66
[![PHP version](https://img.shields.io/packagist/php-v/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://php.net)
77
[![License](https://img.shields.io/github/license/kubawerlos/php-cs-fixer-custom-fixers.svg)](LICENSE)
8-
![Tests](https://img.shields.io/badge/tests-3511-brightgreen.svg)
8+
![Tests](https://img.shields.io/badge/tests-3510-brightgreen.svg)
99
[![Downloads](https://img.shields.io/packagist/dt/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
1010

1111
[![CI Status](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/workflows/CI/badge.svg?branch=main)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions)

src/Fixer/DataProviderStaticFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function isCandidate(Tokens $tokens): bool
9090

9191
public function isRisky(): bool
9292
{
93-
return $this->force;
93+
return $this->phpUnitDataProviderStaticFixer->isRisky();
9494
}
9595

9696
public function fix(\SplFileInfo $file, Tokens $tokens): void

tests/Fixer/AbstractFixerTestCase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ abstract class AbstractFixerTestCase extends TestCase
3737
'testFixPre80',
3838
'testFix80',
3939
'testFix82',
40-
'testIsNotRiskyWithoutForceOption',
4140
'testIsRisky',
42-
'testIsRiskyWithForceOption',
4341
'testReversingCodeSample',
4442
'testStringIsTheSame',
4543
'testSuccessorName',

tests/Fixer/DataProviderStaticFixerTest.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,11 @@
2323
*/
2424
final class DataProviderStaticFixerTest extends AbstractFixerTestCase
2525
{
26-
public function testIsRiskyWithForceOption(): void
26+
public function testIsRisky(): void
2727
{
28-
$this->fixer->configure(['force' => true]);
2928
self::assertTrue($this->fixer->isRisky());
3029
}
3130

32-
public function testIsNotRiskyWithoutForceOption(): void
33-
{
34-
self::assertFalse($this->fixer->isRisky());
35-
}
36-
3731
public function testSuccessorName(): void
3832
{
3933
self::assertContains('php_unit_data_provider_static', $this->fixer->getSuccessorsNames());

0 commit comments

Comments
 (0)