📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-03 13:26:06
📂
/ (Root)
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
vendor
/
rector
/
rector-downgrade-php
/
src
/
NodeFactory
📍 /opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/rector/rector-downgrade-php/src/NodeFactory
🔄 Refresh
✏️
Editing: NamedVariableFactory.php
Read Only
<?php declare (strict_types=1); namespace Rector\NodeFactory; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; use Rector\Naming\Naming\VariableNaming; use Rector\NodeTypeResolver\Node\AttributeKey; final class NamedVariableFactory { /** * @readonly * @var \Rector\Naming\Naming\VariableNaming */ private $variableNaming; public function __construct(VariableNaming $variableNaming) { $this->variableNaming = $variableNaming; } public function createVariable(string $variableName, Expression $expression) : Variable { $scope = $expression->getAttribute(AttributeKey::SCOPE); $variableName = $this->variableNaming->createCountedValueName($variableName, $scope); return new Variable($variableName); } }
💾 Save Changes
❌ Cancel