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
Namespace
PhpParserCode
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
}