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

Breadcrumb

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

function PrettyPrinterAbstract::initializeModifierChangeMap

1 call to PrettyPrinterAbstract::initializeModifierChangeMap()
PrettyPrinterAbstract::printFormatPreserving in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
Perform a format-preserving pretty print of an AST.

File

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

Class

PrettyPrinterAbstract

Namespace

PhpParser

Code

protected function initializeModifierChangeMap() : void {
    if (isset($this->modifierChangeMap)) {
        return;
    }
    $this->modifierChangeMap = [
        Stmt\ClassConst::class . '->flags' => [
            'pModifiers',
            \T_CONST,
        ],
        Stmt\ClassMethod::class . '->flags' => [
            'pModifiers',
            \T_FUNCTION,
        ],
        Stmt\Class_::class . '->flags' => [
            'pModifiers',
            \T_CLASS,
        ],
        Stmt\Property::class . '->flags' => [
            'pModifiers',
            \T_VARIABLE,
        ],
        PrintableNewAnonClassNode::class . '->flags' => [
            'pModifiers',
            \T_CLASS,
        ],
        Param::class . '->flags' => [
            'pModifiers',
            \T_VARIABLE,
        ],
        PropertyHook::class . '->flags' => [
            'pModifiers',
            \T_STRING,
        ],
        Expr\Closure::class . '->static' => [
            'pStatic',
            \T_FUNCTION,
        ],
        Expr\ArrowFunction::class . '->static' => [
            'pStatic',
            \T_FN,
        ],
    ];
    // List of integer subnodes that are not modifiers:
    // Expr_Include->type
    // Stmt_GroupUse->type
    // Stmt_Use->type
    // UseItem->type
}

API Navigation

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