Skip to content

Commit e4a21a1

Browse files
committed
Updated Rector to commit 17dc59709ff1626e9a1ad691ab427015c4f8d42c
rectorphp/rector-src@17dc597 cs
1 parent cd5793a commit e4a21a1

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

rules/Naming/Rector/ClassMethod/RenameParamToMatchTypeRector.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ public function refactor(Node $node): ?Node
9898
$this->hasChanged = \false;
9999
foreach ($node->params as $param) {
100100
// skip as array-like
101-
if ($param->variadic || $param->type === null) {
101+
if ($param->variadic) {
102+
continue;
103+
}
104+
if ($param->type === null) {
102105
continue;
103106
}
104107
if ($node instanceof ClassMethod && $this->shouldSkipClassMethodFromVendor($node)) {

rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByParentCallTypeRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public function refactor(Node $node): ?Node
126126
// mimic type
127127
$paramType = $parentParam->type;
128128
// original attributes have to removed to avoid tokens crashing from origin positions
129-
$this->traverseNodesWithCallable($paramType, static function (Node $classMethod) {
130-
$classMethod->setAttribute(AttributeKey::ORIGINAL_NODE, null);
129+
$this->traverseNodesWithCallable($paramType, static function (Node $node) {
130+
$node->setAttribute(AttributeKey::ORIGINAL_NODE, null);
131131
return null;
132132
});
133133
$param->type = $paramType;

rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ private function shouldSkipPropertyType(Type $propertyType): bool
185185
}
186186
return $this->doctrineTypeAnalyzer->isInstanceOfCollectionType($propertyType);
187187
}
188-
/**
189-
* @param \PhpParser\Node|\PhpParser\Node\Stmt\Class_ $node
190-
*/
191-
private function hasSomeUntypedProperties($node): bool
188+
private function hasSomeUntypedProperties(Class_ $class): bool
192189
{
193-
foreach ($node->getProperties() as $property) {
194-
if ($property->type instanceof \PhpParser\Node) {
190+
if ($class->getProperties() === []) {
191+
return \false;
192+
}
193+
foreach ($class->getProperties() as $property) {
194+
if ($property->type instanceof Node) {
195195
continue;
196196
}
197197
return \true;

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 = '0ca4e9112b61bdbeb6b8fe826e7aae56c298272e';
22+
public const PACKAGE_VERSION = '17dc59709ff1626e9a1ad691ab427015c4f8d42c';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-10-27 11:04:17';
27+
public const RELEASE_DATE = '2025-10-27 11:05:34';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)