Skip to content

Commit 5a08493

Browse files
committed
minor #38931 Set constant visibility in tests to private where possible (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- Set constant visibility in tests to private where possible | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A As discussed on Slack, this PR prepares the introduction of a CS fixer rule to enforce explicit visibility declarations for constants. I've checked class constants in test and fixture classes and if I only found usages within the same class, I've declared them `private`. This way, I also found a few constants that weren't used at all anymore, so I've removed those. Commits ------- 43ce6dfe44 Set constant visibility in tests to private where possible.
2 parents 270bf6b + 3bd9351 commit 5a08493

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class BooleanToStringTransformerTest extends TestCase
1818
{
19-
const TRUE_VALUE = '1';
19+
private const TRUE_VALUE = '1';
2020

2121
/**
2222
* @var BooleanToStringTransformer

Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
*/
3333
class ViolationMapperTest extends TestCase
3434
{
35-
const LEVEL_0 = 0;
36-
const LEVEL_1 = 1;
37-
const LEVEL_1B = 2;
38-
const LEVEL_2 = 3;
35+
private const LEVEL_0 = 0;
36+
private const LEVEL_1 = 1;
37+
private const LEVEL_1B = 2;
38+
private const LEVEL_2 = 3;
3939

4040
/**
4141
* @var EventDispatcherInterface

0 commit comments

Comments
 (0)