use changelog annotations to display useful into under the change

This commit is contained in:
Tomas Votruba 2022-05-12 21:07:36 +02:00
parent f0d68c75a1
commit 47bea33c2e
59 changed files with 79 additions and 79 deletions

View File

@ -31,7 +31,7 @@ final class PregMatchTypeCorrector
/**
* Special case for "preg_match(), preg_match_all()" - with 3rd argument
* @see https://github.com/rectorphp/rector/issues/786
* @changelog https://github.com/rectorphp/rector/issues/786
*/
public function correct(Node $node, Type $originalType): Type
{

View File

@ -18,8 +18,8 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://www.php.net/manual/en/language.types.callable.php#117260
* @see https://3v4l.org/MsMbQ
* @see https://3v4l.org/KM1Ji
* @changelog https://3v4l.org/MsMbQ
* @changelog https://3v4l.org/KM1Ji
*
* @see \Rector\Tests\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector\CallableThisArrayToAnonymousFunctionRectorTest
*/

View File

@ -17,8 +17,8 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/EZ2P4
* @see https://3v4l.org/egtb5
* @changelog https://3v4l.org/EZ2P4
* @changelog https://3v4l.org/egtb5
* @see \Rector\Tests\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector\SimplifyEmptyArrayCheckRectorTest
*/
final class SimplifyEmptyArrayCheckRector extends AbstractRector

View File

@ -21,9 +21,9 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/GL6II
* @see https://3v4l.org/eTrhZ
* @see https://3v4l.org/C554W
* @changelog https://3v4l.org/GL6II
* @changelog https://3v4l.org/eTrhZ
* @changelog https://3v4l.org/C554W
*
* @see \Rector\Tests\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector\CompleteDynamicPropertiesRectorTest
*/

View File

@ -19,7 +19,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/dmHCC
* @changelog https://3v4l.org/dmHCC
*
* @see \Rector\Tests\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector\InlineIfToExplicitIfRectorTest
*/

View File

@ -22,7 +22,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/bfsdY
* @changelog https://3v4l.org/bfsdY
*
* @see \Rector\Tests\CodeQuality\Rector\Foreach_\SimplifyForeachToCoalescingRector\SimplifyForeachToCoalescingRectorTest
*/

View File

@ -22,7 +22,7 @@ final class AddPregQuoteDelimiterRector extends AbstractRector
{
/**
* @var string
* @see https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
* @changelog https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
*/
private const ALL_MODIFIERS = 'imsxeADSUXJu';

View File

@ -14,9 +14,9 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/aLf96
* @see https://3v4l.org/2r26K
* @see https://3v4l.org/anks3
* @changelog https://3v4l.org/aLf96
* @changelog https://3v4l.org/2r26K
* @changelog https://3v4l.org/anks3
*
* @see \Rector\Tests\CodeQuality\Rector\FuncCall\ArrayMergeOfNonArraysToSimpleArrayRector\ArrayMergeOfNonArraysToSimpleArrayRectorTest
*/

View File

@ -24,7 +24,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://stackoverflow.com/a/16319909/1348344
* @see https://3v4l.org/8GJEs
* @changelog https://3v4l.org/8GJEs
* @see \Rector\Tests\CodeQuality\Rector\FuncCall\CompactToVariablesRector\CompactToVariablesRectorTest
*/
final class CompactToVariablesRector extends AbstractRector

View File

@ -14,7 +14,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/GoEPq
* @changelog https://3v4l.org/GoEPq
* @see \Rector\Tests\CodeQuality\Rector\Identical\BooleanNotIdenticalToNotIdenticalRector\BooleanNotIdenticalToNotIdenticalRectorTest
*/
final class BooleanNotIdenticalToNotIdenticalRector extends AbstractRector

View File

@ -39,7 +39,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://www.reddit.com/r/PHP/comments/aqk01p/is_there_a_situation_in_which_if_countarray_0/
* @see https://3v4l.org/UCd1b
* @changelog https://3v4l.org/UCd1b
*
* @see \Rector\Tests\CodeQuality\Rector\If_\ExplicitBoolCompareRector\ExplicitBoolCompareRectorTest
*/

View File

@ -25,7 +25,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Tests\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector\IssetOnPropertyObjectToPropertyExistsRectorTest
*
* @see https://3v4l.org/TI8XL Change isset on property object to property_exists() with not null check
* @changelog https://3v4l.org/TI8XL Change isset on property object to property_exists() with not null check
*/
final class IssetOnPropertyObjectToPropertyExistsRector extends AbstractRector
{

View File

@ -13,7 +13,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/ji8bX
* @changelog https://3v4l.org/ji8bX
* @see \Rector\Tests\CodeQuality\Rector\LogicalAnd\AndAssignsToSeparateLinesRector\AndAssignsToSeparateLinesRectorTest
*/
final class AndAssignsToSeparateLinesRector extends AbstractRector

View File

@ -15,7 +15,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/f7itn
* @changelog https://3v4l.org/f7itn
*
* @see \Rector\Tests\CodeQuality\Rector\Ternary\ArrayKeyExistsTernaryThenValueToCoalescingRector\ArrayKeyExistsTernaryThenValueToCoalescingRectorTest
*/

View File

@ -25,19 +25,19 @@ final class PHPStormVarAnnotationRector extends AbstractRector
{
/**
* @var string
* @see https://regex101.com/r/YY5stJ/1
* @changelog https://regex101.com/r/YY5stJ/1
*/
private const SINGLE_ASTERISK_COMMENT_START_REGEX = '#^\/\* #';
/**
* @var string
* @see https://regex101.com/r/meD7rP/1
* @changelog https://regex101.com/r/meD7rP/1
*/
private const VAR_ANNOTATION_REGEX = '#\@var(\s)+\$#';
/**
* @var string
* @see https://regex101.com/r/yz2AZ7/1
* @changelog https://regex101.com/r/yz2AZ7/1
*/
private const VARIABLE_NAME_AND_TYPE_MATCH_REGEX = '#(?<variableName>\$\w+)(?<space>\s+)(?<type>[\\\\\w]+)#';

View File

@ -26,7 +26,7 @@ final class CatchExceptionNameMatchingTypeRector extends AbstractRector
{
/**
* @var string
* @see https://regex101.com/r/xmfMAX/1
* @changelog https://regex101.com/r/xmfMAX/1
*/
private const STARTS_WITH_ABBREVIATION_REGEX = '#^([A-Za-z]+?)([A-Z]{1}[a-z]{1})([A-Za-z]*)#';

View File

@ -16,7 +16,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/RFYmn
* @changelog https://3v4l.org/RFYmn
*
* @see \Rector\Tests\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector\MakeInheritedMethodVisibilitySameAsParentRectorTest
*/

View File

@ -23,7 +23,7 @@ final class RemoveDoubleUnderscoreInMethodNameRector extends AbstractRector
{
/**
* @var string
* @see https://regex101.com/r/oRrhDJ/3
* @changelog https://regex101.com/r/oRrhDJ/3
*/
private const DOUBLE_UNDERSCORE_START_REGEX = '#^__(.+)#';

View File

@ -23,7 +23,7 @@ use Webmozart\Assert\Assert;
/**
* @changelog https://medium.com/tech-tajawal/use-memory-gently-with-yield-in-php-7e62e2480b8d
* @see https://3v4l.org/5PJid
* @changelog https://3v4l.org/5PJid
*
* @see \Rector\Tests\CodingStyle\Rector\ClassMethod\ReturnArrayClassMethodToYieldRector\ReturnArrayClassMethodToYieldRectorTest
*/

View File

@ -28,7 +28,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Tests\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector\AddArrayDefaultToArrayPropertyRectorTest
* @see https://3v4l.org/dPlUg
* @changelog https://3v4l.org/dPlUg
*/
final class AddArrayDefaultToArrayPropertyRector extends AbstractRector
{

View File

@ -16,7 +16,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog http://php.net/manual/en/function.implode.php#refsect1-function.implode-description
* @see https://3v4l.org/iYTgh
* @changelog https://3v4l.org/iYTgh
* @see \Rector\Tests\CodingStyle\Rector\FuncCall\ConsistentImplodeRector\ConsistentImplodeRectorTest
*/
final class ConsistentImplodeRector extends AbstractRector

View File

@ -32,7 +32,7 @@ final class ConsistentPregDelimiterRector extends AbstractRector implements Allo
/**
* @var string
* @see https://regex101.com/r/isdgEN/1
* @changelog https://regex101.com/r/isdgEN/1
*
* For modifiers see https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
*/
@ -40,7 +40,7 @@ final class ConsistentPregDelimiterRector extends AbstractRector implements Allo
/**
* @var string
* @see https://regex101.com/r/nnuwUo/1
* @changelog https://regex101.com/r/nnuwUo/1
*
* For modifiers see https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
*/
@ -48,13 +48,13 @@ final class ConsistentPregDelimiterRector extends AbstractRector implements Allo
/**
* @var string
* @see https://regex101.com/r/KpCzg6/1
* @changelog https://regex101.com/r/KpCzg6/1
*/
private const NEW_LINE_REGEX = '#(\\r|\\n)#';
/**
* @var string
* @see https://regex101.com/r/EyXsV6/6
* @changelog https://regex101.com/r/EyXsV6/6
*/
private const DOUBLE_QUOTED_REGEX = '#^"(?<delimiter>.{1}).{1,}\k<delimiter>[imsxeADSUXJu]*"$#';

View File

@ -19,7 +19,7 @@ final class SymplifyQuoteEscapeRector extends AbstractRector
{
/**
* @var string
* @see https://regex101.com/r/qEkCe9/2
* @changelog https://regex101.com/r/qEkCe9/2
*/
private const ESCAPED_CHAR_REGEX = '#\\\\|\$|\\n|\\t#sim';

View File

@ -21,7 +21,7 @@ final class UseClassKeywordForClassNameResolutionRector extends AbstractRector
{
/**
* @var string
* @see https://regex101.com/r/Vv41Qr/1/
* @changelog https://regex101.com/r/Vv41Qr/1/
*/
private const CLASS_BEFORE_STATIC_ACCESS_REGEX = '#(?<class_name>[\\\\a-zA-Z0-9_\\x80-\\xff]*)::#';

View File

@ -13,7 +13,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/SG0Wu
* @changelog https://3v4l.org/SG0Wu
* @see \Rector\Tests\DeadCode\Rector\Array_\RemoveDuplicatedArrayKeyRector\RemoveDuplicatedArrayKeyRectorTest
*/
final class RemoveDuplicatedArrayKeyRector extends AbstractRector

View File

@ -21,7 +21,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/I0BGs
* @changelog https://3v4l.org/I0BGs
*
* @see \Rector\Tests\DeadCode\Rector\Plus\RemoveDeadZeroAndOneOperationRector\RemoveDeadZeroAndOneOperationRectorTest
*/

View File

@ -21,7 +21,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* Throwable was introduced in PHP 7.0 so to support older versions we need to also check for Exception.
* @see https://www.php.net/manual/en/class.throwable.php
* @changelog https://www.php.net/manual/en/class.throwable.php
* @see \Rector\Tests\DowngradePhp70\Rector\Instanceof_\DowngradeInstanceofThrowableRector\DowngradeInstanceofThrowableRectorTest
*/
final class DowngradeInstanceofThrowableRector extends AbstractRector

View File

@ -16,7 +16,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* Throwable was introduced in PHP 7.0 so to support older versions we need to also check for Exception.
* @see https://www.php.net/manual/en/class.throwable.php
* @changelog https://www.php.net/manual/en/class.throwable.php
* @see \Rector\Tests\DowngradePhp70\Rector\TryCatch\DowngradeCatchThrowableRector\DowngradeCatchThrowableRectorTest
*/
final class DowngradeCatchThrowableRector extends AbstractRector

View File

@ -23,7 +23,7 @@ use Webmozart\Assert\Assert;
/**
* @changelog https://www.php.net/manual/en/migration72.new-features.php#migration72.new-features.param-type-widening
* @see https://3v4l.org/fOgSE
* @changelog https://3v4l.org/fOgSE
*
* @see \Rector\Tests\DowngradePhp72\Rector\ClassMethod\DowngradeParameterTypeWideningRector\DowngradeParameterTypeWideningRectorTest
*/

View File

@ -35,7 +35,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
final class DowngradePregUnmatchedAsNullConstantRector extends AbstractRector
{
/**
* @see https://www.php.net/manual/en/function.preg-match.php
* @changelog https://www.php.net/manual/en/function.preg-match.php
* @var string
*/
private const UNMATCHED_NULL_FLAG = 'PREG_UNMATCHED_AS_NULL';

View File

@ -20,7 +20,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://wiki.php.net/rfc/array_key_first_last
* @changelog https://wiki.php.net/rfc/array_key_first_last
*
* @see \Rector\Tests\DowngradePhp73\Rector\FuncCall\DowngradeArrayKeyFirstLastRector\DowngradeArrayKeyFirstLastRectorTest
*/

View File

@ -215,7 +215,7 @@ CODE_SAMPLE
if ($parentReflectionMethodParam->getName() === $paramName) {
/**
* Getting a ReflectionNamedType works from PHP 7.1 onwards
* @see https://www.php.net/manual/en/reflectionparameter.gettype.php#125334
* @changelog https://www.php.net/manual/en/reflectionparameter.gettype.php#125334
*/
$reflectionParamType = $parentReflectionMethodParam->getType();

View File

@ -15,7 +15,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://wiki.php.net/rfc/deprecations_php_7_4 (not confirmed yet)
* @see https://3v4l.org/INd7o
* @changelog https://3v4l.org/INd7o
* @see \Rector\Tests\Php55\Rector\Class_\ClassConstantToSelfClassRector\ClassConstantToSelfClassRectorTest
*/
final class ClassConstantToSelfClassRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -17,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://www.php.net/ChangeLog-5.php#5.5.0
* @see https://3v4l.org/GU9dP
* @changelog https://3v4l.org/GU9dP
* @see \Rector\Tests\Php55\Rector\FuncCall\GetCalledClassToSelfClassRector\GetCalledClassToSelfClassRectorTest
*/
final class GetCalledClassToSelfClassRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -17,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://www.php.net/ChangeLog-5.php#5.5.0
* @see https://3v4l.org/dJgXd
* @changelog https://3v4l.org/dJgXd
* @see \Rector\Tests\Php55\Rector\FuncCall\GetCalledClassToStaticClassRector\GetCalledClassToStaticClassRectorTest
*/
final class GetCalledClassToStaticClassRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -24,7 +24,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://github.com/vimeo/psalm/blob/29b70442b11e3e66113935a2ee22e165a70c74a4/docs/fixing_code.md#possiblyundefinedvariable
* @see https://3v4l.org/MZFel
* @changelog https://3v4l.org/MZFel
*
* @see \Rector\Tests\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector\AddDefaultValueForUndefinedVariableRectorTest
*/

View File

@ -17,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://stackoverflow.com/questions/3618030/php-fatal-error-cannot-break-continue https://stackoverflow.com/questions/11988281/why-does-cannot-break-continue-1-level-comes-in-php
*
* @see https://3v4l.org/Qtelt
* @changelog https://3v4l.org/Qtelt
* @see \Rector\Tests\Php70\Rector\Break_\BreakNotInLoopOrSwitchToReturnRector\BreakNotInLoopOrSwitchToReturnRectorTest
*/
final class BreakNotInLoopOrSwitchToReturnRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -14,7 +14,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/F5GE8
* @changelog https://3v4l.org/F5GE8
* @see \Rector\Tests\Php70\Rector\FuncCall\RenameMktimeWithoutArgsToTimeRector\RenameMktimeWithoutArgsToTimeRectorTest
*/
final class RenameMktimeWithoutArgsToTimeRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -25,7 +25,7 @@ final class ExceptionHandlerTypehintRector extends AbstractRector implements Min
{
/**
* @var string
* @see https://regex101.com/r/VBFXCR/1
* @changelog https://regex101.com/r/VBFXCR/1
*/
private const HANDLE_INSENSITIVE_REGEX = '#handle#i';

View File

@ -21,7 +21,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/rkiSC
* @changelog https://3v4l.org/rkiSC
* @see \Rector\Tests\Php70\Rector\MethodCall\ThisCallOnStaticMethodToStaticCallRector\ThisCallOnStaticMethodToStaticCallRectorTest
*/
final class ThisCallOnStaticMethodToStaticCallRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -15,7 +15,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/iGDVW
* @changelog https://3v4l.org/iGDVW
*
* @changelog https://wiki.php.net/rfc/switch.default.multiple https://stackoverflow.com/a/44000794/1348344 https://github.com/franzliedke/wp-mpdf/commit/9dc489215fbd1adcb514810653a73dea71db8e99#diff-2f1f4a51a2dd3a73ca034a48a67a2320L1373
*

View File

@ -23,8 +23,8 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/XPEEl
* @see https://3v4l.org/ObNQZ
* @changelog https://3v4l.org/XPEEl
* @changelog https://3v4l.org/ObNQZ
* @see \Rector\Tests\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector\BinaryOpBetweenNumberAndStringRectorTest
*/
final class BinaryOpBetweenNumberAndStringRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -35,7 +35,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/Bndc9
* @changelog https://3v4l.org/Bndc9
*
* @see \Rector\Tests\Php71\Rector\FuncCall\CountOnNullRector\CountOnNullRectorTest
*/

View File

@ -17,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/YiTeP
* @changelog https://3v4l.org/YiTeP
* @see \Rector\Tests\Php72\Rector\FuncCall\StringifyDefineRector\StringifyDefineRectorTest
*/
final class StringifyDefineRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -19,7 +19,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog http://wiki.php.net/rfc/json_throw_on_error
* @see https://3v4l.org/5HMVE
* @changelog https://3v4l.org/5HMVE
* @see \Rector\Tests\Php73\Rector\FuncCall\JsonThrowOnErrorRector\JsonThrowOnErrorRectorTest
*/
final class JsonThrowOnErrorRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -19,14 +19,14 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/dRG8U
* @changelog https://3v4l.org/dRG8U
* @see \Rector\Tests\Php73\Rector\FuncCall\RegexDashEscapeRector\RegexDashEscapeRectorTest
*/
final class RegexDashEscapeRector extends AbstractRector implements MinPhpVersionInterface
{
/**
* @var string
* @see https://regex101.com/r/iQbGgZ/1
* @changelog https://regex101.com/r/iQbGgZ/1
*
* Use {2} as detected only 2 after $this->regexPatternArgumentManipulator->matchCallArgumentWithRegexPattern() call
*/
@ -34,13 +34,13 @@ final class RegexDashEscapeRector extends AbstractRector implements MinPhpVersio
/**
* @var string
* @see https://regex101.com/r/YgVJFp/1
* @changelog https://regex101.com/r/YgVJFp/1
*/
private const LEFT_HAND_UNESCAPED_DASH_REGEX = '#(\[.*?\\\\(w|s|d))-(?!\])#i';
/**
* @var string
* @see https://regex101.com/r/TBVme9/8
* @changelog https://regex101.com/r/TBVme9/8
*/
private const RIGHT_HAND_UNESCAPED_DASH_REGEX = '#(?<!\[)-(\\\\(w|s|d)[.*]?)\]#i';

View File

@ -17,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://wiki.php.net/rfc/deprecations_php_7_4 (not confirmed yet)
* @see https://3v4l.org/69mpd
* @changelog https://3v4l.org/69mpd
* @see \Rector\Tests\Php74\Rector\FuncCall\ArrayKeyExistsOnPropertyRector\ArrayKeyExistsOnPropertyRectorTest
*/
final class ArrayKeyExistsOnPropertyRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -16,7 +16,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://wiki.php.net/rfc/deprecations_php_7_4 (not confirmed yet)
* @see https://3v4l.org/9rLjE
* @changelog https://3v4l.org/9rLjE
* @see \Rector\Tests\Php74\Rector\FuncCall\FilterVarToAddSlashesRector\FilterVarToAddSlashesRectorTest
*/
final class FilterVarToAddSlashesRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -23,8 +23,8 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://www.reddit.com/r/PHP/comments/apikof/whats_the_deal_with_reflectiontype/ https://www.php.net/manual/en/reflectiontype.tostring.php
*
* @see https://3v4l.org/fYeif
* @see https://3v4l.org/QeM6U
* @changelog https://3v4l.org/fYeif
* @changelog https://3v4l.org/QeM6U
*
* @see \Rector\Tests\Php74\Rector\MethodCall\ChangeReflectionTypeToStringToGetNameRector\ChangeReflectionTypeToStringToGetNameRectorTest
*/

View File

@ -20,7 +20,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://wiki.php.net/rfc/deprecations_php_7_4 (not confirmed yet)
* @see https://3v4l.org/RTCUq
* @changelog https://3v4l.org/RTCUq
* @see \Rector\Tests\Php74\Rector\StaticCall\ExportToReflectionFunctionRector\ExportToReflectionFunctionRectorTest
*/
final class ExportToReflectionFunctionRector extends AbstractRector implements MinPhpVersionInterface

View File

@ -30,8 +30,8 @@ use Webmozart\Assert\Assert;
/**
* @changelog https://php.watch/articles/php-attributes#syntax
*
* @see https://github.com/doctrine/annotations/blob/1.13.x/lib/Doctrine/Common/Annotations/Annotation/Target.php
* @see https://github.com/doctrine/annotations/blob/c66f06b7c83e9a2a7523351a9d5a4b55f885e574/docs/en/custom.rst#annotation-required
* @changelog https://github.com/doctrine/annotations/blob/1.13.x/lib/Doctrine/Common/Annotations/Annotation/Target.php
* @changelog https://github.com/doctrine/annotations/blob/c66f06b7c83e9a2a7523351a9d5a4b55f885e574/docs/en/custom.rst#annotation-required
*
* @see \Rector\Tests\Php80\Rector\Class_\DoctrineAnnotationClassToAttributeRector\DoctrineAnnotationClassToAttributeRectorTest
*/

View File

@ -18,8 +18,8 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions
*
* @see https://3v4l.org/RQHB5 for weak compare
* @see https://3v4l.org/AmLja for weak compare
* @changelog https://3v4l.org/RQHB5 for weak compare
* @changelog https://3v4l.org/AmLja for weak compare
*
* @see \Rector\Tests\Php80\Rector\Identical\StrStartsWithRector\StrStartsWithRectorTest
*/

View File

@ -27,7 +27,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://wiki.php.net/rfc/match_expression_v2
* @see https://3v4l.org/572T5
* @changelog https://3v4l.org/572T5
*
* @see \Rector\Tests\Php80\Rector\Switch_\ChangeSwitchToMatchRector\ChangeSwitchToMatchRectorTest
*/

View File

@ -18,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/DWC4P
* @changelog https://3v4l.org/DWC4P
*
* @changelog https://stackoverflow.com/a/12446305/1348344
* @see \Rector\Tests\Privatization\Rector\Class_\ChangeGlobalVariablesToPropertiesRector\ChangeGlobalVariablesToPropertiesRectorTest

View File

@ -45,7 +45,7 @@ final class RepeatedLiteralToClassConstantRector extends AbstractRector
/**
* @var string
* @see https://regex101.com/r/osJLMF/1
* @changelog https://regex101.com/r/osJLMF/1
*/
private const SLASH_AND_DASH_REGEX = '#[-\\\/]#';

View File

@ -30,7 +30,7 @@ use Webmozart\Assert\Assert;
final class PseudoNamespaceToNamespaceRector extends AbstractRector implements ConfigurableRectorInterface
{
/**
* @see https://regex101.com/r/chvLgs/1/
* @changelog https://regex101.com/r/chvLgs/1/
* @var string
*/
private const SPLIT_BY_UNDERSCORE_REGEX = '#([a-zA-Z])(_)?(_)([a-zA-Z])#';

View File

@ -17,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://3v4l.org/lifbH
* @changelog https://3v4l.org/lifbH
* @changelog https://stackoverflow.com/a/203359/1348344
* @changelog http://cleancode.blog/2017/07/20/how-to-avoid-many-instances-in-singleton-pattern/
* @see \Rector\Tests\Transform\Rector\Class_\ChangeSingletonToServiceRector\ChangeSingletonToServiceRectorTest

View File

@ -29,7 +29,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
final class ArrayShapeFromConstantArrayReturnRector extends AbstractRector
{
/**
* @see https://regex101.com/r/WvUD0m/2
* @changelog https://regex101.com/r/WvUD0m/2
* @var string
*/
private const SKIPPED_CHAR_REGEX = '#\W#u';

View File

@ -17,15 +17,15 @@ use Webmozart\Assert\Assert;
final class RenameClassNonPhpRector implements NonPhpRectorInterface, ConfigurableRuleInterface, ConfigurableRectorInterface, ComplementaryRectorInterface
{
/**
* @see https://regex101.com/r/HKUFJD/7
* @changelog https://regex101.com/r/HKUFJD/7
* for "?<!" @see https://stackoverflow.com/a/3735908/1348344
* @var string
*/
private const STANDALONE_CLASS_PREFIX_REGEX = '#((?<!(\\\\|"|\>|\.|\'))|(?<extra_space>\s+\\\\))';
/**
* @see https://regex101.com/r/HKUFJD/5
* @see https://stackoverflow.com/a/3926546/1348344
* @changelog https://regex101.com/r/HKUFJD/5
* @changelog https://stackoverflow.com/a/3926546/1348344
* @var string
*/
private const STANDALONE_CLASS_SUFFIX_REGEX = '(?=::)#';