Skip to content

Commit 99939d5

Browse files
committed
Not risky anymore
1 parent 5ff8a0e commit 99939d5

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ The string key of an array or generator must be trimmed and have no double space
726726

727727
#### TypedClassConstantFixer
728728
Class constants must have a type.
729-
*Risky: when constant can be of different types.*
730729
```diff
731730
<?php
732731
class Foo {

src/Fixer/TypedClassConstantFixer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class Foo {
3838
new VersionSpecification(80300),
3939
),
4040
],
41-
'',
42-
'when constant can be of different types',
4341
);
4442
}
4543

@@ -55,7 +53,7 @@ public function isCandidate(Tokens $tokens): bool
5553

5654
public function isRisky(): bool
5755
{
58-
return true;
56+
return false;
5957
}
6058

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

tests/Fixer/TypedClassConstantFixerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class TypedClassConstantFixerTest extends AbstractFixerTestCase
2020
{
2121
public function testIsRisky(): void
2222
{
23-
self::assertRiskiness(true);
23+
self::assertRiskiness(false);
2424
}
2525

2626
/**

0 commit comments

Comments
 (0)