Skip to content

Commit 95198bd

Browse files
committed
Updated Rector to commit f1dfb895ebc1ee47b1761378136523ae8eaab978
rectorphp/rector-src@f1dfb89 Use dynamic check on last on ClassConstManipulator (#6921)
1 parent 0f0a342 commit 95198bd

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

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 = '5bbf8c72d4dc49c8c9f89bd3d11de4cf4b75a60d';
22+
public const PACKAGE_VERSION = 'f1dfb895ebc1ee47b1761378136523ae8eaab978';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-05-23 01:47:02';
27+
public const RELEASE_DATE = '2025-05-22 19:00:03';
2828
/**
2929
* @var int
3030
*/

src/NodeManipulator/ClassConstManipulator.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,19 @@ public function hasClassConstFetch(ClassConst $classConst, ClassReflection $clas
6767
}
6868
private function isNameMatch(ClassConstFetch $classConstFetch, ClassConst $classConst, string $className, ObjectType $objectType) : bool
6969
{
70-
// dynamic
71-
if (!$classConstFetch->name instanceof Identifier) {
72-
return \true;
73-
}
7470
$classConstName = (string) $this->nodeNameResolver->getName($classConst);
7571
$selfConstantName = 'self::' . $classConstName;
7672
$staticConstantName = 'static::' . $classConstName;
7773
$classNameConstantName = $className . '::' . $classConstName;
78-
if (!$this->nodeNameResolver->isName($classConstFetch->name, $classConstName)) {
79-
return \false;
80-
}
8174
if ($this->nodeNameResolver->isNames($classConstFetch, [$selfConstantName, $staticConstantName, $classNameConstantName])) {
8275
return \true;
8376
}
84-
return $this->nodeTypeResolver->isObjectType($classConstFetch->class, $objectType);
77+
if ($this->nodeTypeResolver->isObjectType($classConstFetch->class, $objectType)) {
78+
if (!$classConstFetch->name instanceof Identifier) {
79+
return \true;
80+
}
81+
return $this->nodeNameResolver->isName($classConstFetch->name, $classConstName);
82+
}
83+
return \false;
8584
}
8685
}

0 commit comments

Comments
 (0)