Printer
class Printer
Generates PHP code.
Properties
int | $wrapLength | ||
protected string | $indentation | ||
protected int | $linesBetweenProperties | ||
protected int | $linesBetweenMethods | ||
protected string | $returnTypeColon | ||
protected PhpNamespace | $namespace | ||
protected Dumper | $dumper |
Methods
__construct()
No description
string
string
string
string
string
string
string
string
string
printType(string|null $type, bool $nullable)
No description
setTypeResolving(bool $state = true)
No description
string
indent(string $s)
No description
string
dump($var, int $column = 0)
No description
Details
at line 48
__construct()
No description
at line 54
string
printFunction(GlobalFunction $function, PhpNamespace|null $namespace = null)
No description
at line 72
string
printClosure(Closure $closure, PhpNamespace|null $namespace = null)
No description
at line 95
string
printArrowFunction(Closure $closure, PhpNamespace|null $namespace = null)
No description
at line 115
string
printMethod(Method $method, PhpNamespace|null $namespace = null)
No description
at line 144
string
printClass(ClassType $class, PhpNamespace|null $namespace = null)
No description
at line 236
string
printNamespace(PhpNamespace $namespace)
No description
at line 268
string
printFile(PhpFile $file)
No description
at line 285
protected string
printUses(PhpNamespace $namespace, string $of = PhpNamespace::NameNormal)
No description
at line 307
protected string
printParameters(Closure|GlobalFunction|Method $function, int $column = 0)
No description
at line 342
protected string
printType(string|null $type, bool $nullable)
No description
at line 394
Printer
setTypeResolving(bool $state = true)
No description
at line 401
protected string
indent(string $s)
No description
at line 408
protected string
dump($var, int $column = 0)
No description
Traits
SmartObject