Skip to content

Commit 3f6749c

Browse files
committed
Updated Rector to commit 5c9c57c020483ad435502c057b6eb423f881dd96
rectorphp/rector-src@5c9c57c [Php85] Skip single char literal string/int on OrdSingleByteRector (#7928)
1 parent 4035795 commit 3f6749c

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

rules/Php85/Rector/FuncCall/OrdSingleByteRector.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ public function refactor(Node $node): ?Node
6767
}
6868
$value = $this->valueResolver->getValue($argExpr);
6969
$isInt = is_int($value);
70+
if ($argExpr instanceof String_ && strlen($argExpr->value) === 1) {
71+
return null;
72+
}
73+
if ($argExpr instanceof Int_ && strlen((string) $argExpr->value) === 1) {
74+
return null;
75+
}
7076
if (!$argExpr instanceof Int_) {
7177
return $this->refactorStringType($argExpr, $isInt, $args, $node);
7278
}

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '0071144a396d7d42472f076b85ed089a555c34fb';
22+
public const PACKAGE_VERSION = '5c9c57c020483ad435502c057b6eb423f881dd96';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-03-12 18:24:13';
27+
public const RELEASE_DATE = '2026-03-12 22:32:04';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)