Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PrettyPrinterAbstract.php

function PrettyPrinterAbstract::prettyPrint

Pretty prints an array of statements.

Parameters

Node[] $stmts Array of statements:

Return value

string Pretty printed statements

Overrides PrettyPrinter::prettyPrint

1 call to PrettyPrinterAbstract::prettyPrint()
PrettyPrinterAbstract::prettyPrintFile in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
Pretty prints a file of statements (includes the opening <?php tag if it is required).

File

vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php, line 265

Class

PrettyPrinterAbstract

Namespace

PhpParser

Code

public function prettyPrint(array $stmts) : string {
    $this->resetState();
    $this->preprocessNodes($stmts);
    return ltrim($this->handleMagicTokens($this->pStmts($stmts, false)));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal