-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodingStyle] Skip positive-int and negative-int over int on VarConst…
…antCommentRector (#3709) * [CodingStyle] Skip positive-int over int on VarConstantCommentRector * Fixed 🎉 * clean up * negative-int as well * add negative-int * Final touch: add dedicated IntegerRangeType data * reduce get_class() inside on downgrade code by using string * Final touch: clean up * Final touch: clean up
- Loading branch information
1 parent
2bb26e3
commit ed8e74e
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
...yle/Rector/ClassConst/VarConstantCommentRector/Fixture/skip_negative_int_over_int.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,9 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\ClassConst\VarConstantCommentRector\Fixture; | ||
|
||
final class SkipNegativeIntOverInt | ||
{ | ||
/** @var negative-int */ | ||
public const POSITIVE_INT = -5; | ||
} |
9 changes: 9 additions & 0 deletions
9
...yle/Rector/ClassConst/VarConstantCommentRector/Fixture/skip_positive_int_over_int.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,9 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\ClassConst\VarConstantCommentRector\Fixture; | ||
|
||
final class SkipPositiveIntOverInt | ||
{ | ||
/** @var positive-int */ | ||
public const POSITIVE_INT = 5; | ||
} |