opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
PhpDocParser
/
PhpDocParser
/
PhpDocNodeVisitor
➕ New
📤 Upload
✎ Editing:
CloningPhpDocNodeVisitor.php
← Back
<?php declare (strict_types=1); namespace Rector\PhpDocParser\PhpDocParser\PhpDocNodeVisitor; use PHPStan\PhpDocParser\Ast\Node; use Rector\PhpDocParser\PhpDocParser\ValueObject\PhpDocAttributeKey; /** * @api * * Mirrors * https://github.com/nikic/PHP-Parser/blob/d520bc9e1d6203c35a1ba20675b79a051c821a9e/lib/PhpParser/NodeVisitor/CloningVisitor.php */ final class CloningPhpDocNodeVisitor extends \Rector\PhpDocParser\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor { public function enterNode(Node $node) : Node { $clonedNode = clone $node; if (!$clonedNode->hasAttribute(PhpDocAttributeKey::ORIG_NODE)) { $clonedNode->setAttribute(PhpDocAttributeKey::ORIG_NODE, $node); } return $clonedNode; } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel