Printer
class Printer
Generates PHP code.
Properties
| $wrapLength | |||
| $indentation | |||
| $linesBetweenProperties | |||
| $linesBetweenMethods | |||
| $linesBetweenUseTypes | |||
| $returnTypeColon | |||
| $bracesOnNextLine | |||
| $singleParameterOnOneLine | |||
| $omitEmptyNamespaces | |||
| protected | $namespace | ||
| protected | $dumper |
Methods
__construct()
No description
string
string
string
string
printMethod(Method $method, PhpNamespace|null $namespace = null, bool $isInterface = false)
No description
string
printClass(EnumType $class, PhpNamespace|null $namespace = null)
No description
string
string
string
printParameters(PropertyHook $function, int $column = 0)
No description
string
printType(Type|null $type, bool $complex = false)
No description
string
printDocComment($commentable)
No description
string
printReturnType(Method $function)
No description
string
printAttributes(array $attrs, bool $inline = false)
No description
setTypeResolving(bool $state = true)
No description
string
indent(string $s)
No description
string
dump(mixed $var, int $column = 0)
No description
bool
isBraceOnNextLine(bool $multiLine, bool $hasReturnType)
No description
Details
at line 37
__construct()
No description
at line 43
string
printFunction(GlobalFunction $function, PhpNamespace|null $namespace = null)
No description
at line 64
string
printClosure(Closure $closure, PhpNamespace|null $namespace = null)
No description
at line 87
string
printArrowFunction(Closure $closure, PhpNamespace|null $namespace = null)
No description
at line 107
string
printMethod(Method $method, PhpNamespace|null $namespace = null, bool $isInterface = false)
No description
at line 142
string
printClass(EnumType $class, PhpNamespace|null $namespace = null)
No description
at line 248
string
printNamespace(PhpNamespace $namespace)
No description
at line 283
string
printFile(PhpFile $file)
No description
at line 300
protected string
printUses(PhpNamespace $namespace, string $of = PhpNamespace::NameNormal)
No description
at line 318
protected string
printParameters(PropertyHook $function, int $column = 0)
No description
at line 419
string
printType(Type|null $type, bool $complex = false)
No description
at line 482
protected string
printDocComment($commentable)
No description
at line 492
protected string
printReturnType(Method $function)
No description
at line 501
protected string
printAttributes(array $attrs, bool $inline = false)
No description
at line 553
Printer
setTypeResolving(bool $state = true)
No description
at line 560
protected string
indent(string $s)
No description
at line 567
protected string
dump(mixed $var, int $column = 0)
No description
at line 586
protected bool
isBraceOnNextLine(bool $multiLine, bool $hasReturnType)
No description