mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 05:18:18 +01:00
Updated Rector to commit 72c537af546dae8970b6db5f79f2a1e617db7f61
72c537af54
[Php80] Keep numeric string as is on StringAnnotationToAttributeMapper (#6608)
This commit is contained in:
parent
6d48540b47
commit
480c133a14
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '5e0f1ce34354497a5163bbd51dddf91cb5c82207';
|
||||
public const PACKAGE_VERSION = '72c537af546dae8970b6db5f79f2a1e617db7f61';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-12-18 16:53:02';
|
||||
public const RELEASE_DATE = '2024-12-18 18:22:50';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -6,7 +6,6 @@ namespace Rector\PhpAttribute\AnnotationToAttributeMapper;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Scalar\Int_;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
|
||||
@ -36,10 +35,6 @@ final class StringAnnotationToAttributeMapper implements AnnotationToAttributeMa
|
||||
if (\strtolower($value) === 'null') {
|
||||
return new ConstFetch(new Name('null'));
|
||||
}
|
||||
// number as string to number
|
||||
if (\is_numeric($value) && \strlen((string) (int) $value) === \strlen($value)) {
|
||||
return Int_::fromString($value);
|
||||
}
|
||||
if (\strpos($value, "'") !== \false && \strpos($value, "\n") === \false) {
|
||||
$kind = String_::KIND_DOUBLE_QUOTED;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user