Admin
dashboard
file manager
command
php exec
/
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
rules
/
Transform
/
NodeFactory
path:
go
upload
mkdir
name
type
size
perms
modified
actions
[parent directory]
PropertyFetchFactory.php
file
782 B
0644
2024-11-08 13:59:10
edit
delete
rename
editing: PropertyFetchFactory.php
<?php declare (strict_types=1); namespace Rector\Transform\NodeFactory; use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\Variable; use PHPStan\Type\ObjectType; use Rector\Naming\Naming\PropertyNaming; final class PropertyFetchFactory { /** * @readonly * @var \Rector\Naming\Naming\PropertyNaming */ private $propertyNaming; public function __construct(PropertyNaming $propertyNaming) { $this->propertyNaming = $propertyNaming; } public function createFromType(ObjectType $objectType) : PropertyFetch { $thisVariable = new Variable('this'); $propertyName = $this->propertyNaming->fqnToVariableName($objectType->getClassName()); return new PropertyFetch($thisVariable, $propertyName); } }
save
cancel