-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php71] Set public constant on final constant on PublicConstantVisibi…
…lityRector (#3431) * Add failing test fixture for PublicConstantVisibilityRector # Failing Test for PublicConstantVisibilityRector Closes rectorphp/rector#7812 Based on https://getrector.com/demo/f14560bf-6f11-4e0d-a16a-8b793698049e * Update rules-tests/Php71/Rector/ClassConst/PublicConstantVisibilityRector/Fixture/public_visibility_final_const.php.inc Remove unrelated declaration Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com> * Update rules-tests/Php71/Rector/ClassConst/PublicConstantVisibilityRector/Fixture/public_visibility_final_const.php.inc Remove unrelated declaration Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com> * once constant is ok * Closes #3428 Fixes rectorphp/rector#7812 * clean up * reuse duplicated code * [ci-review] Rector Rectify --------- Co-authored-by: Fabien LEGOUGE <fabien.legouge@gmail.com> Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
2eac878
commit 5e78981
Showing
4 changed files
with
39 additions
and
27 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...r/ClassConst/PublicConstantVisibilityRector/Fixture/public_visibility_final_const.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php71\Rector\ClassConst\PublicConstantVisibilityRector\Fixture; | ||
|
||
class PublicVisibilityFinalConstant | ||
{ | ||
final const EXIT_KO = 1; | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php71\Rector\ClassConst\PublicConstantVisibilityRector\Fixture; | ||
|
||
class PublicVisibilityFinalConstant | ||
{ | ||
final public const EXIT_KO = 1; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters