php version: 7.3.0
nette/php-generator version: 3.2.1
Bug Description
When adding a constant to a class as below
$map = [
'foo' => 'bar',
'example' => 'value',
];
$class
->addConstant('MAP', $map)
->setVisibility(ClassType::VISIBILITY_PROTECTED);
it results in:
protected const MAP = [
'foo' => 'bar',
'example' => 'value',
];
When printing with Nette\PhpGenerator\PsrPrinter.
Expected Behavior
The constant printed with PsrPrinter's 4 spaces indentation instead of tabs.
Possible Solution
The tab is hardcoded at https://github.com/nette/php-generator/blob/master/src/PhpGenerator/Helpers.php#L74. Could we change it so that we can pass the indentation to the helper?